bookmark.cpp 538 B

1234567891011121314151617181920212223242526272829303132
  1. /** (c) Nullsoft, Inc. C O N F I D E N T I A L
  2. ** Filename:
  3. ** Project:
  4. ** Description:
  5. ** Author:
  6. ** Created:
  7. **/
  8. #include "bookmark.h"
  9. BookmarkWriter::BookmarkWriter():fp(0)
  10. {
  11. }
  12. void BookmarkWriter::Open(const wchar_t *filename)
  13. {
  14. fp=_wfopen(filename, L"a+t");
  15. }
  16. void BookmarkWriter::New(const wchar_t *filename)
  17. {
  18. fp=_wfopen(filename, L"wt");
  19. }
  20. void BookmarkWriter::Write(const char *filename, const char *title)
  21. {
  22. fprintf(fp,"%s\n%s\n",filename,title);
  23. }
  24. void BookmarkWriter::Close()
  25. {
  26. if (fp) fclose(fp);
  27. }