Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Winamp/bookmark.cpp

25 lines
507 B
C++
Raw Normal View History

2024-09-24 12:54:57 +00:00
#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);
}
}
}