diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Winamp/bookmark.cpp | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Winamp/bookmark.cpp')
-rw-r--r-- | Src/Winamp/bookmark.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Src/Winamp/bookmark.cpp b/Src/Winamp/bookmark.cpp new file mode 100644 index 00000000..d0541819 --- /dev/null +++ b/Src/Winamp/bookmark.cpp @@ -0,0 +1,25 @@ +#include "main.h" +#include "api.h" +#include <stdio.h> + +void Bookmark_additem(char *fn, char *ft) +{ + FILE *fp; + + fp=fopen(BOOKMARKFILE,"a+t"); + if (fp) + { + char *buf=(char*)malloc(lstrlen(fn)+lstrlen(ft)+3); + fprintf(fp,"%s\n%s\n",fn,ft); + fclose(fp); + if (buf) + { + lstrcpy(buf,fn); + lstrcpy(buf+lstrlen(buf)+1,ft); + SendMessage(hMainWindow,WM_WA_IPC,(WPARAM)buf,IPC_ADDBOOKMARK); + free(buf); + AGAVE_API_STATS->IncrementStat(api_stats::BOOKMARK_COUNT); + } + + } +}
\ No newline at end of file |