version 1.205, 2008/02/01 10:15:14
|
version 1.206, 2008/05/07 13:49:04
|
Line 1534 static void CleanCopyFileURL (char *dest
|
Line 1534 static void CleanCopyFileURL (char *dest
|
the name "noname.html". |
the name "noname.html". |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
void NormalizeURL (char *orgName, Document doc, char *newName, |
void NormalizeURL (char *orgName, Document doc, char *newName, |
char *docName, char *otherPath) |
char *docName, const char *otherPath) |
{ |
{ |
char *basename; |
char *basename; |
char tempOrgName[MAX_LENGTH]; |
char tempOrgName[MAX_LENGTH]; |
Line 1903 static void scan (char *name, HTURI *par
|
Line 1903 static void scan (char *name, HTURI *par
|
On exit, |
On exit, |
returns A pointer to a malloc'd string which MUST BE FREED |
returns A pointer to a malloc'd string which MUST BE FREED |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
char *AmayaParseUrl (const char *aName, char *relatedName, int wanted) |
char *AmayaParseUrl (const char *aName, const char *relatedName, int wanted) |
{ |
{ |
char *return_value; |
char *return_value; |
char result[MAX_LENGTH]; |
char result[MAX_LENGTH]; |
Line 1913 char *AmayaParseUrl (const char *aName
|
Line 1913 char *AmayaParseUrl (const char *aName
|
HTURI given, related; |
HTURI given, related; |
int len, l; |
int len, l; |
char used_sep; |
char used_sep; |
char *used_str; |
const char*used_str; |
|
|
if (strchr (aName, DIR_SEP) || strchr (relatedName, DIR_SEP)) |
if (strchr (aName, DIR_SEP) || strchr (relatedName, DIR_SEP)) |
{ |
{ |
Line 1937 char *AmayaParseUrl (const char *aName
|
Line 1937 char *AmayaParseUrl (const char *aName
|
strncpy (rel, relatedName, MAX_LENGTH - 1); |
strncpy (rel, relatedName, MAX_LENGTH - 1); |
rel[MAX_LENGTH - 1] = EOS; |
rel[MAX_LENGTH - 1] = EOS; |
} |
} |
else |
|
relatedName[0] = EOS; |
|
|
|
scan (name, &given); |
scan (name, &given); |
scan (rel, &related); |
scan (rel, &related); |
Line 2480 ThotBool NormalizeFile (char *src, char
|
Line 2478 ThotBool NormalizeFile (char *src, char
|
parsed by AmayaParseUrl relative to relatedName, will yield aName. |
parsed by AmayaParseUrl relative to relatedName, will yield aName. |
The caller is responsible for freeing the resulting name later. |
The caller is responsible for freeing the resulting name later. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
char *MakeRelativeURL (char *aName, char *relatedName) |
char *MakeRelativeURL (const char *aName, const char *relatedName) |
{ |
{ |
char *return_value; |
char *return_value; |
char result[MAX_LENGTH]; |
char result[MAX_LENGTH]; |
char *p; |
const char *p; |
char *q; |
const char *q; |
char *after_access; |
const char *after_access; |
char *last_slash = NULL; |
const char *last_slash = NULL; |
int slashes, levels, len; |
int slashes, levels, len; |
#ifdef _WINDOWS |
#ifdef _WINDOWS |
int ndx; |
int ndx; |
#endif /* _WINDOWS */ |
#endif /* _WINDOWS */ |
Line 2584 char *MakeRelativeURL (char *aName,
|
Line 2582 char *MakeRelativeURL (char *aName,
|
Otherwise, in case of a system error, returns FALSE, with a |
Otherwise, in case of a system error, returns FALSE, with a |
filesize of 0L. |
filesize of 0L. |
---------------------------------------------------------------------*/ |
---------------------------------------------------------------------*/ |
ThotBool AM_GetFileSize (char *filename, unsigned long *file_size) |
ThotBool AM_GetFileSize (const char *filename, unsigned long *file_size) |
{ |
{ |
if (!TtaFileExist (filename)) |
if (!TtaFileExist (filename)) |
return FALSE; |
return FALSE; |