45 if (
bmp->user[0] !=
'\0') {
47 if (
bmp->pass[0] !=
'\0') {
54 if (
bmp->port != 21) {
58 if (
bmp->dir[0] ==
'/') {
63 }
else if (
bmp->dir[0] !=
'\0') {
114 return (
c -
'a' + 10);
121 return (
c -
'A' + 10);
158 for (
d =
token; *
s !=
'\0'; ) {
159 if ((*
s ==
'\\') && (
s[1] !=
'\0')) {
163 }
else if (*
s ==
',') {
166 }
else if ((*
s ==
'$') && (
s[1] !=
'\0') && (
s[2] !=
'\0')) {
169 if ((
n1 >= 0) && (
n2 >= 0)) {
172 *(
unsigned char *)
d++ = (
unsigned int)
n;
192 if (
token[0] !=
'\0')
197 if (
token[0] ==
'\0')
277 char pathName[256],
path2[256];
341 if (numBookmarks0 == (
int *) 0) {
351 for (numBookmarks = 0; ; numBookmarks++) {
378 *numBookmarks0 = numBookmarks;
394 size_t byBmNameFlag = 0;
395 size_t byBmAbbrFlag = 0;
396 size_t byHostNameFlag = 0;
397 size_t byHostAbbrFlag = 0;
407 bmabbrLen =
strlen(bmabbr);
413 byBmNameFlag = bmabbrLen;
416 }
else if (
ISTRNEQ(
bmp->bookmarkName, bmabbr, bmabbrLen)) {
421 byBmAbbrFlag = bmabbrLen;
427 byHostNameFlag = bmabbrLen;
442 byHostAbbrFlag = bmabbrLen;
451 if (exactMatch != 0) {
456 if (byBmNameFlag != 0) {
459 }
else if (byBmAbbrFlag != 0) {
462 }
else if (byHostNameFlag != 0) {
465 }
else if (byHostAbbrFlag != 0) {
546 for (
i=0;
i<nb;
i++) {
567 char *dlim =
dst + dsize - 1;
571 while ((
c = *
src) !=
'\0') {
573 if ((
c ==
'\\') || (
c ==
',') || (
c ==
'$')) {
575 if ((
dst + 1) < dlim) {
581 if ((
dst + 2) < dlim) {
606 if (
fprintf(outfp,
"%s",
bmp->bookmarkName) < 0)
return (-1) ;
609 if ((
bmp->pass[0] !=
'\0') && (savePassword == 1)) {
614 if (
fprintf(outfp,
",%s",
"") < 0)
return (-1) ;
618 if (
fprintf(outfp,
",%c",
bmp->xferType) < 0)
return (-1) ;
619 if (
fprintf(outfp,
",%u", (
unsigned int)
bmp->port) < 0)
return (-1) ;
620 if (
fprintf(outfp,
",%lu", (
unsigned long)
bmp->lastCall) < 0)
return (-1) ;
621 if (
fprintf(outfp,
",%d",
bmp->hasSIZE) < 0)
return (-1) ;
622 if (
fprintf(outfp,
",%d",
bmp->hasMDTM) < 0)
return (-1) ;
623 if (
fprintf(outfp,
",%d",
bmp->hasPASV) < 0)
return (-1) ;
624 if (
fprintf(outfp,
",%d",
bmp->isUnix) < 0)
return (-1) ;
625 if (
fprintf(outfp,
",%s",
bmp->lastIP) < 0)
return (-1) ;
627 if (
fprintf(outfp,
",%s",
"") < 0)
return (-1) ;
628 if (
fprintf(outfp,
",%s",
"") < 0)
return (-1) ;
629 if (
fprintf(outfp,
",%s",
"") < 0)
return (-1) ;
630 if (
fprintf(outfp,
",%s",
"") < 0)
return (-1) ;
631 if (
fprintf(outfp,
",%c",
bmp->xferMode) < 0)
return (-1) ;
632 if (
fprintf(outfp,
",%d",
bmp->hasUTIME) < 0)
return (-1) ;
634 if (
fprintf(outfp,
"\n") < 0)
return (-1) ;
635 if (
fflush(outfp) < 0)
return (-1);
645 char pathName[256],
path2[256];
670 char pathName[256],
path2[256];
#define kOldBookmarkFileName
static const WCHAR path2[]
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
#define kTmpBookmarkFileName
ACPI_SIZE strlen(const char *String)
#define kPasswordMagicLen
#define kCommandAvailabilityUnknown
char * OurDirectoryPath(char *const dst, const size_t siz, const char *const fname)
#define STRNCPY(dst, src, n)
int GetNextBookmark(FILE *fp, Bookmark *bmp)
BookmarkPtr SearchBookmarkTable(const char *key)
static int BookmarkSortProc(const void *a, const void *b)
#define sprintf(buf, format,...)
char * Strncat(char *const, const char *const, const size_t)
_Check_return_ int __cdecl rename(_In_z_ const char *_OldFilename, _In_z_ const char *_NewFilename)
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
BookmarkPtr gBookmarkTable
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
void BookmarkToURL(BookmarkPtr bmp, char *url, size_t urlsize)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
int SaveBookmarkTable(void)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
static const WCHAR version[]
static int HexCharToNibble(int c)
static int BookmarkSearchProc(const void *key, const void *b)
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
_Check_return_ _CRTIMP int __cdecl _chmod(_In_z_ const char *_Filename, _In_ int _Mode)
void ToBase64(void *dst0, const void *src0, size_t n, int terminate)
char * FGets(char *, size_t, FILE *)
GLboolean GLboolean GLboolean b
int GetBookmark(const char *const bmabbr, Bookmark *bmp)
_CRTIMP int __cdecl getpid(void)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
#define kBookmarkMinVersion
FILE * OpenBookmarkFile(int *numBookmarks0)
#define memcpy(s1, s2, n)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
int LoadBookmarkTable(void)
int PutBookmark(Bookmark *bmp, int savePassword)
void SetBookmarkDefaults(BookmarkPtr bmp)
static int WriteBmLine(Bookmark *bmp, FILE *outfp, int savePassword)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
void FromBase64(void *dst0, const void *src0, size_t n, int terminate)
void CloseBookmarkFile(FILE *fp)
char * Strncpy(char *const, const char *const, const size_t)
int ParseHostLine(char *line, BookmarkPtr bmp)
char * strtok(char *String, const char *Delimiters)
char * strchr(const char *String, int ch)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
void DefaultBookmarkName(char *dst, size_t siz, char *src)
static char * BmEscapeTok(char *dst, size_t dsize, char *src)
GLboolean GLboolean GLboolean GLboolean a
FILE * OpenTmpBookmarkFile(int nb)
#define kBookmarkFileName
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static int SwapBookmarkFiles(void)