version 1.33, 1997/07/02 12:48:47
|
version 1.34, 1997/07/03 12:43:27
|
Line 178 char **file;
|
Line 178 char **file;
|
returns TRUE if path points to an HTML resource. |
returns TRUE if path points to an HTML resource. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
boolean IsHTMLName (char *path) |
boolean IsHTMLName (const char *path) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
boolean IsHTMLName (path) |
boolean IsHTMLName (path) |
char *path; |
const char *path; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
char temppath[MAX_LENGTH]; |
char temppath[MAX_LENGTH]; |
Line 235 char *path;
|
Line 235 char *path;
|
returns TRUE if path points to an image resource. |
returns TRUE if path points to an image resource. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
boolean IsImageName (char *path) |
boolean IsImageName (const char *path) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
boolean IsImageName (path) |
boolean IsImageName (path) |
char *path; |
const char *path; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
char temppath[MAX_LENGTH]; |
char temppath[MAX_LENGTH]; |
Line 271 char *path;
|
Line 271 char *path;
|
IsTextName |
IsTextName |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
boolean IsTextName (char *path) |
boolean IsTextName (const char *path) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
boolean IsTextName (path) |
boolean IsTextName (path) |
char *path; |
const char *path; |
|
|
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
Line 333 char *path;
|
Line 333 char *path;
|
returns TRUE if path is in fact an http URL. |
returns TRUE if path is in fact an http URL. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
boolean IsHTTPPath (char *path) |
boolean IsHTTPPath (const char *path) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
boolean IsHTTPPath (path) |
boolean IsHTTPPath (path) |
char *path; |
const char *path; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
if (!path) |
if (!path) |
Line 352 char *path;
|
Line 352 char *path;
|
returns TRUE if url has a concatenated query string. |
returns TRUE if url has a concatenated query string. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
boolean IsWithParameters (char *url) |
boolean IsWithParameters (const char *url) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
boolean IsWithParameters (url) |
boolean IsWithParameters (url) |
char *url; |
const char *url; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
int i; |
int i; |
Line 377 char *url;
|
Line 377 char *url;
|
returns TRUE if path is in fact a URL. |
returns TRUE if path is in fact a URL. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
boolean IsW3Path (char *path) |
boolean IsW3Path (const char *path) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
boolean IsW3Path (path) |
boolean IsW3Path (path) |
char *path; |
const char *path; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
if ((strncmp (path, "http:", 5)) && (strncmp (path, "ftp:", 4)) && |
if ((strncmp (path, "http:", 5)) && (strncmp (path, "ftp:", 4)) && |
Line 396 char *path;
|
Line 396 char *path;
|
returns true if the url protocol is supported by Amaya. |
returns true if the url protocol is supported by Amaya. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
boolean IsValidProtocol (char *url) |
boolean IsValidProtocol (const char *url) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
boolean IsValidProtocol (url) |
boolean IsValidProtocol (url) |
char *url; |
const char *url; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
if (!strncmp (url, "http:", 5)) |
if (!strncmp (url, "http:", 5)) |
Line 431 Document doc;
|
Line 431 Document doc;
|
ElementType elType; |
ElementType elType; |
AttributeType attrType; |
AttributeType attrType; |
Attribute attr; |
Attribute attr; |
char used_sep; |
char used_sep = URL_SEP; |
char *used_str; |
char *used_str; |
char *ptr, *basename; |
char *ptr, *basename; |
int length; |
int length; |
Line 673 char *docName;
|
Line 673 char *docName;
|
IsSameHost |
IsSameHost |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
boolean IsSameHost (char *url1, char *url2) |
boolean IsSameHost (const char *url1, const char *url2) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
boolean IsSameHost (url1, url2) |
boolean IsSameHost (url1, url2) |
char *path; |
const char *url1; |
|
const char *url2; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
char *basename_ptr1, *basename_ptr2; |
char *basename_ptr1, *basename_ptr2; |
boolean result; |
boolean result; |
|
|
basename_ptr1 = AmayaParseUrl (url1, "", AMAYA_PARSE_ACCESS | AMAYA_PARSE_HOST | AMAYA_PARSE_PUNCTUATION); |
basename_ptr1 = AmayaParseUrl (url1, "", AMAYA_PARSE_ACCESS | AMAYA_PARSE_HOST | AMAYA_PARSE_PUNCTUATION); |
basename_ptr2 = AmayaParseUrl (url2, "", AMAYA_PARSE_ACCESS | AMAYA_PARSE_HOST | AMAYA_PARSE_PUNCTUATION); |
basename_ptr2 = AmayaParseUrl (url2, "", AMAYA_PARSE_ACCESS | AMAYA_PARSE_HOST | AMAYA_PARSE_PUNCTUATION); |
Line 701 char *path;
|
Line 702 char *path;
|
returns TRUE if path points to a file ending with a suffix. |
returns TRUE if path points to a file ending with a suffix. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
boolean HasKnownFileSuffix (char *path) |
boolean HasKnownFileSuffix (const char *path) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
boolean HasKnownFileSuffix (path) |
boolean HasKnownFileSuffix (path) |
char *path; |
const char *path; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
char *root; |
char *root; |
Line 771 char *path;
|
Line 772 char *path;
|
chars. |
chars. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
void ChopURL (char *outputURL, char *inputURL) |
void ChopURL (char *outputURL, const char *inputURL) |
#else |
#else |
void ChopURL (outputURL, inputURL) |
void ChopURL (outputURL, inputURL) |
char *outputURL; |
char *outputURL; |
char *inputURL; |
const char *inputURL; |
#endif |
#endif |
|
|
{ |
{ |
Line 907 HTURI *parts;
|
Line 908 HTURI *parts;
|
returns A pointer to a malloc'd string which MUST BE FREED |
returns A pointer to a malloc'd string which MUST BE FREED |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
char *AmayaParseUrl (char *aName, char *relatedName, int wanted) |
char *AmayaParseUrl (const char *aName, char *relatedName, int wanted) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
char *AmayaParseUrl (aName, relatedName, wanted) |
char *AmayaParseUrl (aName, relatedName, wanted) |
char *aName; |
const char *aName; |
char *relatedName; |
char *relatedName; |
int wanted; |
int wanted; |
|
|
Line 1382 char *relatedName;
|
Line 1383 char *relatedName;
|
char *return_value; |
char *return_value; |
char result[MAX_LENGTH]; |
char result[MAX_LENGTH]; |
char *p; |
char *p; |
char *q = relatedName; |
char *q; |
char *after_access; |
char *after_access; |
char *last_slash = NULL; |
char *last_slash = NULL; |
int slashes, levels, len; |
int slashes, levels, len; |