version 1.59, 2000/01/24 16:51:49
|
version 1.60, 2000/02/08 16:29:37
|
Line 52 ThotBool WithToC;
|
Line 52 ThotBool WithToC;
|
ThotBool IgnoreCSS; |
ThotBool IgnoreCSS; |
|
|
static struct _SubDoc *SubDocs; |
static struct _SubDoc *SubDocs; |
static CHAR_T PSdir[MAX_PATH]; |
static CharUnit PSdir[MAX_PATH]; |
static CHAR_T PPrinter[MAX_PATH]; |
static CHAR_T PPrinter[MAX_PATH]; |
static Document DocPrint; |
static Document DocPrint; |
static int PaperPrint; |
static int PaperPrint; |
Line 374 static void CheckPrintingDocumen
|
Line 374 static void CheckPrintingDocumen
|
Document document; |
Document document; |
#endif |
#endif |
{ |
{ |
CHAR_T docName[MAX_LENGTH]; |
CharUnit docName[MAX_LENGTH]; |
STRING ptr; |
CharUnit* ptr; |
CHAR_T suffix[MAX_LENGTH]; |
CharUnit suffix[MAX_LENGTH]; |
int lg; |
int lg; |
|
|
if (DocPrint != document) |
if (DocPrint != document) |
Line 387 Document document;
|
Line 387 Document document;
|
/* define the new default PS file */ |
/* define the new default PS file */ |
ptr = TtaGetEnvString ("APP_TMPDIR"); |
ptr = TtaGetEnvString ("APP_TMPDIR"); |
if (ptr != NULL && TtaCheckDirectory (ptr)) |
if (ptr != NULL && TtaCheckDirectory (ptr)) |
ustrcpy(PSdir, ptr); |
StringCopy (PSdir, ptr); |
else |
else |
ustrcpy (PSdir, TtaGetDefEnvString ("APP_TMPDIR")); |
StringCopy (PSdir, TtaGetDefEnvString ("APP_TMPDIR")); |
lg = ustrlen(PSdir); |
lg = StringLength (PSdir); |
if (PSdir[lg - 1] == DIR_SEP) |
if (PSdir[lg - 1] == CUS_DIR_SEP) |
PSdir[--lg] = EOS; |
PSdir[--lg] = CUS_EOS; |
|
|
ustrcpy (docName, TtaGetDocumentName (document)); |
StringCopy (docName, TtaGetDocumentName (document)); |
ExtractSuffix (docName, suffix); |
ExtractSuffix (docName, suffix); |
usprintf (&PSdir[lg], TEXT("%c%s.ps"), DIR_SEP, docName); |
cus_sprintf (&PSdir[lg], CUSTEXT("%c%s.ps"), CUS_DIR_SEP, docName); |
TtaSetPsFile (PSdir); |
TtaSetPsFile (PSdir); |
/* define the new default PrintSchema */ |
/* define the new default PrintSchema */ |
NumberLinks = FALSE; |
NumberLinks = FALSE; |
WithToC = FALSE; |
WithToC = FALSE; |
IgnoreCSS = FALSE; |
IgnoreCSS = FALSE; |
PrintURL = TRUE; |
PrintURL = TRUE; |
TtaSetPrintSchema (_EMPTYSTR_); |
TtaSetPrintSchema (""); |
/* no manual feed */ |
/* no manual feed */ |
ManualFeed = PP_OFF; |
ManualFeed = PP_OFF; |
TtaSetPrintParameter (PP_ManualFeed, ManualFeed); |
TtaSetPrintParameter (PP_ManualFeed, ManualFeed); |
Line 445 Document doc;
|
Line 445 Document doc;
|
properly */ |
properly */ |
SetInternalLinks (DocPrint); |
SetInternalLinks (DocPrint); |
if (PageSize == PP_A4) |
if (PageSize == PP_A4) |
TtaSetPrintSchema (TEXT("HTMLPLP")); |
TtaSetPrintSchema ("HTMLPLP"); |
else |
else |
TtaSetPrintSchema (TEXT("HTMLPLPUS")); |
TtaSetPrintSchema ("HTMLPLPUS"); |
ustrcat (viewsToPrint, TEXT("Links_view ")); |
ustrcat (viewsToPrint, TEXT("Links_view ")); |
} |
} |
else |
else |
Line 455 Document doc;
|
Line 455 Document doc;
|
if (PageSize == PP_A4) |
if (PageSize == PP_A4) |
{ |
{ |
if (textFile) |
if (textFile) |
TtaSetPrintSchema (TEXT("TextFilePP")); |
TtaSetPrintSchema ("TextFilePP"); |
else |
else |
TtaSetPrintSchema (TEXT("HTMLPP")); |
TtaSetPrintSchema ("HTMLPP"); |
} |
} |
else |
else |
{ |
{ |
if (textFile) |
if (textFile) |
TtaSetPrintSchema (TEXT("TextFilePPUS")); |
TtaSetPrintSchema ("TextFilePPUS"); |
else |
else |
TtaSetPrintSchema (TEXT("HTMLPPUS")); |
TtaSetPrintSchema ("HTMLPPUS"); |
} |
} |
} |
} |
/* post or remove the PrintURL attribute */ |
/* post or remove the PrintURL attribute */ |
Line 1077 IncludeCtxt *prev;
|
Line 1077 IncludeCtxt *prev;
|
|
|
/* look for anchors with the attribute rel within the element el */ |
/* look for anchors with the attribute rel within the element el */ |
attr = NULL; |
attr = NULL; |
attrType.AttrSSchema = TtaGetSSchema (TEXT("HTML"), document); |
attrType.AttrSSchema = TtaGetSSchema ("HTML", document); |
elType.ElSSchema = attrType.AttrSSchema; |
elType.ElSSchema = attrType.AttrSSchema; |
elType.ElTypeNum = HTML_EL_Anchor; |
elType.ElTypeNum = HTML_EL_Anchor; |
|
|
Line 1129 IncludeCtxt *prev;
|
Line 1129 IncludeCtxt *prev;
|
/* this link designates an external document */ |
/* this link designates an external document */ |
{ |
{ |
/* create a new document and loads the target document */ |
/* create a new document and loads the target document */ |
IncludedDocument = TtaNewDocument (TEXT("HTML"), TEXT("tmp")); |
IncludedDocument = TtaNewDocument ("HTML", CUSTEXT("tmp")); |
if (IncludedDocument != 0) |
if (IncludedDocument != 0) |
{ |
{ |
TtaSetStatus (document, 1, TtaGetMessage (AMAYA, AM_FETCHING), url); |
TtaSetStatus (document, 1, TtaGetMessage (AMAYA, AM_FETCHING), url); |