version 1.16, 2001/03/16 12:05:20
|
version 1.17, 2001/03/16 16:40:28
|
Line 29
|
Line 29
|
# define META_TEMPLATE_NAME "AMAYA_TEMPLATE" |
# define META_TEMPLATE_NAME "AMAYA_TEMPLATE" |
#endif /* defined(_I18N_) || defined(__JIS__) */ |
#endif /* defined(_I18N_) || defined(__JIS__) */ |
/* URL of the script providing templates (for reload) */ |
/* URL of the script providing templates (for reload) */ |
static CHAR_T* script_URL; |
static char* script_URL; |
|
|
#include "init_f.h" |
#include "init_f.h" |
|
|
Line 72 Document doc;
|
Line 72 Document doc;
|
ThotBool found = FALSE; |
ThotBool found = FALSE; |
ThotBool ok = FALSE; |
ThotBool ok = FALSE; |
int length; |
int length; |
CHAR_T buffer[MAX_LENGTH]; |
char buffer[MAX_LENGTH]; |
CHAR_T *URLdir; |
char *URLdir; |
CHAR_T *URLname; |
char *URLname; |
|
|
metaElType.ElSSchema = TtaGetDocumentSSchema (doc); |
metaElType.ElSSchema = TtaGetDocumentSSchema (doc); |
metaElType.ElTypeNum = HTML_EL_META; |
metaElType.ElTypeNum = HTML_EL_META; |
Line 92 Document doc;
|
Line 92 Document doc;
|
{ |
{ |
length = MAX_LENGTH - 1; |
length = MAX_LENGTH - 1; |
TtaGiveTextAttributeValue (metaAttr, buffer, &length); |
TtaGiveTextAttributeValue (metaAttr, buffer, &length); |
found = !ustrcmp (buffer, META_TEMPLATE_NAME); |
found = !strcmp (buffer, META_TEMPLATE_NAME); |
} |
} |
} |
} |
} |
} |
Line 118 Document doc;
|
Line 118 Document doc;
|
if (ok) |
if (ok) |
{ |
{ |
if (script_URL == NULL) |
if (script_URL == NULL) |
script_URL = TtaWCSdup (DocumentURLs[doc]); |
script_URL = TtaStrdup (DocumentURLs[doc]); |
TtaFreeMemory (DocumentURLs[doc]); |
TtaFreeMemory (DocumentURLs[doc]); |
DocumentURLs[doc] = TtaWCSdup (buffer); |
DocumentURLs[doc] = TtaStrdup (buffer); |
DocumentMeta[doc]->method = CE_TEMPLATE; |
DocumentMeta[doc]->method = CE_TEMPLATE; |
TtaSetTextZone (doc, 1, 1, DocumentURLs[doc]); |
TtaSetTextZone (doc, 1, 1, DocumentURLs[doc]); |
TtaSetDocumentUnmodified (doc); |
TtaSetDocumentUnmodified (doc); |
Line 134 Document doc;
|
Line 134 Document doc;
|
|
|
/* set the document name and dir */ |
/* set the document name and dir */ |
|
|
URLname = ustrrchr (buffer, URL_SEP); |
URLname = strrchr (buffer, URL_SEP); |
if (URLname) |
if (URLname) |
{ |
{ |
URLname[0] = EOS; |
URLname[0] = EOS; |
Line 159 Document doc;
|
Line 159 Document doc;
|
to reload a template |
to reload a template |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef __STDC__ |
#ifdef __STDC__ |
void ReloadTemplateParams (CHAR_T **docURL, ClickEvent *method) |
void ReloadTemplateParams (char **docURL, ClickEvent *method) |
#else /* __STDC__ */ |
#else /* __STDC__ */ |
void ReloadTemplateParams (docURL, method) |
void ReloadTemplateParams (docURL, method) |
CHAR_T **docURL; |
char **docURL; |
ClickEvent *method; |
ClickEvent *method; |
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
*method = CE_FORM_GET; |
*method = CE_FORM_GET; |
TtaFreeMemory (*docURL); |
TtaFreeMemory (*docURL); |
*docURL = TtaWCSdup (script_URL); |
*docURL = TtaStrdup (script_URL); |
} |
} |