diff options
Diffstat (limited to 'WWW/Library/Implementation')
33 files changed, 895 insertions, 891 deletions
diff --git a/WWW/Library/Implementation/HTAABrow.c b/WWW/Library/Implementation/HTAABrow.c index 0f72cc71..8520e626 100644 --- a/WWW/Library/Implementation/HTAABrow.c +++ b/WWW/Library/Implementation/HTAABrow.c @@ -340,29 +340,29 @@ PRIVATE HTAASetup *HTAASetup_lookup ARGS4( HTList *cur = server->setups; - CTRACE(tfp, "%s %s (%s:%d:%s)\n", + CTRACE((tfp, "%s %s (%s:%d:%s)\n", "HTAASetup_lookup: resolving setup for", (IsProxy ? "proxy" : "server"), - hostname, portnumber, docname); + hostname, portnumber, docname)); while (NULL != (setup = (HTAASetup*)HTList_nextObject(cur))) { if (HTAA_templateMatch(setup->template, docname)) { - CTRACE(tfp, "%s `%s' %s `%s'\n", + CTRACE((tfp, "%s `%s' %s `%s'\n", "HTAASetup_lookup:", docname, - "matched template", setup->template); + "matched template", setup->template)); return setup; } else { - CTRACE(tfp, "%s `%s' %s `%s'\n", + CTRACE((tfp, "%s `%s' %s `%s'\n", "HTAASetup_lookup:", docname, - "did NOT match template", setup->template); + "did NOT match template", setup->template)); } } /* while setups remain */ } /* if valid parameters and server found */ - CTRACE(tfp, "%s `%s' %s\n", + CTRACE((tfp, "%s `%s' %s\n", "HTAASetup_lookup: No template matched", (docname ? docname : "(null)"), - "(so probably not protected)"); + "(so probably not protected)")); return NULL; /* NULL in parameters, or not found */ } @@ -601,9 +601,9 @@ PRIVATE char *compose_auth_string ARGS3( realm->username && *realm->username && realm->password) || setup->retry) { if (!realm) { - CTRACE(tfp, "%s `%s' %s\n", + CTRACE((tfp, "%s `%s' %s\n", "compose_auth_string: realm:", realmname, - "not found -- creating"); + "not found -- creating")); realm = HTAARealm_new(setup->server->realms, realmname, NULL, NULL); } @@ -853,8 +853,8 @@ PUBLIC char *HTAA_composeAuth ARGS4( ** on server-side. Life is hard.) */ if (HTAAForwardAuth) { - CTRACE(tfp, "HTAA_composeAuth: %s\n", - "Forwarding received authorization"); + CTRACE((tfp, "HTAA_composeAuth: %s\n", + "Forwarding received authorization")); StrAllocCopy(HTAA_composeAuthResult, HTAAForwardAuth); HTAAForwardAuth_reset(); /* Just a precaution */ return HTAA_composeAuthResult; @@ -867,8 +867,8 @@ PUBLIC char *HTAA_composeAuth ARGS4( ** Proxy Authorization required. - AJL */ - CTRACE(tfp, "Composing Proxy Authorization for %s:%d/%s\n", - hostname, portnumber, docname); + CTRACE((tfp, "Composing Proxy Authorization for %s:%d/%s\n", + hostname, portnumber, docname)); if (proxy_portnumber != portnumber || !proxy_hostname || !proxy_docname || @@ -942,8 +942,8 @@ PUBLIC char *HTAA_composeAuth ARGS4( /* ** Normal WWW authorization. */ - CTRACE(tfp, "Composing Authorization for %s:%d/%s\n", - hostname, portnumber, docname); + CTRACE((tfp, "Composing Authorization for %s:%d/%s\n", + hostname, portnumber, docname)); if (current_portnumber != portnumber || !current_hostname || !current_docname || @@ -1076,11 +1076,11 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS4( /* ** Read server reply header lines */ - CTRACE(tfp, "Server reply header lines:\n"); + CTRACE((tfp, "Server reply header lines:\n")); HTAA_setupReader(start_of_headers, length, soc); while (NULL != (line = HTAA_getUnfoldedLine()) && *line != '\0') { - CTRACE(tfp, "%s\n", line); + CTRACE((tfp, "%s\n", line)); if (strchr(line, ':')) { /* Valid header line */ @@ -1116,23 +1116,23 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS4( scheme_specifics[scheme] = HTAA_parseArgList(args); num_schemes++; } else { - CTRACE(tfp, "Unknown scheme `%s' %s\n", + CTRACE((tfp, "Unknown scheme `%s' %s\n", (arg1 ? arg1 : "(null)"), (IsProxy ? "in Proxy-Authenticate: field" : - "in WWW-Authenticate: field")); + "in WWW-Authenticate: field"))); } } else if (!IsProxy && 0==strcasecomp(fieldname, "WWW-Protection-Template:")) { - CTRACE(tfp, "Protection template set to `%s'\n", arg1); + CTRACE((tfp, "Protection template set to `%s'\n", arg1)); StrAllocCopy(template, arg1); } } /* if a valid header line */ else { - CTRACE(tfp, "Invalid header line `%s' ignored\n", line); + CTRACE((tfp, "Invalid header line `%s' ignored\n", line)); } /* else invalid header line */ FREE(line); diff --git a/WWW/Library/Implementation/HTAAProt.c b/WWW/Library/Implementation/HTAAProt.c index 4f231974..b36dfd02 100644 --- a/WWW/Library/Implementation/HTAAProt.c +++ b/WWW/Library/Implementation/HTAAProt.c @@ -268,15 +268,15 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot, if (!prot->valid_schemes) prot->valid_schemes = HTList_new(); HTList_addObject(prot->valid_schemes,(void*)scheme); - CTRACE(tfp, "%s %s `%s'\n", + CTRACE((tfp, "%s %s `%s'\n", "HTAA_parseProtFile: valid", "authentication scheme:", - HTAAScheme_name(scheme)); + HTAAScheme_name(scheme))); } else { - CTRACE(tfp, "%s %s `%s'\n", + CTRACE((tfp, "%s %s `%s'\n", "HTAA_parseProtFile: unknown", "authentication scheme:", - HTlex_buffer); + HTlex_buffer)); } if (LEX_ITEM_SEP != (lex_item = lex(fp))) @@ -311,19 +311,19 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot, prot->values = HTAssocList_new(); HTAssocList_add(prot->values, fieldname, HTlex_buffer); lex_item = lex(fp); /* Read record separator */ - CTRACE(tfp, "%s `%s' bound to value `%s'\n", + CTRACE((tfp, "%s `%s' bound to value `%s'\n", "HTAA_parseProtFile: Name", - fieldname, HTlex_buffer); + fieldname, HTlex_buffer)); } } /* else name-value pair */ } /* if valid field */ if (lex_item != LEX_EOF && lex_item != LEX_REC_SEP) { - CTRACE(tfp, "%s %s %d (that line ignored)\n", + CTRACE((tfp, "%s %s %d (that line ignored)\n", "HTAA_parseProtFile: Syntax error", "in protection setup file at line", - HTlex_line); + HTlex_line)); do { lex_item = lex(fp); } while (lex_item != LEX_EOF && lex_item != LEX_REC_SEP); @@ -378,11 +378,11 @@ PRIVATE HTAAProt *HTAAProt_new ARGS3(CONST char *, cur_docname, } if (cache_item) { prot = cache_item->prot; - CTRACE(tfp, "%s `%s' already in cache\n", - "HTAAProt_new: Protection file", prot_filename); + CTRACE((tfp, "%s `%s' already in cache\n", + "HTAAProt_new: Protection file", prot_filename)); } else { - CTRACE(tfp, "HTAAProt_new: Loading protection file `%s'\n", - prot_filename); + CTRACE((tfp, "HTAAProt_new: Loading protection file `%s'\n", + prot_filename)); if (!(prot = (HTAAProt*)calloc(1, sizeof(HTAAProt)))) outofmem(__FILE__, "HTAAProt_new"); @@ -406,9 +406,9 @@ PRIVATE HTAAProt *HTAAProt_new ARGS3(CONST char *, cur_docname, StrAllocCopy(cache_item->prot_filename, prot_filename); HTList_addObject(prot_cache, (void*)cache_item); } else { - CTRACE(tfp, "HTAAProt_new: %s `%s'\n", + CTRACE((tfp, "HTAAProt_new: %s `%s'\n", "Unable to open protection setup file", - (prot_filename ? prot_filename : "(null)")); + (prot_filename ? prot_filename : "(null)"))); } } @@ -448,9 +448,9 @@ PUBLIC void HTAA_setDefaultProtection ARGS3(CONST char *, cur_docname, if (prot_filename) { default_prot = HTAAProt_new(cur_docname, prot_filename, ids); } else { - CTRACE(tfp, "%s %s\n", + CTRACE((tfp, "%s %s\n", "HTAA_setDefaultProtection: ERROR: Protection file", - "not specified (obligatory for DefProt rule)!!\n"); + "not specified (obligatory for DefProt rule)!!\n")); } } @@ -486,15 +486,15 @@ PUBLIC void HTAA_setCurrentProtection ARGS3(CONST char *, cur_docname, if (default_prot) { current_prot = default_prot; HTAA_setIds(current_prot, ids); - CTRACE(tfp, "%s %s %s\n", + CTRACE((tfp, "%s %s %s\n", "HTAA_setCurrentProtection: Protection file", "not specified for Protect rule", - "-- using default protection"); + "-- using default protection")); } else { - CTRACE(tfp, "%s %s %s\n", + CTRACE((tfp, "%s %s %s\n", "HTAA_setCurrentProtection: ERROR: Protection", "file not specified for Protect rule, and", - "default protection is not set!!"); + "default protection is not set!!")); } } } @@ -664,10 +664,10 @@ PUBLIC char * HTAA_UidToName ARGS1(int, uid) if ((pw = getpwuid(uid)) != 0 && pw->pw_name != 0) { - CTRACE(tfp, "%s(%d) returned (%s:%d:...)\n", + CTRACE((tfp, "%s(%d) returned (%s:%d:...)\n", "HTAA_UidToName: getpwuid", uid, - pw->pw_name, (int) pw->pw_uid); + pw->pw_name, (int) pw->pw_uid)); save_uid_info(pw->pw_name, (int) pw->pw_uid); return pw->pw_name; } @@ -696,10 +696,10 @@ PUBLIC int HTAA_NameToUid ARGS1(char *, name) } if ((pw = getpwnam(name)) != 0) { - CTRACE(tfp, "%s(%s) returned (%s:%d:...)\n", + CTRACE((tfp, "%s(%s) returned (%s:%d:...)\n", "HTAA_NameToUid: getpwnam", name, - pw->pw_name, (int) pw->pw_uid); + pw->pw_name, (int) pw->pw_uid)); save_uid_info(pw->pw_name, (int) pw->pw_uid); return (int) pw->pw_uid; } @@ -729,10 +729,10 @@ PUBLIC char * HTAA_GidToName ARGS1(int, gid) if ((gr = getgrgid(gid)) != 0 && gr->gr_name != 0) { - CTRACE(tfp, "%s(%d) returned (%s:%d:...)\n", + CTRACE((tfp, "%s(%d) returned (%s:%d:...)\n", "HTAA_GidToName: getgrgid", gid, - gr->gr_name, (int) gr->gr_gid); + gr->gr_name, (int) gr->gr_gid)); save_gid_info(gr->gr_name, (int) gr->gr_gid); return gr->gr_name; } @@ -761,10 +761,10 @@ PUBLIC int HTAA_NameToGid ARGS1(char *, name) } if ((gr = getgrnam(name)) != 0) { - CTRACE(tfp, "%s(%s) returned (%s:%d:...)\n", + CTRACE((tfp, "%s(%s) returned (%s:%d:...)\n", "HTAA_NameToGid: getgrnam", name, - gr->gr_name, (int) gr->gr_gid); + gr->gr_name, (int) gr->gr_gid)); save_gid_info(gr->gr_name, (int) gr->gr_gid); return (int) gr->gr_gid; } diff --git a/WWW/Library/Implementation/HTAAUtil.c b/WWW/Library/Implementation/HTAAUtil.c index 757f42df..ecfb04e1 100644 --- a/WWW/Library/Implementation/HTAAUtil.c +++ b/WWW/Library/Implementation/HTAAUtil.c @@ -191,7 +191,7 @@ PUBLIC BOOL HTAAMethod_inList ARGS2(HTAAMethod, method, char *item; while (NULL != (item = (char*)HTList_nextObject(cur))) { - CTRACE(tfp, " %s", item); + CTRACE((tfp, " %s", item)); if (method == HTAAMethod_enum(item)) return YES; } @@ -340,8 +340,8 @@ PUBLIC char *HTAA_makeProtectionTemplate ARGS1(CONST char *, docname) else StrAllocCopy(template, "*"); - CTRACE(tfp, "make_template: made template `%s' for file `%s'\n", - template, docname); + CTRACE((tfp, "make_template: made template `%s' for file `%s'\n", + template, docname)); return template; } @@ -544,9 +544,9 @@ PUBLIC char *HTAA_getUnfoldedLine NOARGS BOOL peek_for_folding = NO; if (in_soc < 0) { - CTRACE(tfp, "%s %s\n", + CTRACE((tfp, "%s %s\n", "HTAA_getUnfoldedLine: buffer not initialized", - "with function HTAA_setupReader()"); + "with function HTAA_setupReader()")); return NULL; } diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c index f9035290..6391cceb 100644 --- a/WWW/Library/Implementation/HTAccess.c +++ b/WWW/Library/Implementation/HTAccess.c @@ -409,7 +409,7 @@ PRIVATE int get_physical ARGS2( } if (anchor->isISMAPScript == TRUE) { StrAllocCat(physical, "?0,0"); - CTRACE(tfp, "HTAccess: Appending '?0,0' coordinate pair.\n"); + CTRACE((tfp, "HTAccess: Appending '?0,0' coordinate pair.\n")); } if (!strncmp(physical, "Proxied=", 8)) { HTAnchor_setPhysical(anchor, physical + 8); @@ -425,7 +425,7 @@ PRIVATE int get_physical ARGS2( if (anchor->isISMAPScript == TRUE) { StrAllocCopy(physical, addr); StrAllocCat(physical, "?0,0"); - CTRACE(tfp, "HTAccess: Appending '?0,0' coordinate pair.\n"); + CTRACE((tfp, "HTAccess: Appending '?0,0' coordinate pair.\n")); HTAnchor_setPhysical(anchor, physical); FREE(physical); /* free our copy */ } else { @@ -518,9 +518,9 @@ PRIVATE int get_physical ARGS2( FREE(gateway_parameter); if (gateway) - CTRACE(tfp, "Gateway found: %s\n", gateway); + CTRACE((tfp, "Gateway found: %s\n", gateway)); if (proxy) - CTRACE(tfp, "proxy server found: %s\n", proxy); + CTRACE((tfp, "proxy server found: %s\n", proxy)); /* ** Proxy servers have precedence over gateway servers. @@ -623,9 +623,9 @@ PUBLIC void LYUCPushAssumed ARGS1( pushed_assume_LYhndl = anchor_LYhndl; /* some diagnostics */ if (UCLYhndl_for_unspec != anchor_LYhndl) - CTRACE(tfp, "LYUCPushAssumed: UCLYhndl_for_unspec changed %d -> %d\n", + CTRACE((tfp, "LYUCPushAssumed: UCLYhndl_for_unspec changed %d -> %d\n", UCLYhndl_for_unspec, - anchor_LYhndl); + anchor_LYhndl)); UCLYhndl_for_unspec = anchor_LYhndl; return; } @@ -644,9 +644,9 @@ PUBLIC int LYUCPopAssumed NOARGS if (pushed_assume_LYhndl >= 0) { /* some diagnostics */ if (UCLYhndl_for_unspec != pushed_assume_LYhndl) - CTRACE(tfp, "LYUCPopAssumed: UCLYhndl_for_unspec changed %d -> %d\n", + CTRACE((tfp, "LYUCPopAssumed: UCLYhndl_for_unspec changed %d -> %d\n", UCLYhndl_for_unspec, - pushed_assume_LYhndl); + pushed_assume_LYhndl)); UCLYhndl_for_unspec = pushed_assume_LYhndl; pushed_assume_LYhndl = -1; FREE(UCAssume_MIMEcharset); @@ -747,7 +747,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( char *cp; BOOL ForcingNoCache = LYforce_no_cache; - CTRACE (tfp, "HTAccess: loading document %s\n", address_to_load); + CTRACE((tfp, "HTAccess: loading document %s\n", address_to_load)); /* ** Free use_this_url_instead and reset permanent_redirection @@ -803,9 +803,9 @@ PRIVATE BOOL HTLoadDocument ARGS4( !strncmp(cp, "Location=", 9)) { DocAddress NewDoc; - CTRACE (tfp, "HTAccess: '%s' is a redirection URL.\n", - anchor->address); - CTRACE (tfp, "HTAccess: Redirecting to '%s'\n", cp+9); + CTRACE((tfp, "HTAccess: '%s' is a redirection URL.\n", + anchor->address)); + CTRACE((tfp, "HTAccess: Redirecting to '%s'\n", cp+9)); /* ** Don't exceed the redirection_attempts limit. - FM @@ -903,7 +903,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( strncmp(full_address, "LYNXIMGMAP:", 11))) #endif /* TRACK_INTERNAL_LINKS */ { - CTRACE(tfp, "HTAccess: Document already in memory.\n"); + CTRACE((tfp, "HTAccess: Document already in memory.\n")); HText_select(text); #ifdef DIRED_SUPPORT @@ -914,7 +914,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( return YES; } else { ForcingNoCache = YES; - CTRACE(tfp, "HTAccess: Auto-reloading document.\n"); + CTRACE((tfp, "HTAccess: Auto-reloading document.\n")); } } @@ -929,7 +929,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( FREE(anchor->title); } status = HTLoad(address_to_load, anchor, format_out, sink); - CTRACE(tfp, "HTAccess: status=%d\n", status); + CTRACE((tfp, "HTAccess: status=%d\n", status)); /* ** Log the access if necessary. @@ -943,11 +943,11 @@ PRIVATE BOOL HTLoadDocument ARGS4( status < 0 ? "FAIL" : "GET", full_address); fflush(HTlogfile); /* Actually update it on disk */ - CTRACE(tfp, "Log: %24.24s %s %s %s\n", + CTRACE((tfp, "Log: %24.24s %s %s %s\n", ctime(&theTime), HTClientHost ? HTClientHost : "local", status < 0 ? "FAIL" : "GET", - full_address); + full_address)); } /* @@ -972,10 +972,10 @@ PRIVATE BOOL HTLoadDocument ARGS4( ** in LYGetFile.c when the status is HT_REDIRECTING. This may ** seem bizarre, but it works like a charm! - FM */ - CTRACE(tfp, "HTAccess: '%s' is a redirection URL.\n", - address_to_load); - CTRACE(tfp, "HTAccess: Redirecting to '%s'\n", - redirecting_url); + CTRACE((tfp, "HTAccess: '%s' is a redirection URL.\n", + address_to_load)); + CTRACE((tfp, "HTAccess: Redirecting to '%s'\n", + redirecting_url)); /* ** Prevent circular references. */ @@ -1015,32 +1015,32 @@ PRIVATE BOOL HTLoadDocument ARGS4( permanent_redirection = FALSE; if (status == HT_LOADED) { - CTRACE(tfp, "HTAccess: `%s' has been accessed.\n", - full_address); + CTRACE((tfp, "HTAccess: `%s' has been accessed.\n", + full_address)); return YES; } if (status == HT_PARTIAL_CONTENT) { HTAlert(gettext("Loading incomplete.")); - CTRACE(tfp, "HTAccess: `%s' has been accessed, partial content.\n", - full_address); + CTRACE((tfp, "HTAccess: `%s' has been accessed, partial content.\n", + full_address)); return YES; } if (status == HT_NO_DATA) { - CTRACE(tfp, "HTAccess: `%s' has been accessed, No data left.\n", - full_address); + CTRACE((tfp, "HTAccess: `%s' has been accessed, No data left.\n", + full_address)); return NO; } if (status == HT_NOT_LOADED) { - CTRACE(tfp, "HTAccess: `%s' has been accessed, No data loaded.\n", - full_address); + CTRACE((tfp, "HTAccess: `%s' has been accessed, No data loaded.\n", + full_address)); return NO; } if (status == HT_INTERRUPTED) { - CTRACE(tfp, "HTAccess: `%s' has been accessed, transfer interrupted.\n", - full_address); + CTRACE((tfp, "HTAccess: `%s' has been accessed, transfer interrupted.\n", + full_address)); return NO; } @@ -1066,7 +1066,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( _HTProgress(cp); FREE(cp); - CTRACE(tfp, "HTAccess: Can't access `%s'\n", full_address); + CTRACE((tfp, "HTAccess: Can't access `%s'\n", full_address)); HTLoadError(sink, 500, gettext("Unable to access document.")); return NO; } /* HTLoadDocument */ @@ -1389,8 +1389,8 @@ PUBLIC HTParentAnchor * HTHomeAnchor NOARGS if (fp) { fclose(fp); } else { - CTRACE(tfp, "HTBrowse: No local home document ~/%s or %s\n", - PERSONAL_DEFAULT, LOCAL_DEFAULT_FILE); + CTRACE((tfp, "HTBrowse: No local home document ~/%s or %s\n", + PERSONAL_DEFAULT, LOCAL_DEFAULT_FILE)); FREE(my_home_document); } } @@ -1401,8 +1401,8 @@ PUBLIC HTParentAnchor * HTHomeAnchor NOARGS "file:", PARSE_ACCESS|PARSE_HOST|PARSE_PATH|PARSE_PUNCTUATION); if (my_home_document) { - CTRACE(tfp, "HTAccess: Using custom home page %s i.e., address %s\n", - my_home_document, ref); + CTRACE((tfp, "HTAccess: Using custom home page %s i.e., address %s\n", + my_home_document, ref)); FREE(my_home_document); } anchor = (HTParentAnchor*)HTAnchor_findAddress(ref); diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c index 8e9d0c61..e2dfa964 100644 --- a/WWW/Library/Implementation/HTAnchor.c +++ b/WWW/Library/Implementation/HTAnchor.c @@ -187,7 +187,7 @@ PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2( HTList *kids; if (!parent) { - CTRACE(tfp, "HTAnchor_findChild called with NULL parent.\n"); + CTRACE((tfp, "HTAnchor_findChild called with NULL parent.\n")); return(NULL); } if ((kids = parent->children) != 0) { @@ -202,8 +202,8 @@ PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2( if (HTIdentical(child->tag, tag)) /* Case sensitive - FM */ #endif /* CASE_INSENSITIVE_ANCHORS */ { - CTRACE(tfp, "Child anchor %p of parent %p with name `%s' already exists.\n", - (void *)child, (void *)parent, tag); + CTRACE((tfp, "Child anchor %p of parent %p with name `%s' already exists.\n", + (void *)child, (void *)parent, tag)); return(child); } } @@ -213,10 +213,10 @@ PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2( } child = HTChildAnchor_new(); - CTRACE(tfp, "HTAnchor: New Anchor %p named `%s' is child of %p\n", + CTRACE((tfp, "HTAnchor: New Anchor %p named `%s' is child of %p\n", (void *)child, tag ? tag : (CONST char *)"", - (void *)parent); /* int for apollo */ + (void *)parent)); /* int for apollo */ HTList_addObject (parent->children, child); child->parent = parent; StrAllocCopy(child->tag, tag); @@ -239,7 +239,7 @@ PUBLIC HTChildAnchor * HTAnchor_findChildAndLink ARGS4( { HTChildAnchor * child = HTAnchor_findChild(parent, tag); - CTRACE(tfp,"Entered HTAnchor_findChildAndLink\n"); + CTRACE((tfp,"Entered HTAnchor_findChildAndLink\n")); if (href && *href) { char *relative_to = HTAnchor_address((HTAnchor *)parent); @@ -273,15 +273,15 @@ PUBLIC HTChildAnchor * HTAnchor_findChildAndLink ARGS4( testdest1 = child->mainLink.dest; if (testdest1) { nlinks = 1 + HTList_count(child->links); - CTRACE(tfp, + CTRACE((tfp, "*** Duplicate ChildAnchor %p named `%s' with %d links", - child, tag, nlinks); + child, tag, nlinks)); if (dest == testdest1 && ltype == child->mainLink.type) { - CTRACE(tfp,", same dest %p and type, keeping it\n", - testdest1); + CTRACE((tfp,", same dest %p and type, keeping it\n", + testdest1)); } else { - CTRACE(tfp,", different dest %p, creating unnamed child\n", - testdest1); + CTRACE((tfp,", different dest %p, creating unnamed child\n", + testdest1)); child = HTAnchor_findChild(parent, 0); } } @@ -318,11 +318,11 @@ PRIVATE void free_adult_table NOARGS adult_table[i_counter] = HTAp_freeme->next; if (HTAp_freeme->object) { parent = (HTParentAnchor *)HTAp_freeme->object; - CTRACE(tfp, "delete anchor:%d/%d,%d,%d %s\n", + CTRACE((tfp, "delete anchor:%d/%d,%d,%d %s\n", i_counter, HTList_count(HTAp_freeme) + 1, (parent->physical ? 1 : 0), (int)parent->underway, - (parent->address ? parent->address : "(no address)")); + (parent->address ? parent->address : "(no address)"))); parent->underway = FALSE; HTAnchor_delete(parent); } @@ -347,7 +347,7 @@ PUBLIC HTAnchor * HTAnchor_findAddress ARGS1( /* Anchor tag specified ? */ char *tag = HTParse(newdoc->address, "", PARSE_ANCHOR); - CTRACE(tfp,"Entered HTAnchor_findAddress\n"); + CTRACE((tfp,"Entered HTAnchor_findAddress\n")); /* ** If the address represents a sub-anchor, we recursively load its @@ -415,8 +415,8 @@ PUBLIC HTAnchor * HTAnchor_findAddress ARGS1( foundAnchor->isHEAD == newdoc->isHEAD) #endif /* CASE_INSENSITIVE_ANCHORS */ { - CTRACE(tfp, "Anchor %p with address `%s' already exists.\n", - (void *)foundAnchor, newdoc->address); + CTRACE((tfp, "Anchor %p with address `%s' already exists.\n", + (void *)foundAnchor, newdoc->address)); return (HTAnchor *)foundAnchor; } } @@ -425,8 +425,8 @@ PUBLIC HTAnchor * HTAnchor_findAddress ARGS1( ** Node not found: create new anchor. */ foundAnchor = HTParentAnchor_new(); - CTRACE(tfp, "New anchor %p has hash %d and address `%s'\n", - (void *)foundAnchor, hash, newdoc->address); + CTRACE((tfp, "New anchor %p has hash %d and address `%s'\n", + (void *)foundAnchor, hash, newdoc->address)); StrAllocCopy(foundAnchor->address, newdoc->address); if (newdoc->post_data) StrAllocCopy(foundAnchor->post_data, newdoc->post_data); @@ -708,14 +708,14 @@ PUBLIC BOOL HTAnchor_delete ARGS1( * Clean up the source cache, if any. */ if (me->source_cache_file) { - CTRACE(tfp, "Removing source cache file %s\n", - me->source_cache_file); + CTRACE((tfp, "Removing source cache file %s\n", + me->source_cache_file)); LYRemoveTemp(me->source_cache_file); FREE(me->source_cache_file); } if (me->source_cache_chunk) { - CTRACE(tfp, "Removing memory source cache %p\n", - (void *)me->source_cache_chunk); + CTRACE((tfp, "Removing memory source cache %p\n", + (void *)me->source_cache_chunk)); HTChunkFree(me->source_cache_chunk); } #endif @@ -943,12 +943,12 @@ PUBLIC void HTAnchor_setTitle ARGS2( } } } else { - CTRACE(tfp,"HTAnchor_setTitle: New title is NULL! "); + CTRACE((tfp,"HTAnchor_setTitle: New title is NULL! ")); if (me->title) { - CTRACE(tfp,"Old title was \"%s\".\n", me->title); + CTRACE((tfp,"Old title was \"%s\".\n", me->title)); FREE(me->title); } else { - CTRACE(tfp,"Old title was NULL.\n"); + CTRACE((tfp,"Old title was NULL.\n")); } } } @@ -1153,7 +1153,7 @@ PUBLIC BOOL HTAnchor_link ARGS3( { if (!(source && destination)) return(NO); /* Can't link to/from non-existing anchor */ - CTRACE(tfp, "Linking anchor %p to anchor %p\n", source, destination); + CTRACE((tfp, "Linking anchor %p to anchor %p\n", source, destination)); if (!source->mainLink.dest) { source->mainLink.dest = destination; source->mainLink.type = type; diff --git a/WWW/Library/Implementation/HTAssoc.c b/WWW/Library/Implementation/HTAssoc.c index 05b631cd..8e16e761 100644 --- a/WWW/Library/Implementation/HTAssoc.c +++ b/WWW/Library/Implementation/HTAssoc.c @@ -62,7 +62,7 @@ PUBLIC void HTAssocList_add ARGS3(HTAssocList *, alist, StrAllocCopy(assoc->value, value); HTList_addObject(alist, (void*)assoc); } else { - CTRACE(tfp, "HTAssoc_add: ERROR: assoc list NULL!!\n"); + CTRACE((tfp, "HTAssoc_add: ERROR: assoc list NULL!!\n")); } } diff --git a/WWW/Library/Implementation/HTAtom.c b/WWW/Library/Implementation/HTAtom.c index 44ac6c7a..f2cfdffc 100644 --- a/WWW/Library/Implementation/HTAtom.c +++ b/WWW/Library/Implementation/HTAtom.c @@ -67,7 +67,7 @@ PUBLIC HTAtom * HTAtom_for ARGS1(CONST char *, string) */ for (a = hash_table[hash]; a; a = a->next) { if (0 == strcasecomp(a->name, string)) { - /* CTRACE(tfp, "HTAtom: Old atom %p for `%s'\n", a, string); */ + /* CTRACE((tfp, "HTAtom: Old atom %p for `%s'\n", a, string)); */ return a; /* Found: return it */ } } @@ -84,7 +84,7 @@ PUBLIC HTAtom * HTAtom_for ARGS1(CONST char *, string) a->next = hash_table[hash]; /* Put onto the head of list */ hash_table[hash] = a; #ifdef NOT_DEFINED - CTRACE(tfp, "HTAtom: New atom %p for `%s'\n", a, string); + CTRACE((tfp, "HTAtom: New atom %p for `%s'\n", a, string)); #endif /* NOT_DEFINED */ return a; } diff --git a/WWW/Library/Implementation/HTDOS.c b/WWW/Library/Implementation/HTDOS.c index a1b5cb4b..22d2cf5c 100644 --- a/WWW/Library/Implementation/HTDOS.c +++ b/WWW/Library/Implementation/HTDOS.c @@ -101,7 +101,7 @@ char * HTDOS_name ARGS1(char *, wwwname) char *result, *ret; int joe; - CTRACE(tfp, "HTDOS_name changed `%s'\n", wwwname); + CTRACE((tfp, "HTDOS_name changed `%s'\n", wwwname)); copy_plus(&cp_url, wwwname); for (joe = 0; cp_url[joe] != '\0'; joe++) { @@ -137,7 +137,7 @@ char * HTDOS_name ARGS1(char *, wwwname) ret = result; #endif - CTRACE(tfp, "HTDOS_name changed `%s' to `%s'\n", wwwname, ret); + CTRACE((tfp, "HTDOS_name changed `%s' to `%s'\n", wwwname, ret)); return (ret); } diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c index 1ba32c2f..4ae5d9b6 100644 --- a/WWW/Library/Implementation/HTFTP.c +++ b/WWW/Library/Implementation/HTFTP.c @@ -340,7 +340,7 @@ PRIVATE int close_connection ARGS1( connection * scan; int status = NETCLOSE(con->socket); if (TRACE) { - CTRACE(tfp, "HTFTP: Closing control socket %d\n", con->socket); + CTRACE((tfp, "HTFTP: Closing control socket %d\n", con->socket)); #ifdef UNIX if (status != 0) perror("HTFTP:close_connection"); @@ -377,7 +377,7 @@ PRIVATE void help_message_cache_add ARGS1( else StrAllocCopy(help_message_buffer, string); - CTRACE(tfp,"Adding message to help cache: %s\n",string); + CTRACE((tfp,"Adding message to help cache: %s\n",string)); } PRIVATE char *help_message_cache_non_empty NOARGS @@ -418,12 +418,12 @@ PRIVATE int response ARGS1( int status; if (!control) { - CTRACE(tfp, "HTFTP: No control connection set up!!\n"); + CTRACE((tfp, "HTFTP: No control connection set up!!\n")); return -99; } if (cmd) { - CTRACE(tfp, " Tx: %s", cmd); + CTRACE((tfp, " Tx: %s", cmd)); #ifdef NOT_ASCII { char * p; @@ -434,8 +434,8 @@ PRIVATE int response ARGS1( #endif /* NOT_ASCII */ status = NETWRITE(control->socket, cmd, (int)strlen(cmd)); if (status < 0) { - CTRACE(tfp, "HTFTP: Error %d sending command: closing socket %d\n", - status, control->socket); + CTRACE((tfp, "HTFTP: Error %d sending command: closing socket %d\n", + status, control->socket)); close_connection(control); return status; } @@ -451,14 +451,14 @@ PRIVATE int response ARGS1( char continuation; if (interrupted_in_htgetcharacter) { - CTRACE (tfp, "HTFTP: Interrupted in HTGetCharacter, apparently.\n"); + CTRACE((tfp, "HTFTP: Interrupted in HTGetCharacter, apparently.\n")); NETCLOSE (control->socket); control->socket = -1; return HT_INTERRUPTED; } *p = '\0'; /* Terminate the string */ - CTRACE(tfp, " Rx: %s", response_text); + CTRACE((tfp, " Rx: %s", response_text)); /* Check for login or help messages */ if (!strncmp(response_text,"230-",4) || @@ -479,15 +479,15 @@ PRIVATE int response ARGS1( } /* if end of line */ if (interrupted_in_htgetcharacter) { - CTRACE (tfp, "HTFTP: Interrupted in HTGetCharacter, apparently.\n"); + CTRACE((tfp, "HTFTP: Interrupted in HTGetCharacter, apparently.\n")); NETCLOSE (control->socket); control->socket = -1; return HT_INTERRUPTED; } if (ich == EOF) { - CTRACE(tfp, "Error on rx: closing socket %d\n", - control->socket); + CTRACE((tfp, "Error on rx: closing socket %d\n", + control->socket)); strcpy(response_text, "000 *** TCP read error on response\n"); close_connection(control); return -1; /* End of file on response */ @@ -497,8 +497,8 @@ PRIVATE int response ARGS1( } while (continuation_response != -1); if (result == 421) { - CTRACE(tfp, "HTFTP: They close so we close socket %d\n", - control->socket); + CTRACE((tfp, "HTFTP: They close so we close socket %d\n", + control->socket)); close_connection(control); return -1; } @@ -575,30 +575,30 @@ PRIVATE void get_ftp_pwd ARGS2( if (*ServerType == TCPC_SERVER) { *ServerType = ((response_text[5] == '/') ? NCSA_SERVER : TCPC_SERVER); - CTRACE(tfp, "HTFTP: Treating as %s server.\n", + CTRACE((tfp, "HTFTP: Treating as %s server.\n", ((*ServerType == NCSA_SERVER) ? - "NCSA" : "TCPC")); + "NCSA" : "TCPC"))); } else if (response_text[5] == '/') { /* path names beginning with / imply Unix, * right? */ if (set_mac_binary(*ServerType)) { *ServerType = NCSA_SERVER; - CTRACE(tfp, "HTFTP: Treating as NCSA server.\n"); + CTRACE((tfp, "HTFTP: Treating as NCSA server.\n")); } else { *ServerType = UNIX_SERVER; *UseList = TRUE; - CTRACE(tfp, "HTFTP: Treating as Unix server.\n"); + CTRACE((tfp, "HTFTP: Treating as Unix server.\n")); } return; } else if (response_text[strlen(response_text)-1] == ']') { /* path names ending with ] imply VMS, right? */ *ServerType = VMS_SERVER; *UseList = TRUE; - CTRACE(tfp, "HTFTP: Treating as VMS server.\n"); + CTRACE((tfp, "HTFTP: Treating as VMS server.\n")); } else { *ServerType = GENERIC_SERVER; - CTRACE(tfp, "HTFTP: Treating as Generic server.\n"); + CTRACE((tfp, "HTFTP: Treating as Generic server.\n")); } if ((*ServerType == NCSA_SERVER) || @@ -626,7 +626,7 @@ PRIVATE void set_unix_dirstyle ARGS2( int status = response("SITE DIRSTYLE\r\n"); if (status != 2) { *ServerType = GENERIC_SERVER; - CTRACE(tfp, "HTFTP: DIRSTYLE failed, treating as Generic server.\n"); + CTRACE((tfp, "HTFTP: DIRSTYLE failed, treating as Generic server.\n")); return; } else { *UseList = TRUE; @@ -765,10 +765,10 @@ PRIVATE int get_connection ARGS2( if (status < 0) { if (status == HT_INTERRUPTED) { - CTRACE (tfp, "HTFTP: Interrupted on connect\n"); + CTRACE((tfp, "HTFTP: Interrupted on connect\n")); } else { - CTRACE(tfp, "HTFTP: Unable to connect to remote host for `%s'.\n", - arg); + CTRACE((tfp, "HTFTP: Unable to connect to remote host for `%s'.\n", + arg)); } if (status == HT_INTERRUPTED) { _HTProgress (CONNECTION_INTERRUPTED); @@ -788,8 +788,8 @@ PRIVATE int get_connection ARGS2( return status; /* Bad return */ } - CTRACE(tfp, "FTP connected, socket %d control %ld\n", - con->socket, (long)con); + CTRACE((tfp, "FTP connected, socket %d control %ld\n", + con->socket, (long)con)); control = con; /* Current control connection */ /* Initialise buffering for control connection */ @@ -802,7 +802,7 @@ PRIVATE int get_connection ARGS2( status = response((char *)0); /* Get greeting */ if (status == HT_INTERRUPTED) { - CTRACE (tfp, "HTFTP: Interrupted at beginning of login.\n"); + CTRACE((tfp, "HTFTP: Interrupted at beginning of login.\n")); _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE(control->socket); control->socket = -1; @@ -831,7 +831,7 @@ PRIVATE int get_connection ARGS2( : "anonymous"); if (status == HT_INTERRUPTED) { - CTRACE (tfp, "HTFTP: Interrupted while sending username.\n"); + CTRACE((tfp, "HTFTP: Interrupted while sending username.\n")); _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE(control->socket); control->socket = -1; @@ -888,8 +888,8 @@ PRIVATE int get_connection ARGS2( status = response(command); FREE(command); if (status == HT_INTERRUPTED) { - CTRACE (tfp, - "HTFTP: Interrupted while sending password.\n"); + CTRACE((tfp, + "HTFTP: Interrupted while sending password.\n")); _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE(control->socket); control->socket = -1; @@ -901,7 +901,7 @@ PRIVATE int get_connection ARGS2( if (status == 3) { status = send_cmd_1("ACCT noaccount"); if (status == HT_INTERRUPTED) { - CTRACE (tfp, "HTFTP: Interrupted while sending password.\n"); + CTRACE((tfp, "HTFTP: Interrupted while sending password.\n")); _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE(control->socket); control->socket = -1; @@ -910,11 +910,11 @@ PRIVATE int get_connection ARGS2( } if (status != 2) { - CTRACE(tfp, "HTFTP: Login fail: %s", response_text); + CTRACE((tfp, "HTFTP: Login fail: %s", response_text)); /* if (control->socket > 0) close_connection(control->socket); */ return -1; /* Bad return */ } - CTRACE(tfp, "HTFTP: Logged in.\n"); + CTRACE((tfp, "HTFTP: Logged in.\n")); /** Check for host type **/ if (server_type != NETPRESENZ_SERVER) @@ -926,72 +926,72 @@ PRIVATE int get_connection ARGS2( "UNIX Type: L8 MAC-OS MachTen", 28) == 0) { server_type = MACHTEN_SERVER; use_list = TRUE; - CTRACE(tfp, "HTFTP: Treating as MachTen server.\n"); + CTRACE((tfp, "HTFTP: Treating as MachTen server.\n")); } else if (strstr(response_text+4, "UNIX") != NULL || strstr(response_text+4, "Unix") != NULL) { server_type = UNIX_SERVER; unsure_type = FALSE; /* to the best of out knowledge... */ use_list = TRUE; - CTRACE(tfp, "HTFTP: Treating as Unix server.\n"); + CTRACE((tfp, "HTFTP: Treating as Unix server.\n")); } else if (strstr(response_text+4, "MSDOS") != NULL) { server_type = MSDOS_SERVER; use_list = TRUE; - CTRACE(tfp, "HTFTP: Treating as MSDOS (Unix emulation) server.\n"); + CTRACE((tfp, "HTFTP: Treating as MSDOS (Unix emulation) server.\n")); } else if (strncmp(response_text+4, "VMS", 3) == 0) { server_type = VMS_SERVER; use_list = TRUE; - CTRACE(tfp, "HTFTP: Treating as VMS server.\n"); + CTRACE((tfp, "HTFTP: Treating as VMS server.\n")); } else if ((strncmp(response_text+4, "VM/CMS", 6) == 0) || (strncmp(response_text+4, "VM ", 3) == 0)) { server_type = CMS_SERVER; use_list = TRUE; - CTRACE(tfp, "HTFTP: Treating as CMS server.\n"); + CTRACE((tfp, "HTFTP: Treating as CMS server.\n")); } else if (strncmp(response_text+4, "DCTS", 4) == 0) { server_type = DCTS_SERVER; - CTRACE(tfp, "HTFTP: Treating as DCTS server.\n"); + CTRACE((tfp, "HTFTP: Treating as DCTS server.\n")); } else if (strstr(response_text+4, "MAC-OS TCP/Connect II") != NULL) { server_type = TCPC_SERVER; - CTRACE(tfp, "HTFTP: Looks like a TCPC server.\n"); + CTRACE((tfp, "HTFTP: Looks like a TCPC server.\n")); get_ftp_pwd(&server_type, &use_list); unsure_type = TRUE; } else if (server_type == NETPRESENZ_SERVER) { /* already set above */ use_list = TRUE; set_mac_binary(server_type); - CTRACE(tfp, "HTFTP: Treating as NetPresenz (MACOS) server.\n"); + CTRACE((tfp, "HTFTP: Treating as NetPresenz (MACOS) server.\n")); } else if (strncmp(response_text+4, "MACOS Peter's Server", 20) == 0) { server_type = PETER_LEWIS_SERVER; use_list = TRUE; set_mac_binary(server_type); - CTRACE(tfp, "HTFTP: Treating as Peter Lewis (MACOS) server.\n"); + CTRACE((tfp, "HTFTP: Treating as Peter Lewis (MACOS) server.\n")); } else if (strncmp(response_text+4, "Windows_NT", 10) == 0) { server_type = WINDOWS_NT_SERVER; - CTRACE(tfp, "HTFTP: Treating as Window_NT server.\n"); + CTRACE((tfp, "HTFTP: Treating as Window_NT server.\n")); set_unix_dirstyle(&server_type, &use_list); } else if (strncmp(response_text+4, "MS Windows", 10) == 0) { server_type = MS_WINDOWS_SERVER; use_list = TRUE; - CTRACE(tfp, "HTFTP: Treating as MS Windows server.\n"); + CTRACE((tfp, "HTFTP: Treating as MS Windows server.\n")); } else if (strncmp(response_text+4, "MACOS AppleShare IP FTP Server", 30) == 0) { server_type = APPLESHARE_SERVER; use_list = TRUE; set_mac_binary(server_type); - CTRACE(tfp, "HTFTP: Treating as AppleShare server.\n"); + CTRACE((tfp, "HTFTP: Treating as AppleShare server.\n")); } else { server_type = GENERIC_SERVER; - CTRACE(tfp, "HTFTP: Ugh! A Generic server.\n"); + CTRACE((tfp, "HTFTP: Ugh! A Generic server.\n")); get_ftp_pwd(&server_type, &use_list); unsure_type = TRUE; } @@ -1010,7 +1010,7 @@ PRIVATE int get_connection ARGS2( close_connection(control->socket); return -status; /* Bad return */ } - CTRACE(tfp, "HTFTP: Port defined.\n"); + CTRACE((tfp, "HTFTP: Port defined.\n")); } #endif /* NOTREPEAT_PORT */ return con->socket; /* Good return */ @@ -1031,7 +1031,7 @@ PRIVATE int close_master_socket NOARGS if (master_socket != -1) FD_CLR( (unsigned) master_socket, &open_sockets); status = NETCLOSE(master_socket); - CTRACE(tfp, "HTFTP: Closed master socket %d\n", master_socket); + CTRACE((tfp, "HTFTP: Closed master socket %d\n", master_socket)); master_socket = -1; if (status < 0) return HTInetStatus(gettext("close master socket")); @@ -1076,7 +1076,7 @@ PRIVATE int get_listen_socket NOARGS if (new_socket < 0) return HTInetStatus(gettext("socket for master socket")); - CTRACE(tfp, "HTFTP: Opened master socket number %d\n", new_socket); + CTRACE((tfp, "HTFTP: Opened master socket number %d\n", new_socket)); /* Search for a free port. */ @@ -1111,8 +1111,8 @@ PRIVATE int get_listen_socket NOARGS /* Cast to generic sockaddr */ sizeof(soc_address))) == 0) break; - CTRACE(tfp, "TCP bind attempt to port %d yields %d, errno=%d\n", - port_number, status, SOCKET_ERRNO); + CTRACE((tfp, "TCP bind attempt to port %d yields %d, errno=%d\n", + port_number, status, SOCKET_ERRNO)); } /* for */ } #else @@ -1130,8 +1130,8 @@ PRIVATE int get_listen_socket NOARGS (struct sockaddr *)&soc_address, (void *)&address_length); if (status<0) return HTInetStatus("getsockname"); - CTRACE(tfp, "HTFTP: This host is %s\n", - HTInetString(soc_in)); + CTRACE((tfp, "HTFTP: This host is %s\n", + HTInetString(soc_in))); soc_address.sin_port = 0; /* Unspecified: please allocate */ #ifdef SOCKS @@ -1167,9 +1167,9 @@ PRIVATE int get_listen_socket NOARGS } #endif /* POLL_PORTS */ - CTRACE(tfp, "HTFTP: bound to port %d on %s\n", + CTRACE((tfp, "HTFTP: bound to port %d on %s\n", (int)ntohs(soc_in->sin_port), - HTInetString(soc_in)); + HTInetString(soc_in))); #ifdef REPEAT_LISTEN if (master_socket >= 0) @@ -1206,7 +1206,7 @@ PRIVATE int get_listen_socket NOARGS return HTInetStatus("listen"); } } - CTRACE(tfp, "TCP: Master socket(), bind() and listen() all OK\n"); + CTRACE((tfp, "TCP: Master socket(), bind() and listen() all OK\n")); FD_SET( (unsigned) master_socket, &open_sockets); if ((master_socket+1) > num_sockets) num_sockets = master_socket+1; @@ -1691,10 +1691,10 @@ PRIVATE void parse_vms_dir_entry ARGS2( } /** Wrap it up **/ - CTRACE(tfp, "HTFTP: VMS filename: %s date: %s size: %d\n", + CTRACE((tfp, "HTFTP: VMS filename: %s date: %s size: %d\n", entry_info->filename, entry_info->date ? entry_info->date : "", - entry_info->size); + entry_info->size)); return; } /* parse_vms_dir_entry() */ @@ -1764,10 +1764,10 @@ PRIVATE void parse_ms_windows_dir_entry ARGS2( } /** Wrap it up **/ - CTRACE(tfp, "HTFTP: MS Windows filename: %s date: %s size: %d\n", + CTRACE((tfp, "HTFTP: MS Windows filename: %s date: %s size: %d\n", entry_info->filename, entry_info->date ? entry_info->date : "", - entry_info->size); + entry_info->size)); return; } /* parse_ms_windows_dir_entry */ @@ -1875,10 +1875,10 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2( } /** Wrap it up **/ - CTRACE(tfp, "HTFTP: Windows NT filename: %s date: %s size: %d\n", + CTRACE((tfp, "HTFTP: Windows NT filename: %s date: %s size: %d\n", entry_info->filename, entry_info->date ? entry_info->date : "", - entry_info->size); + entry_info->size)); return; } /* parse_windows_nt_dir_entry */ #endif /* NOTDEFINED */ @@ -2017,10 +2017,10 @@ PRIVATE void parse_cms_dir_entry ARGS2( } /** Wrap it up. **/ - CTRACE(tfp, "HTFTP: VM/CMS filename: %s date: %s size: %d\n", + CTRACE((tfp, "HTFTP: VM/CMS filename: %s date: %s size: %d\n", entry_info->filename, entry_info->date ? entry_info->date : "", - entry_info->size); + entry_info->size)); return; } /* parse_cms_dir_entry */ @@ -2070,8 +2070,8 @@ PRIVATE EntryInfo * parse_dir_entry ARGS3( (len >= 24 && entry[23] != ' ') || (len < 24 && strchr(entry, ' '))) { server_type = UNIX_SERVER; - CTRACE(tfp, - "HTFTP: Falling back to treating as Unix server.\n"); + CTRACE((tfp, + "HTFTP: Falling back to treating as Unix server.\n")); } else { *first = FALSE; } @@ -2648,14 +2648,14 @@ AgainForMultiNet: if (ic == EOF && chunk->size == 1) /* 1 means empty: includes terminating 0 */ break; - CTRACE(tfp, "HTFTP: Line in %s is %s\n", - lastpath, chunk->data); + CTRACE((tfp, "HTFTP: Line in %s is %s\n", + lastpath, chunk->data)); entry_info = parse_dir_entry(chunk->data, &first, &spilledname); if (entry_info->display) { FREE(spilledname); - CTRACE(tfp, "Adding file to BTree: %s\n", - entry_info->filename); + CTRACE((tfp, "Adding file to BTree: %s\n", + entry_info->filename)); HTBTree_add(bt, (EntryInfo *)entry_info); } else { free_entryinfo_struct_contents(entry_info); @@ -2851,7 +2851,7 @@ PUBLIC int HTFTPLoad ARGS4( { status = response(port_command); if (status == HT_INTERRUPTED) { - CTRACE (tfp, "HTFTP: Interrupted in response (port_command)\n"); + CTRACE((tfp, "HTFTP: Interrupted in response (port_command)\n")); _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE (control->socket); control->socket = -1; @@ -2863,7 +2863,7 @@ PUBLIC int HTFTPLoad ARGS4( continue; /* try again - net error*/ return -status; /* bad reply */ } - CTRACE(tfp, "HTFTP: Port defined.\n"); + CTRACE((tfp, "HTFTP: Port defined.\n")); } #endif /* REPEAT_PORT */ #else /* Use PASV */ @@ -2895,8 +2895,8 @@ PUBLIC int HTFTPLoad ARGS4( return -99; } passive_port = (p0<<8) + p1; - CTRACE(tfp, "HTFTP: Server is listening on port %d\n", - passive_port); + CTRACE((tfp, "HTFTP: Server is listening on port %d\n", + passive_port)); /* Open connection for data: @@ -2911,7 +2911,7 @@ PUBLIC int HTFTPLoad ARGS4( return status; /* Bad return */ } - CTRACE(tfp, "FTP data connected, socket %d\n", data_soc); + CTRACE((tfp, "FTP data connected, socket %d\n", data_soc)); } #endif /* use PASV */ status = 0; @@ -2938,7 +2938,7 @@ PUBLIC int HTFTPLoad ARGS4( init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; - CTRACE(tfp, "HTFTP: Rejecting path due to illegal escaped slash.\n"); + CTRACE((tfp, "HTFTP: Rejecting path due to illegal escaped slash.\n")); return -1; } } @@ -2974,11 +2974,11 @@ PUBLIC int HTFTPLoad ARGS4( } } if (*type != '\0') { - CTRACE(tfp, "HTFTP: type=%s\n", type); + CTRACE((tfp, "HTFTP: type=%s\n", type)); } } HTUnEscape(filename); - CTRACE(tfp, "HTFTP: UnEscaped %s\n", filename); + CTRACE((tfp, "HTFTP: UnEscaped %s\n", filename)); if (filename[1] == '~') { /* ** Check if translation of HOME as tilde is supported, @@ -3093,7 +3093,7 @@ PUBLIC int HTFTPLoad ARGS4( init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; - CTRACE(tfp, "HTFTP: Rejecting path due to non-Unix-style syntax.\n"); + CTRACE((tfp, "HTFTP: Rejecting path due to non-Unix-style syntax.\n")); return -1; } /** Handle any unescaped "/%2F" path **/ @@ -3103,15 +3103,15 @@ PUBLIC int HTFTPLoad ARGS4( for (i = 0; filename[(i+1)]; i++) filename[i] = filename[(i+1)]; filename[i] = '\0'; - CTRACE(tfp, "HTFTP: Trimmed '%s'\n", filename); + CTRACE((tfp, "HTFTP: Trimmed '%s'\n", filename)); cp = HTMake_VMS_name("", filename); - CTRACE(tfp, "HTFTP: VMSized '%s'\n", cp); + CTRACE((tfp, "HTFTP: VMSized '%s'\n", cp)); if ((cp1=strrchr(cp, ']')) != NULL) { cp1++; for (i = 0; cp1[i]; i++) filename[i] = cp1[i]; filename[i] = '\0'; - CTRACE(tfp, "HTFTP: Filename '%s'\n", filename); + CTRACE((tfp, "HTFTP: Filename '%s'\n", filename)); *cp1 = '\0'; status = send_cwd(cp); if (status != 2) { @@ -3152,7 +3152,7 @@ PUBLIC int HTFTPLoad ARGS4( for (i = 0; cp1[i]; i++) filename[i] = cp1[i]; filename[i] = '\0'; - CTRACE(tfp, "HTFTP: Filename '%s'\n", filename); + CTRACE((tfp, "HTFTP: Filename '%s'\n", filename)); *cp1 = '\0'; strcat(cp, "["); strcat(cp, filename); @@ -3259,7 +3259,7 @@ PUBLIC int HTFTPLoad ARGS4( /** Otherwise, go to appropriate directory and doctor filename **/ if (!strncmp(filename, "/~", 2)) filename += 2; - CTRACE(tfp, "check '%s' to translate x/y/ to [.x.y]\n", filename); + CTRACE((tfp, "check '%s' to translate x/y/ to [.x.y]\n", filename)); if (!included_device && (cp = strchr(filename, '/')) != NULL && (cp1 = strrchr(cp, '/')) != NULL && @@ -3268,10 +3268,10 @@ PUBLIC int HTFTPLoad ARGS4( HTSprintf0(&tmp, "[.%.*s]", cp1-cp-1, cp+1); - CTRACE(tfp, "change path '%s'\n", tmp); + CTRACE((tfp, "change path '%s'\n", tmp)); while ((cp2 = strrchr(tmp, '/')) != NULL) *cp2 = '.'; - CTRACE(tfp, "...to path '%s'\n", tmp); + CTRACE((tfp, "...to path '%s'\n", tmp)); status = send_cwd(tmp); FREE(tmp); @@ -3423,7 +3423,7 @@ listen: init_help_message_cache(); /* to free memory */ return HTInetStatus("accept"); } - CTRACE(tfp, "TCP: Accepted new socket %d\n", status); + CTRACE((tfp, "TCP: Accepted new socket %d\n", status)); data_soc = status; } #else @@ -3433,7 +3433,7 @@ listen: if (server_type == UNIX_SERVER && !unsure_type && !strcmp(response_text, "150 Opening ASCII mode data connection for /bin/dl.\n")) { - CTRACE(tfp, "HTFTP: Treating as OS/2 \"dls\" server.\n"); + CTRACE((tfp, "HTFTP: Treating as OS/2 \"dls\" server.\n")); server_type = DLS_SERVER; } status = read_directory (anchor, name, format_out, sink); @@ -3501,7 +3501,7 @@ listen: /* Reset buffering to control connection DD 921208 */ status = NETCLOSE(data_soc); - CTRACE(tfp, "HTFTP: Closing data socket %d\n", data_soc); + CTRACE((tfp, "HTFTP: Closing data socket %d\n", data_soc)); if (status < 0 && rv != HT_INTERRUPTED && rv != -1) { (void) HTInetStatus("close"); /* Comment only */ data_soc = -1; /* invalidate it */ diff --git a/WWW/Library/Implementation/HTFWriter.c b/WWW/Library/Implementation/HTFWriter.c index 468916de..f85341ce 100644 --- a/WWW/Library/Implementation/HTFWriter.c +++ b/WWW/Library/Implementation/HTFWriter.c @@ -152,7 +152,7 @@ PRIVATE void HTFWriter_abort ARGS2(HTStream *, me, HTError, e) { fclose(me->fp); if (me->end_command) { /* Temp file */ - CTRACE(tfp, "HTFWriter: Aborting: file not executed.\n"); + CTRACE((tfp, "HTFWriter: Aborting: file not executed.\n")); FREE(me->end_command); if (me->remove_command) { system(me->remove_command); diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index 0dfe68f3..918c914e 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -611,7 +611,7 @@ PUBLIC char * HTURLPath_toFile ARGS2( else HTUnEscapeSome(path, "/"); /* Interpret % signs for path delims */ - CTRACE(tfp, "URLPath `%s' means path `%s'\n", name, path); + CTRACE((tfp, "URLPath `%s' means path `%s'\n", name, path)); #ifdef DOSPATH StrAllocCopy(result, HTDOS_name(path)); #else @@ -622,7 +622,7 @@ PUBLIC char * HTURLPath_toFile ARGS2( StrAllocCopy(result, path+1); else StrAllocCopy(result, path); - CTRACE(tfp, "EMX hack changed `%s' to `%s'\n", path, result); + CTRACE((tfp, "EMX hack changed `%s' to `%s'\n", path, result)); #else StrAllocCopy(result, path); #endif /* __EMX__ */ @@ -667,7 +667,7 @@ PUBLIC char * HTnameOfFile_WWW ARGS3( || !*acc_method) { /* implicitly local? */ if ((0 == strcasecomp(host, HTHostName())) || (0 == strcasecomp(host, "localhost")) || !*host) { - CTRACE(tfp, "Node `%s' means path `%s'\n", name, path); + CTRACE((tfp, "Node `%s' means path `%s'\n", name, path)); #ifdef DOSPATH StrAllocCopy(result, HTDOS_name(path)); #else @@ -678,14 +678,14 @@ PUBLIC char * HTnameOfFile_WWW ARGS3( StrAllocCopy(result, path+1); else StrAllocCopy(result, path); - CTRACE(tfp, "EMX hack changed `%s' to `%s'\n", path, result); + CTRACE((tfp, "EMX hack changed `%s' to `%s'\n", path, result)); #else StrAllocCopy(result, path); #endif /* __EMX__ */ #endif /* DOSPATH */ } else if (WWW_prefix) { HTSprintf0(&result, "%s%s%s", "/Net/", host, path); - CTRACE(tfp, "Node `%s' means file `%s'\n", name, result); + CTRACE((tfp, "Node `%s' means file `%s'\n", name, result)); } else { StrAllocCopy(result, path); } @@ -738,7 +738,7 @@ PUBLIC char * WWW_nameOfFile ARGS1( } else { HTSprintf0(&result, "file://%s%s", HTHostName(), name); } - CTRACE(tfp, "File `%s'\n\tmeans node `%s'\n", name, result); + CTRACE((tfp, "File `%s'\n\tmeans node `%s'\n", name, result)); return result; } @@ -939,8 +939,8 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( LYLowerCase(cp); if (((cp1 = strchr(cp, ';')) != NULL) && (cp2 = strstr(cp1, "charset")) != NULL) { - CTRACE(tfp, "HTCharsetFormat: Extended MIME Content-Type is %s\n", - format->name); + CTRACE((tfp, "HTCharsetFormat: Extended MIME Content-Type is %s\n", + format->name)); cp2 += 7; while (*cp2 == ' ' || *cp2 == '=') cp2++; @@ -1109,8 +1109,8 @@ PUBLIC float HTFileValue ARGS1( suff = (HTSuffix *)HTList_objectAt(HTSuffixes, i); ls = strlen(suff->suffix); if ((ls <= lf) && 0==strcmp(suff->suffix, filename + lf - ls)) { - CTRACE(tfp, "File: Value of %s is %.3f\n", - filename, suff->quality); + CTRACE((tfp, "File: Value of %s is %.3f\n", + filename, suff->quality)); return suff->quality; /* OK -- found */ } } @@ -1173,7 +1173,7 @@ PUBLIC BOOL HTEditable ARGS1( return YES; } } - CTRACE(tfp, "\tFile is not editable.\n"); + CTRACE((tfp, "\tFile is not editable.\n")); return NO; /* If no excuse, can't do */ #endif /* NO_GROUPS */ } @@ -1552,7 +1552,7 @@ PRIVATE int print_local_dir ARGS5( struct stat file_info; int status; - CTRACE(tfp, "print_local_dir() started\n"); + CTRACE((tfp, "print_local_dir() started\n")); logical = HTAnchor_address((HTAnchor*)anchor); pathname = HTParse(logical, "", @@ -1705,7 +1705,7 @@ PRIVATE int print_local_dir ARGS5( if (status != HT_PARTIAL_CONTENT) _HTProgress (gettext("OK")); else - CTRACE(tfp, "Reading the directory interrupted by user\n"); + CTRACE((tfp, "Reading the directory interrupted by user\n")); /* @@ -2006,7 +2006,7 @@ PUBLIC int HTLoadFile ARGS4( ** to the directories or files listed. */ if (HTStat(filename, &stat_info) == -1) { - CTRACE(tfp, "HTLoadFile: Can't stat %s\n", filename); + CTRACE((tfp, "HTLoadFile: Can't stat %s\n", filename)); } else { if (S_ISDIR(stat_info.st_mode)) { if (HTDirAccess == HT_DIR_FORBID) { @@ -2053,12 +2053,12 @@ PUBLIC int HTLoadFile ARGS4( */ if (!fp) { char * ultrixname = 0; - CTRACE(tfp, "HTLoadFile: Can't open as %s\n", vmsname); + CTRACE((tfp, "HTLoadFile: Can't open as %s\n", vmsname)); HTSprintf0(&ultrixname, "%s::\"%s\"", nodename, filename); fp = fopen(ultrixname, "r", "shr=put", "shr=upd"); if (!fp) { - CTRACE(tfp, "HTLoadFile: Can't open as %s\n", - ultrixname); + CTRACE((tfp, "HTLoadFile: Can't open as %s\n", + ultrixname)); } FREE(ultrixname); } @@ -2099,8 +2099,8 @@ PUBLIC int HTLoadFile ARGS4( *semicolon = ';'; gzfp = gzopen(vmsname, "rb"); - CTRACE(tfp, "HTLoadFile: gzopen of `%s' gives %p\n", - vmsname, (void*)gzfp); + CTRACE((tfp, "HTLoadFile: gzopen of `%s' gives %p\n", + vmsname, (void*)gzfp)); use_gzread = YES; } else #endif /* USE_ZLIB */ @@ -2145,8 +2145,8 @@ PUBLIC int HTLoadFile ARGS4( *semicolon = ';'; gzfp = gzopen(vmsname, "rb"); - CTRACE(tfp, "HTLoadFile: gzopen of `%s' gives %p\n", - vmsname, (void*)gzfp); + CTRACE((tfp, "HTLoadFile: gzopen of `%s' gives %p\n", + vmsname, (void*)gzfp)); use_gzread = YES; } #else /* USE_ZLIB */ @@ -2317,8 +2317,8 @@ PUBLIC int HTLoadFile ARGS4( } } if (value != NO_VALUE_FOUND) { - CTRACE(tfp, "HTLoadFile: value of presenting %s is %f\n", - HTAtom_name(rep), value); + CTRACE((tfp, "HTLoadFile: value of presenting %s is %f\n", + HTAtom_name(rep), value)); if (value > best) { best_rep = rep; best_enc = enc; @@ -2362,7 +2362,7 @@ PUBLIC int HTLoadFile ARGS4( #endif { /* if can't read file information */ - CTRACE(tfp, "HTLoadFile: can't stat %s\n", localname); + CTRACE((tfp, "HTLoadFile: can't stat %s\n", localname)); } else { /* Stat was OK */ @@ -2377,7 +2377,7 @@ PUBLIC int HTLoadFile ARGS4( DIR *dp; struct stat file_info; - CTRACE(tfp, "%s is a directory\n", localname); + CTRACE((tfp, "%s is a directory\n", localname)); /* ** Check directory access. @@ -2441,8 +2441,8 @@ PUBLIC int HTLoadFile ARGS4( FILE * fp = fopen(localname, "r"); # endif - CTRACE (tfp, "HTLoadFile: Opening `%s' gives %p\n", - localname, (void*)fp); + CTRACE((tfp, "HTLoadFile: Opening `%s' gives %p\n", + localname, (void*)fp)); if (fp) { /* Good! */ int len; char *cp = NULL; @@ -2470,8 +2470,8 @@ PUBLIC int HTLoadFile ARGS4( fclose(fp); gzfp = gzopen(localname, "rb"); - CTRACE(tfp, "HTLoadFile: gzopen of `%s' gives %p\n", - localname, (void*)gzfp); + CTRACE((tfp, "HTLoadFile: gzopen of `%s' gives %p\n", + localname, (void*)gzfp)); use_gzread = YES; } else #endif /* USE_ZLIB */ @@ -2509,8 +2509,8 @@ PUBLIC int HTLoadFile ARGS4( fclose(fp); gzfp = gzopen(localname, "rb"); - CTRACE(tfp, "HTLoadFile: gzopen of `%s' gives %p\n", - localname, (void*)gzfp); + CTRACE((tfp, "HTLoadFile: gzopen of `%s' gives %p\n", + localname, (void*)gzfp)); use_gzread = YES; } #else /* USE_ZLIB */ @@ -2600,7 +2600,7 @@ PUBLIC int HTLoadFile ARGS4( ** All attempts have failed. */ { - CTRACE(tfp, "Can't open `%s', errno=%d\n", addr, SOCKET_ERRNO); + CTRACE((tfp, "Can't open `%s', errno=%d\n", addr, SOCKET_ERRNO)); return HTLoadError(sink, 403, FAILED_FILE_UNREADABLE); } diff --git a/WWW/Library/Implementation/HTFinger.c b/WWW/Library/Implementation/HTFinger.c index e6e9699b..f0255bb8 100644 --- a/WWW/Library/Implementation/HTFinger.c +++ b/WWW/Library/Implementation/HTFinger.c @@ -128,10 +128,10 @@ PRIVATE int response ARGS5( /* Send the command. */ - CTRACE(tfp, "HTFinger command to be sent: %s", command); + CTRACE((tfp, "HTFinger command to be sent: %s", command)); status = NETWRITE(s, (char *)command, length); if (status < 0) { - CTRACE(tfp, "HTFinger: Unable to send command. Disconnecting.\n"); + CTRACE((tfp, "HTFinger: Unable to send command. Disconnecting.\n")); NETCLOSE(s); s = -1; return status; @@ -144,7 +144,7 @@ PRIVATE int response ARGS5( /* Create the results report. */ - CTRACE(tfp,"HTFinger: Reading finger information\n"); + CTRACE((tfp,"HTFinger: Reading finger information\n")); START(HTML_HTML); PUTC('\n'); START(HTML_HEAD); @@ -185,7 +185,7 @@ PRIVATE int response ARGS5( while ((ch=NEXT_CHAR) != EOF) { if (interrupted_in_htgetcharacter) { - CTRACE(tfp, "HTFinger: Interrupted in HTGetCharacter, apparently.\n"); + CTRACE((tfp, "HTFinger: Interrupted in HTGetCharacter, apparently.\n")); _HTProgress (CONNECTION_INTERRUPTED); goto end_html; } @@ -262,7 +262,7 @@ PUBLIC int HTLoadFinger ARGS4( int port; /* Port number from URL */ int status; /* tcp return */ - CTRACE(tfp, "HTFinger: Looking for %s\n", (arg ? arg : "NULL")); + CTRACE((tfp, "HTFinger: Looking for %s\n", (arg ? arg : "NULL"))); if (!(arg && *arg)) { HTAlert(COULD_NOT_LOAD_DATA); @@ -377,13 +377,13 @@ PUBLIC int HTLoadFinger ARGS4( /* Now, let's get a stream setup up from the FingerHost: ** CONNECTING to finger host */ - CTRACE(tfp, "HTFinger: doing HTDoConnect on '%s'\n", str); + CTRACE((tfp, "HTFinger: doing HTDoConnect on '%s'\n", str)); status = HTDoConnect(str, "finger", FINGER_PORT, &s); - CTRACE(tfp, "HTFinger: Done DoConnect; status %d\n", status); + CTRACE((tfp, "HTFinger: Done DoConnect; status %d\n", status)); if (status == HT_INTERRUPTED) { /* Interrupt cleanly */ - CTRACE(tfp, "HTFinger: Interrupted on connect; recovering cleanly.\n"); + CTRACE((tfp, "HTFinger: Interrupted on connect; recovering cleanly.\n")); HTProgress (CONNECTION_INTERRUPTED); FREE(str); FREE(command); @@ -392,13 +392,13 @@ PUBLIC int HTLoadFinger ARGS4( if (status < 0) { NETCLOSE(s); s = -1; - CTRACE(tfp, "HTFinger: Unable to connect to finger host.\n"); + CTRACE((tfp, "HTFinger: Unable to connect to finger host.\n")); HTAlert(gettext("Could not access finger host.")); FREE(str); FREE(command); return HT_NOT_LOADED; /* FAIL */ } - CTRACE(tfp, "HTFinger: Connected to finger host '%s'.\n", str); + CTRACE((tfp, "HTFinger: Connected to finger host '%s'.\n", str)); FREE(str); /* Send the command, and process response if successful. diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index 72b7838f..5b521c87 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -237,11 +237,11 @@ PUBLIC int HTGetCharacter NOARGS if (status == 0) return EOF; if (status == HT_INTERRUPTED) { - CTRACE(tfp, "HTFormat: Interrupted in HTGetCharacter\n"); + CTRACE((tfp, "HTFormat: Interrupted in HTGetCharacter\n")); interrupted_in_htgetcharacter = 1; return EOF; } - CTRACE(tfp, "HTFormat: File read error %d\n", status); + CTRACE((tfp, "HTFormat: File read error %d\n", status)); return EOF; /* -1 is returned by UCX at end of HTTP link */ } @@ -265,8 +265,8 @@ PRIVATE int half_match ARGS2(char *,trial_type, char *,target) if (!cp || *(cp+1) != '*') return 0; - CTRACE(tfp, "HTFormat: comparing %s and %s for half match\n", - trial_type, target); + CTRACE((tfp, "HTFormat: comparing %s and %s for half match\n", + trial_type, target)); /* main type matches */ if (!strncmp(trial_type, target, (cp-trial_type)-1)) @@ -293,8 +293,8 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( { HTAtom * wildcard = HTAtom_for("*"); - CTRACE(tfp, "HTFormat: Looking up presentation for %s to %s\n", - HTAtom_name(rep_in), HTAtom_name(rep_out)); + CTRACE((tfp, "HTFormat: Looking up presentation for %s to %s\n", + HTAtom_name(rep_in), HTAtom_name(rep_out))); /* don't do anymore do it in the Lynx code at startup LJM */ /* if (!HTPresentations) HTFormatInit(); */ /* set up the list */ @@ -312,8 +312,8 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( pres = (HTPresentation *)HTList_objectAt(HTPresentations, i); if (pres->rep == rep_in) { if (pres->rep_out == rep_out) { - CTRACE(tfp, "FindPresentation: found exact match: %s\n", - HTAtom_name(pres->rep)); + CTRACE((tfp, "FindPresentation: found exact match: %s\n", + HTAtom_name(pres->rep))); return pres; } else if (!fill_in) { @@ -322,8 +322,8 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( if (!strong_wildcard_match) strong_wildcard_match = pres; /* otherwise use the first one */ - CTRACE(tfp, "StreamStack: found strong wildcard match: %s\n", - HTAtom_name(pres->rep)); + CTRACE((tfp, "StreamStack: found strong wildcard match: %s\n", + HTAtom_name(pres->rep))); } } else if (!fill_in) { @@ -335,8 +335,8 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( if (!strong_subtype_wildcard_match) strong_subtype_wildcard_match = pres; /* otherwise use the first one */ - CTRACE(tfp, "StreamStack: found strong subtype wildcard match: %s\n", - HTAtom_name(pres->rep)); + CTRACE((tfp, "StreamStack: found strong subtype wildcard match: %s\n", + HTAtom_name(pres->rep))); } } @@ -345,8 +345,8 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( if (!weak_wildcard_match) weak_wildcard_match = pres; /* otherwise use the first one */ - CTRACE(tfp, "StreamStack: found weak wildcard match: %s\n", - HTAtom_name(pres->rep_out)); + CTRACE((tfp, "StreamStack: found weak wildcard match: %s\n", + HTAtom_name(pres->rep_out))); } if (pres->rep_out == wildcard) { if (!last_default_match) @@ -391,8 +391,8 @@ PUBLIC HTStream * HTStreamStack ARGS4( HTPresentation temp; HTPresentation *match; - CTRACE(tfp, "HTFormat: Constructing stream stack for %s to %s\n", - HTAtom_name(rep_in), HTAtom_name(rep_out)); + CTRACE((tfp, "HTFormat: Constructing stream stack for %s to %s\n", + HTAtom_name(rep_in), HTAtom_name(rep_out))); /* don't return on WWW_SOURCE some people might like * to make use of the source!!!! LJM @@ -407,10 +407,10 @@ PUBLIC HTStream * HTStreamStack ARGS4( if ((match = HTFindPresentation(rep_in, rep_out, &temp))) { if (match == &temp) { - CTRACE(tfp, "StreamStack: Using %s\n", HTAtom_name(temp.rep_out)); + CTRACE((tfp, "StreamStack: Using %s\n", HTAtom_name(temp.rep_out))); } else { - CTRACE(tfp, "StreamStack: found exact match: %s\n", - HTAtom_name(match->rep)); + CTRACE((tfp, "StreamStack: found exact match: %s\n", + HTAtom_name(match->rep))); } return (*match->converter)(match, anchor, sink); } else { @@ -450,8 +450,8 @@ PUBLIC float HTStackValue ARGS4( { HTAtom * wildcard = HTAtom_for("*"); - CTRACE(tfp, "HTFormat: Evaluating stream stack for %s worth %.3f to %s\n", - HTAtom_name(rep_in), initial_value, HTAtom_name(rep_out)); + CTRACE((tfp, "HTFormat: Evaluating stream stack for %s worth %.3f to %s\n", + HTAtom_name(rep_in), initial_value, HTAtom_name(rep_out))); if (rep_out == WWW_SOURCE || rep_out == rep_in) return 0.0; @@ -670,10 +670,10 @@ PUBLIC int HTCopy ARGS4( * TCP stacks for VMS etc., so this is currently * only for UNIX. - kw */ - HTInetStatus("NETREAD"); - HTAlert("Unexpected server disconnect."); - CTRACE(tfp, - "HTCopy: Unexpected server disconnect. Treating as completed.\n"); + HTInetStatus("NETREAD"); + HTAlert("Unexpected server disconnect."); + CTRACE((tfp, + "HTCopy: Unexpected server disconnect. Treating as completed.\n")); status = 0; break; #else /* !UNIX */ @@ -681,8 +681,8 @@ PUBLIC int HTCopy ARGS4( * Treat what we've gotten already * as the complete transmission. - FM */ - CTRACE(tfp, - "HTCopy: Unexpected server disconnect. Treating as completed.\n"); + CTRACE((tfp, + "HTCopy: Unexpected server disconnect. Treating as completed.\n")); status = 0; break; #endif /* UNIX */ @@ -778,8 +778,8 @@ PUBLIC int HTFileCopy ARGS2( rv = HT_LOADED; break; } - CTRACE(tfp, "HTFormat: Read error, read returns %d\n", - ferror(fp)); + CTRACE((tfp, "HTFormat: Read error, read returns %d\n", + ferror(fp))); if (bytes) { rv = HT_PARTIAL_CONTENT; } else { @@ -911,10 +911,10 @@ PRIVATE int HTGzFileCopy ARGS2( rv = HT_LOADED; break; } - CTRACE(tfp, "HTGzFileCopy: Read error, gzread returns %d\n", - status); - CTRACE(tfp, "gzerror : %s\n", - gzerror(gzfp, &gzerrnum)); + CTRACE((tfp, "HTGzFileCopy: Read error, gzread returns %d\n", + status)); + CTRACE((tfp, "gzerror : %s\n", + gzerror(gzfp, &gzerrnum))); if (TRACE) { if (gzerrnum == Z_ERRNO) perror("gzerror "); @@ -1040,7 +1040,7 @@ PUBLIC int HTParseSocket ARGS5( } HTSprintf0(&buffer, CANNOT_CONVERT_I_TO_O, HTAtom_name(rep_in), HTAtom_name(format_out)); - CTRACE(tfp, "HTFormat: %s\n", buffer); + CTRACE((tfp, "HTFormat: %s\n", buffer)); rv = HTLoadError(sink, 501, buffer); /* returns -501 */ FREE(buffer); } else { @@ -1105,7 +1105,7 @@ PUBLIC int HTParseFile ARGS5( } HTSprintf0(&buffer, CANNOT_CONVERT_I_TO_O, HTAtom_name(rep_in), HTAtom_name(format_out)); - CTRACE(tfp, "HTFormat(in HTParseFile): %s\n", buffer); + CTRACE((tfp, "HTFormat(in HTParseFile): %s\n", buffer)); rv = HTLoadError(sink, 501, buffer); FREE(buffer); return rv; @@ -1166,7 +1166,7 @@ PUBLIC int HTParseMem ARGS5( char *buffer = 0; HTSprintf0(&buffer, CANNOT_CONVERT_I_TO_O, HTAtom_name(rep_in), HTAtom_name(format_out)); - CTRACE(tfp, "HTFormat(in HTParseMem): %s\n", buffer); + CTRACE((tfp, "HTFormat(in HTParseMem): %s\n", buffer)); rv = HTLoadError(sink, 501, buffer); FREE(buffer); return rv; @@ -1193,7 +1193,7 @@ PRIVATE int HTCloseGzFile ARGS1( if (gzres == Z_ERRNO) { perror("gzclose "); } else if (gzres != Z_OK) { - CTRACE(tfp, "gzclose : error number %d\n", gzres); + CTRACE((tfp, "gzclose : error number %d\n", gzres)); } } return(gzres); @@ -1237,7 +1237,7 @@ PUBLIC int HTParseGzFile ARGS5( } HTSprintf0(&buffer, CANNOT_CONVERT_I_TO_O, HTAtom_name(rep_in), HTAtom_name(format_out)); - CTRACE(tfp, "HTFormat(in HTParseGzFile): %s\n", buffer); + CTRACE((tfp, "HTFormat(in HTParseGzFile): %s\n", buffer)); rv = HTLoadError(sink, 501, buffer); FREE(buffer); return rv; diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c index 42c0760c..f934662f 100644 --- a/WWW/Library/Implementation/HTGopher.c +++ b/WWW/Library/Implementation/HTGopher.c @@ -191,7 +191,7 @@ PRIVATE void write_anchor ARGS2(CONST char *,text, CONST char *,addr) present[HTML_A_TITLE] = YES; ((CONST char **)value)[HTML_A_TITLE] = text; - CTRACE(tfp,"HTGopher: adding URL: %s\n",addr); + CTRACE((tfp,"HTGopher: adding URL: %s\n",addr)); HT_Is_Gopher_URL = TRUE; /* tell HTML.c that this is a Gopher URL */ (*targetClass.start_element)(target, HTML_A, present, @@ -251,7 +251,7 @@ PRIVATE void parse_menu ARGS2( while ((ich=NEXT_CHAR) != EOF) { if (interrupted_in_htgetcharacter) { - CTRACE(tfp, "HTGopher: Interrupted in HTGetCharacter, apparently.\n"); + CTRACE((tfp, "HTGopher: Interrupted in HTGetCharacter, apparently.\n")); goto end_html; } @@ -264,7 +264,7 @@ PRIVATE void parse_menu ARGS2( bytes += p-line; /* add size */ p = line; /* Scan it to parse it */ port = 0; /* Flag "not parsed" */ - CTRACE(tfp, "HTGopher: Menu item: %s\n", line); + CTRACE((tfp, "HTGopher: Menu item: %s\n", line)); gtype = *p++; if (bytes > BytesReported + 1024) { @@ -421,7 +421,7 @@ PRIVATE void parse_menu ARGS2( PUTS(name); FREE(address); } else { /* parse error */ - CTRACE(tfp, "HTGopher: Bad menu item.\n"); + CTRACE((tfp, "HTGopher: Bad menu item.\n")); PUTS(line); } /* parse error */ @@ -940,7 +940,7 @@ PRIVATE int parse_cso_fields ARGS2( */ while ((ich = NEXT_CHAR) != EOF) { if (interrupted_in_htgetcharacter) { - CTRACE(tfp, "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n"); + CTRACE((tfp, "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n")); free_CSOfields(); buf[0] = '\0'; return HT_INTERRUPTED; @@ -1237,7 +1237,7 @@ PRIVATE int generate_cso_report ARGS1( */ while (!stop && (ich = NEXT_CHAR) != EOF) { if (interrupted_in_htgetcharacter) { - CTRACE(tfp, "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n"); + CTRACE((tfp, "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n")); _HTProgress (CONNECTION_INTERRUPTED); goto end_CSOreport; } @@ -1459,7 +1459,7 @@ PRIVATE int HTLoadCSO ARGS4( return -3; /* Bad if no name sepcified */ if (!*arg) return -2; /* Bad if name had zero length */ - CTRACE(tfp, "HTLoadCSO: Looking for %s\n", arg); + CTRACE((tfp, "HTLoadCSO: Looking for %s\n", arg)); /* ** Set up a socket to the server for the data. @@ -1469,26 +1469,26 @@ PRIVATE int HTLoadCSO ARGS4( /* ** Interrupt cleanly. */ - CTRACE(tfp, "HTLoadCSO: Interrupted on connect; recovering cleanly.\n"); + CTRACE((tfp, "HTLoadCSO: Interrupted on connect; recovering cleanly.\n")); _HTProgress (CONNECTION_INTERRUPTED); return HT_NOT_LOADED; } if (status < 0) { - CTRACE(tfp, "HTLoadCSO: Unable to connect to remote host for `%s'.\n", - arg); + CTRACE((tfp, "HTLoadCSO: Unable to connect to remote host for `%s'.\n", + arg)); return HTInetStatus("connect"); } HTInitInput(s); /* Set up input buffering */ HTSprintf0(&command, "fields%c%c", CR, LF); - CTRACE(tfp, "HTLoadCSO: Connected, writing command `%s' to socket %d\n", - command, s); + CTRACE((tfp, "HTLoadCSO: Connected, writing command `%s' to socket %d\n", + command, s)); _HTProgress (GOPHER_SENDING_CSO_REQUEST); status = NETWRITE(s, command, (int)strlen(command)); FREE(command); if (status < 0) { - CTRACE(tfp, "HTLoadCSO: Unable to send command.\n"); + CTRACE((tfp, "HTLoadCSO: Unable to send command.\n")); return HTInetStatus("send"); } _HTProgress (GOPHER_SENT_CSO_REQUEST); @@ -1655,12 +1655,12 @@ PRIVATE int HTLoadCSO ARGS4( (*Target->isa->put_block)(Target, command, strlen(command)); strcpy(buf, "</H2>\n"); (*Target->isa->put_block)(Target, buf, strlen(buf)); - CTRACE(tfp, "HTLoadCSO: Writing command `%s' to socket %d\n", - command, s); + CTRACE((tfp, "HTLoadCSO: Writing command `%s' to socket %d\n", + command, s)); status = NETWRITE(s, command, strlen(command)); FREE(command); if (status < 0) { - CTRACE(tfp, "HTLoadCSO: Unable to send command.\n"); + CTRACE((tfp, "HTLoadCSO: Unable to send command.\n")); free_CSOfields(); return HTInetStatus("send"); } @@ -1697,7 +1697,7 @@ PRIVATE int HTLoadGopher ARGS4( return -3; /* Bad if no name sepcified */ if (!*arg) return -2; /* Bad if name had zero length */ - CTRACE(tfp, "HTGopher: Looking for %s\n", arg); + CTRACE((tfp, "HTGopher: Looking for %s\n", arg)); /* ** If it's a port 105 GOPHER_CSO gtype with no ISINDEX token ('?'), @@ -1710,7 +1710,7 @@ PRIVATE int HTLoadGopher ARGS4( if ((len = strlen(arg)) > 5) { if (0 == strcmp((CONST char *)&arg[len-6], ":105/2")) { /* Use CSO gateway. */ - CTRACE(tfp, "HTGopher: Passing to CSO/PH gateway.\n"); + CTRACE((tfp, "HTGopher: Passing to CSO/PH gateway.\n")); return HTLoadCSO(arg, anAnchor, format_out, sink); } } @@ -1721,7 +1721,7 @@ PRIVATE int HTLoadGopher ARGS4( */ if (strstr(arg, ":79/0") != NULL) { #ifndef DISABLE_FINGER - CTRACE(tfp, "HTGopher: Passing to finger gateway.\n"); + CTRACE((tfp, "HTGopher: Passing to finger gateway.\n")); return HTLoadFinger(arg, anAnchor, format_out, sink); #else /* finger is disabled */ HTAlert(gettext("Unable to access document!")); @@ -1824,22 +1824,22 @@ PRIVATE int HTLoadGopher ARGS4( /* ** Interrupt cleanly. */ - CTRACE(tfp, "HTGopher: Interrupted on connect; recovering cleanly.\n"); + CTRACE((tfp, "HTGopher: Interrupted on connect; recovering cleanly.\n")); _HTProgress (CONNECTION_INTERRUPTED); FREE(command); return HT_NOT_LOADED; } if (status < 0) { - CTRACE(tfp, "HTGopher: Unable to connect to remote host for `%s'.\n", - arg); + CTRACE((tfp, "HTGopher: Unable to connect to remote host for `%s'.\n", + arg)); FREE(command); return HTInetStatus("connect"); } HTInitInput(s); /* Set up input buffering */ - CTRACE(tfp, "HTGopher: Connected, writing command `%s' to socket %d\n", - command, s); + CTRACE((tfp, "HTGopher: Connected, writing command `%s' to socket %d\n", + command, s)); #ifdef NOT_ASCII { @@ -1855,7 +1855,7 @@ PRIVATE int HTLoadGopher ARGS4( status = NETWRITE(s, command, (int)strlen(command)); FREE(command); if (status < 0) { - CTRACE(tfp, "HTGopher: Unable to send command.\n"); + CTRACE((tfp, "HTGopher: Unable to send command.\n")); return HTInetStatus("send"); } diff --git a/WWW/Library/Implementation/HTGroup.c b/WWW/Library/Implementation/HTGroup.c index b3a30861..341099bf 100644 --- a/WWW/Library/Implementation/HTGroup.c +++ b/WWW/Library/Implementation/HTGroup.c @@ -81,9 +81,9 @@ PRIVATE void syntax_error ARGS3(FILE *, fp, if (cnt < 40) buffer[cnt++] = (char) ch; buffer[cnt] = (char)0; - CTRACE(tfp, "%s %d before: '%s'\nHTGroup.c: %s (got %s)\n", + CTRACE((tfp, "%s %d before: '%s'\nHTGroup.c: %s (got %s)\n", "HTGroup.c: Syntax error in rule file at line", - HTlex_line, buffer, msg, lex_verbose(lex_item)); + HTlex_line, buffer, msg, lex_verbose(lex_item))); HTlex_line++; } @@ -506,8 +506,8 @@ PRIVATE BOOL part_match ARGS2(CONST char *, tcur, actual[cnt] = (char)0; status = HTAA_templateMatch(required, actual); - CTRACE(tfp, "part_match: req: '%s' act: '%s' match: %s\n", - required, actual, (status ? "yes" : "no")); + CTRACE((tfp, "part_match: req: '%s' act: '%s' match: %s\n", + required, actual, (status ? "yes" : "no"))); return status; } @@ -660,21 +660,21 @@ PUBLIC GroupDefList *HTAA_readGroupFile ARGS1(CONST char *, filename) while (NULL != (group_cache = (GroupCache*)HTList_nextObject(cur))) { if (!strcmp(filename, group_cache->group_filename)) { - CTRACE(tfp, "%s '%s' %s\n", + CTRACE((tfp, "%s '%s' %s\n", "HTAA_readGroupFile: group file", - filename, "already found in cache"); + filename, "already found in cache")); return group_cache->group_list; } /* if cache match */ } /* while cached files remain */ } /* cache exists */ - CTRACE(tfp, "HTAA_readGroupFile: reading group file `%s'\n", - filename); + CTRACE((tfp, "HTAA_readGroupFile: reading group file `%s'\n", + filename)); if (!(fp = fopen(filename, "r"))) { - CTRACE(tfp, "%s '%s'\n", + CTRACE((tfp, "%s '%s'\n", "HTAA_readGroupFile: unable to open group file", - filename); + filename)); return NULL; } @@ -687,7 +687,7 @@ PUBLIC GroupDefList *HTAA_readGroupFile ARGS1(CONST char *, filename) HTList_addObject(group_cache_list, (void*)group_cache); fclose(fp); - CTRACE(tfp, "Read group file '%s', results follow:\n", filename); + CTRACE((tfp, "Read group file '%s', results follow:\n", filename)); if (TRACE) print_group_def_list(group_cache->group_list); diff --git a/WWW/Library/Implementation/HTList.c b/WWW/Library/Implementation/HTList.c index 3ea53369..b49c6e58 100644 --- a/WWW/Library/Implementation/HTList.c +++ b/WWW/Library/Implementation/HTList.c @@ -71,8 +71,8 @@ PUBLIC HTList * HTList_appendList ARGS2( HTList * temp = start; if (!start) { - CTRACE(tfp, "HTList: Trying to append list %p to a nonexisting list\n", - tail); + CTRACE((tfp, "HTList: Trying to append list %p to a nonexisting list\n", + tail)); return NULL; } if (!(tail && tail->next)) @@ -103,8 +103,8 @@ PUBLIC void HTList_addObject ARGS2( me->next = newNode; } else { - CTRACE(tfp, "HTList: Trying to add object %p to a nonexisting list\n", - newObject); + CTRACE((tfp, "HTList: Trying to add object %p to a nonexisting list\n", + newObject)); } return; @@ -144,14 +144,14 @@ PUBLIC void HTList_insertObjectAt ARGS3( int Pos = pos; if (!temp) { - CTRACE(tfp, "HTList: Trying to add object %p to a nonexisting list\n", - newObject); + CTRACE((tfp, "HTList: Trying to add object %p to a nonexisting list\n", + newObject)); return; } if (Pos < 0) { Pos = 0; - CTRACE(tfp, "HTList: Treating negative object position %d as %d.\n", - pos, Pos); + CTRACE((tfp, "HTList: Treating negative object position %d as %d.\n", + pos, Pos)); } prevNode = temp; diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index f21ae35e..ced1e2e9 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -234,13 +234,13 @@ PRIVATE void HTMIME_put_character ARGS2( case 'a': case 'A': me->state = miA; - CTRACE(tfp, "HTMIME: Got 'A' at beginning of line, state now A\n"); + CTRACE((tfp, "HTMIME: Got 'A' at beginning of line, state now A\n")); break; case 'c': case 'C': me->state = miC; - CTRACE (tfp, "HTMIME: Got 'C' at beginning of line, state now C\n"); + CTRACE((tfp, "HTMIME: Got 'C' at beginning of line, state now C\n")); break; case 'd': @@ -248,13 +248,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ate:"; me->if_ok = miDATE; me->state = miCHECK; - CTRACE (tfp, "HTMIME: Got 'D' at beginning of line, checking for 'ate:'\n"); + CTRACE((tfp, "HTMIME: Got 'D' at beginning of line, checking for 'ate:'\n")); break; case 'e': case 'E': me->state = miE; - CTRACE (tfp, "HTMIME: Got 'E' at beginning of line, state now E\n"); + CTRACE((tfp, "HTMIME: Got 'E' at beginning of line, state now E\n")); break; case 'k': @@ -262,19 +262,19 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "eep-alive:"; me->if_ok = miKEEP_ALIVE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Got 'K' at beginning of line, checking for 'eep-alive:'\n"); + CTRACE((tfp, "HTMIME: Got 'K' at beginning of line, checking for 'eep-alive:'\n")); break; case 'l': case 'L': me->state = miL; - CTRACE (tfp, "HTMIME: Got 'L' at beginning of line, state now L\n"); + CTRACE((tfp, "HTMIME: Got 'L' at beginning of line, state now L\n")); break; case 'p': case 'P': me->state = miP; - CTRACE (tfp, "HTMIME: Got 'P' at beginning of line, state now P\n"); + CTRACE((tfp, "HTMIME: Got 'P' at beginning of line, state now P\n")); break; case 'r': @@ -282,37 +282,37 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "etry-after:"; me->if_ok = miRETRY_AFTER; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Got 'R' at beginning of line, checking for 'etry-after'\n"); + CTRACE((tfp, "HTMIME: Got 'R' at beginning of line, checking for 'etry-after'\n")); break; case 's': case 'S': me->state = miS; - CTRACE (tfp, "HTMIME: Got 'S' at beginning of line, state now S\n"); + CTRACE((tfp, "HTMIME: Got 'S' at beginning of line, state now S\n")); break; case 't': case 'T': me->state = miT; - CTRACE (tfp, "HTMIME: Got 'T' at beginning of line, state now T\n"); + CTRACE((tfp, "HTMIME: Got 'T' at beginning of line, state now T\n")); break; case 'u': case 'U': me->state = miU; - CTRACE (tfp, "HTMIME: Got 'U' at beginning of line, state now U\n"); + CTRACE((tfp, "HTMIME: Got 'U' at beginning of line, state now U\n")); break; case 'v': case 'V': me->state = miV; - CTRACE (tfp, "HTMIME: Got 'V' at beginning of line, state now V\n"); + CTRACE((tfp, "HTMIME: Got 'V' at beginning of line, state now V\n")); break; case 'w': case 'W': me->state = miW; - CTRACE (tfp, "HTMIME: Got 'W' at beginning of line, state now W\n"); + CTRACE((tfp, "HTMIME: Got 'W' at beginning of line, state now W\n")); break; case '\n': /* Blank line: End of Header! */ @@ -321,8 +321,8 @@ PRIVATE void HTMIME_put_character ARGS2( if (strchr(HTAtom_name(me->format), ';') != NULL) { char *cp = NULL, *cp1, *cp2, *cp3 = NULL, *cp4; - CTRACE(tfp, "HTMIME: Extended MIME Content-Type is %s\n", - HTAtom_name(me->format)); + CTRACE((tfp, "HTMIME: Extended MIME Content-Type is %s\n", + HTAtom_name(me->format))); StrAllocCopy(cp, HTAtom_name(me->format)); /* ** Note that the Content-Type value was converted @@ -514,17 +514,17 @@ PRIVATE void HTMIME_put_character ARGS2( StrAllocCopy(me->anchor->content_type, HTAtom_name(me->format)); if (!me->compression_encoding) { - CTRACE(tfp, "HTMIME: MIME Content-Type is '%s', converting to '%s'\n", - HTAtom_name(me->format), HTAtom_name(me->targetRep)); + CTRACE((tfp, "HTMIME: MIME Content-Type is '%s', converting to '%s'\n", + HTAtom_name(me->format), HTAtom_name(me->targetRep))); } else { /* ** Change the format to that for "www/compressed" ** and set up a stream to deal with it. - FM */ - CTRACE(tfp, "HTMIME: MIME Content-Type is '%s',\n", HTAtom_name(me->format)); + CTRACE((tfp, "HTMIME: MIME Content-Type is '%s',\n", HTAtom_name(me->format))); me->format = HTAtom_for("www/compressed"); - CTRACE(tfp, " Treating as '%s'. Converting to '%s'\n", - HTAtom_name(me->format), HTAtom_name(me->targetRep)); + CTRACE((tfp, " Treating as '%s'. Converting to '%s'\n", + HTAtom_name(me->format), HTAtom_name(me->targetRep))); } if (me->set_cookie != NULL || me->set_cookie2 != NULL) { LYSetCookie(me->set_cookie, @@ -536,7 +536,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->target = HTStreamStack(me->format, me->targetRep, me->sink , me->anchor); if (!me->target) { - CTRACE(tfp, "HTMIME: Can't translate! ** \n"); + CTRACE((tfp, "HTMIME: Can't translate! ** \n")); me->target = me->sink; /* Cheat */ } if (me->target) { @@ -567,7 +567,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "cept-ranges:"; me->if_ok = miACCEPT_RANGES; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was A, found C, checking for 'cept-ranges:'\n"); + CTRACE((tfp, "HTMIME: Was A, found C, checking for 'cept-ranges:'\n")); break; case 'g': @@ -575,18 +575,18 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "e:"; me->if_ok = miAGE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was A, found G, checking for 'e:'\n"); + CTRACE((tfp, "HTMIME: Was A, found G, checking for 'e:'\n")); break; case 'l': case 'L': me->state = miAL; - CTRACE(tfp, "HTMIME: Was A, found L, state now AL'\n"); + CTRACE((tfp, "HTMIME: Was A, found L, state now AL'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'g' or 'l'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'g' or 'l'")); goto bad_field_name; } /* switch on character */ @@ -599,7 +599,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ow:"; me->if_ok = miALLOW; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was AL, found L, checking for 'ow:'\n"); + CTRACE((tfp, "HTMIME: Was AL, found L, checking for 'ow:'\n")); break; case 't': @@ -607,12 +607,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ernates:"; me->if_ok = miALTERNATES; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was AL, found T, checking for 'ernates:'\n"); + CTRACE((tfp, "HTMIME: Was AL, found T, checking for 'ernates:'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'l' or 't'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'l' or 't'")); goto bad_field_name; } /* switch on character */ @@ -625,18 +625,18 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "che-control:"; me->if_ok = miCACHE_CONTROL; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was C, found A, checking for 'che-control:'\n"); + CTRACE((tfp, "HTMIME: Was C, found A, checking for 'che-control:'\n")); break; case 'o': case 'O': me->state = miCO; - CTRACE(tfp, "HTMIME: Was C, found O, state now CO'\n"); + CTRACE((tfp, "HTMIME: Was C, found O, state now CO'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'a' or 'o'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'a' or 'o'")); goto bad_field_name; } /* switch on character */ @@ -647,7 +647,7 @@ PRIVATE void HTMIME_put_character ARGS2( case 'n': case 'N': me->state = miCON; - CTRACE(tfp, "HTMIME: Was CO, found N, state now CON\n"); + CTRACE((tfp, "HTMIME: Was CO, found N, state now CON\n")); break; case 'o': @@ -655,12 +655,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "kie:"; me->if_ok = miCOOKIE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CO, found O, checking for 'kie:'\n"); + CTRACE((tfp, "HTMIME: Was CO, found O, checking for 'kie:'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'n' or 'o'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'n' or 'o'")); goto bad_field_name; } /* switch on character */ @@ -673,7 +673,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ection:"; me->if_ok = miCONNECTION; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CON, found N, checking for 'ection:'\n"); + CTRACE((tfp, "HTMIME: Was CON, found N, checking for 'ection:'\n")); break; case 't': @@ -681,12 +681,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ent-"; me->if_ok = miCONTENT_; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CON, found T, checking for 'ent-'\n"); + CTRACE((tfp, "HTMIME: Was CON, found T, checking for 'ent-'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'n' or 't'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'n' or 't'")); goto bad_field_name; } /* switch on character */ @@ -699,7 +699,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ag:"; me->if_ok = miETAG; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was E, found T, checking for 'ag:'\n"); + CTRACE((tfp, "HTMIME: Was E, found T, checking for 'ag:'\n")); break; case 'x': @@ -707,12 +707,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "pires:"; me->if_ok = miEXPIRES; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was E, found X, checking for 'pires:'\n"); + CTRACE((tfp, "HTMIME: Was E, found X, checking for 'pires:'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'t' or 'x'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'t' or 'x'")); goto bad_field_name; } /* switch on character */ @@ -725,7 +725,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "st-modified:"; me->if_ok = miLAST_MODIFIED; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was L, found A, checking for 'st-modified:'\n"); + CTRACE((tfp, "HTMIME: Was L, found A, checking for 'st-modified:'\n")); break; case 'i': @@ -733,7 +733,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "nk:"; me->if_ok = miLINK; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was L, found I, checking for 'nk:'\n"); + CTRACE((tfp, "HTMIME: Was L, found I, checking for 'nk:'\n")); break; case 'o': @@ -741,12 +741,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "cation:"; me->if_ok = miLOCATION; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was L, found O, checking for 'cation:'\n"); + CTRACE((tfp, "HTMIME: Was L, found O, checking for 'cation:'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'a', 'i' or 'o'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'a', 'i' or 'o'")); goto bad_field_name; } /* switch on character */ @@ -757,7 +757,7 @@ PRIVATE void HTMIME_put_character ARGS2( case 'r': case 'R': me->state = miPR; - CTRACE(tfp, "HTMIME: Was P, found R, state now PR'\n"); + CTRACE((tfp, "HTMIME: Was P, found R, state now PR'\n")); break; case 'u': @@ -765,12 +765,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "blic:"; me->if_ok = miPUBLIC; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was P, found U, checking for 'blic:'\n"); + CTRACE((tfp, "HTMIME: Was P, found U, checking for 'blic:'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'r' or 'u'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'r' or 'u'")); goto bad_field_name; } /* switch on character */ @@ -783,7 +783,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "gma:"; me->if_ok = miPRAGMA; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was PR, found A, checking for 'gma'\n"); + CTRACE((tfp, "HTMIME: Was PR, found A, checking for 'gma'\n")); break; case 'o': @@ -791,12 +791,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "xy-authenticate:"; me->if_ok = miPROXY_AUTHENTICATE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was PR, found O, checking for 'xy-authenticate'\n"); + CTRACE((tfp, "HTMIME: Was PR, found O, checking for 'xy-authenticate'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'a' or 'o'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'a' or 'o'")); goto bad_field_name; } /* switch on character */ @@ -809,18 +809,18 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "fe:"; me->if_ok = miSAFE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was S, found A, checking for 'fe:'\n"); + CTRACE((tfp, "HTMIME: Was S, found A, checking for 'fe:'\n")); break; case 'e': case 'E': me->state = miSE; - CTRACE(tfp, "HTMIME: Was S, found E, state now SE'\n"); + CTRACE((tfp, "HTMIME: Was S, found E, state now SE'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'a' or 'e'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'a' or 'e'")); goto bad_field_name; } /* switch on character */ @@ -833,7 +833,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ver:"; me->if_ok = miSERVER; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was SE, found R, checking for 'ver'\n"); + CTRACE((tfp, "HTMIME: Was SE, found R, checking for 'ver'\n")); break; case 't': @@ -841,12 +841,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "-cookie"; me->if_ok = miSET_COOKIE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was SE, found T, checking for '-cookie'\n"); + CTRACE((tfp, "HTMIME: Was SE, found T, checking for '-cookie'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'r' or 't'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'r' or 't'")); goto bad_field_name; } /* switch on character */ @@ -857,19 +857,19 @@ PRIVATE void HTMIME_put_character ARGS2( case ':': me->field = miSET_COOKIE1; /* remember it */ me->state = miSKIP_GET_VALUE; - CTRACE(tfp, "HTMIME: Was SET_COOKIE, found :, processing\n"); + CTRACE((tfp, "HTMIME: Was SET_COOKIE, found :, processing\n")); break; case '2': me->check_pointer = ":"; me->if_ok = miSET_COOKIE2; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was SET_COOKIE, found 2, checking for ':'\n"); + CTRACE((tfp, "HTMIME: Was SET_COOKIE, found 2, checking for ':'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "':' or '2'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "':' or '2'")); goto bad_field_name; } /* switch on character */ @@ -882,7 +882,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "tle:"; me->if_ok = miTITLE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was T, found I, checking for 'tle:'\n"); + CTRACE((tfp, "HTMIME: Was T, found I, checking for 'tle:'\n")); break; case 'r': @@ -890,12 +890,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ansfer-encoding:"; me->if_ok = miTRANSFER_ENCODING; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was T, found R, checking for 'ansfer-encoding'\n"); + CTRACE((tfp, "HTMIME: Was T, found R, checking for 'ansfer-encoding'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'i' or 'r'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'i' or 'r'")); goto bad_field_name; } /* switch on character */ @@ -908,7 +908,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "grade:"; me->if_ok = miUPGRADE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was U, found P, checking for 'grade:'\n"); + CTRACE((tfp, "HTMIME: Was U, found P, checking for 'grade:'\n")); break; case 'r': @@ -916,12 +916,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "i:"; me->if_ok = miURI; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was U, found R, checking for 'i:'\n"); + CTRACE((tfp, "HTMIME: Was U, found R, checking for 'i:'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'p' or 'r'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'p' or 'r'")); goto bad_field_name; } /* switch on character */ @@ -934,7 +934,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ry:"; me->if_ok = miVARY; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was V, found A, checking for 'ry:'\n"); + CTRACE((tfp, "HTMIME: Was V, found A, checking for 'ry:'\n")); break; case 'i': @@ -942,12 +942,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "a:"; me->if_ok = miVIA; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was V, found I, checking for 'a:'\n"); + CTRACE((tfp, "HTMIME: Was V, found I, checking for 'a:'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'a' or 'i'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'a' or 'i'")); goto bad_field_name; } /* switch on character */ @@ -960,7 +960,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "rning:"; me->if_ok = miWARNING; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was W, found A, checking for 'rning:'\n"); + CTRACE((tfp, "HTMIME: Was W, found A, checking for 'rning:'\n")); break; case 'w': @@ -968,12 +968,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "w-authenticate:"; me->if_ok = miWWW_AUTHENTICATE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was W, found W, checking for 'w-authenticate:'\n"); + CTRACE((tfp, "HTMIME: Was W, found W, checking for 'w-authenticate:'\n")); break; default: - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'a' or 'w'"); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'a' or 'w'")); goto bad_field_name; } /* switch on character */ @@ -984,14 +984,14 @@ PRIVATE void HTMIME_put_character ARGS2( if (!*me->check_pointer) me->state = me->if_ok; } else { /* Error */ - CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", - c, me->check_pointer - 1); + CTRACE((tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, me->check_pointer - 1)); goto bad_field_name; } break; case miCONTENT_: - CTRACE (tfp, "HTMIME: in case CONTENT_\n"); + CTRACE((tfp, "HTMIME: in case CONTENT_\n")); switch(c) { case 'b': @@ -999,7 +999,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ase:"; me->if_ok = miCONTENT_BASE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_, found B, checking for 'ase:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_, found B, checking for 'ase:'\n")); break; case 'd': @@ -1007,7 +1007,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "isposition:"; me->if_ok = miCONTENT_DISPOSITION; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_, found D, checking for 'isposition:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_, found D, checking for 'isposition:'\n")); break; case 'e': @@ -1015,7 +1015,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ncoding:"; me->if_ok = miCONTENT_ENCODING; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_, found E, checking for 'ncoding:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_, found E, checking for 'ncoding:'\n")); break; case 'f': @@ -1023,13 +1023,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "eatures:"; me->if_ok = miCONTENT_FEATURES; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_, found F, checking for 'eatures:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_, found F, checking for 'eatures:'\n")); break; case 'l': case 'L': me->state = miCONTENT_L; - CTRACE (tfp, "HTMIME: Was CONTENT_, found L, state now CONTENT_L\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_, found L, state now CONTENT_L\n")); break; case 'm': @@ -1037,7 +1037,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "d5:"; me->if_ok = miCONTENT_MD5; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_, found M, checking for 'd5:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_, found M, checking for 'd5:'\n")); break; case 'r': @@ -1045,24 +1045,24 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ange:"; me->if_ok = miCONTENT_RANGE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_, found R, checking for 'ange:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_, found R, checking for 'ange:'\n")); break; case 't': case 'T': me->state = miCONTENT_T; - CTRACE(tfp, "HTMIME: Was CONTENT_, found T, state now CONTENT_T\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_, found T, state now CONTENT_T\n")); break; default: - CTRACE(tfp, "HTMIME: Was CONTENT_, found nothing; bleah\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_, found nothing; bleah\n")); goto bad_field_name; } /* switch on character */ break; case miCONTENT_L: - CTRACE (tfp, "HTMIME: in case CONTENT_L\n"); + CTRACE((tfp, "HTMIME: in case CONTENT_L\n")); switch(c) { case 'a': @@ -1070,7 +1070,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "nguage:"; me->if_ok = miCONTENT_LANGUAGE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_L, found A, checking for 'nguage:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_L, found A, checking for 'nguage:'\n")); break; case 'e': @@ -1078,7 +1078,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ngth:"; me->if_ok = miCONTENT_LENGTH; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_L, found E, checking for 'ngth:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_L, found E, checking for 'ngth:'\n")); break; case 'o': @@ -1086,18 +1086,18 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "cation:"; me->if_ok = miCONTENT_LOCATION; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_L, found O, checking for 'cation:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_L, found O, checking for 'cation:'\n")); break; default: - CTRACE (tfp, "HTMIME: Was CONTENT_L, found nothing; bleah\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_L, found nothing; bleah\n")); goto bad_field_name; } /* switch on character */ break; case miCONTENT_T: - CTRACE (tfp, "HTMIME: in case CONTENT_T\n"); + CTRACE((tfp, "HTMIME: in case CONTENT_T\n")); switch(c) { case 'r': @@ -1105,7 +1105,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ansfer-encoding:"; me->if_ok = miCONTENT_TRANSFER_ENCODING; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_T, found R, checking for 'ansfer-encoding:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_T, found R, checking for 'ansfer-encoding:'\n")); break; case 'y': @@ -1113,11 +1113,11 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "pe:"; me->if_ok = miCONTENT_TYPE; me->state = miCHECK; - CTRACE(tfp, "HTMIME: Was CONTENT_T, found Y, checking for 'pe:'\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_T, found Y, checking for 'pe:'\n")); break; default: - CTRACE (tfp, "HTMIME: Was CONTENT_T, found nothing; bleah\n"); + CTRACE((tfp, "HTMIME: Was CONTENT_T, found nothing; bleah\n")); goto bad_field_name; } /* switch on character */ @@ -1197,28 +1197,28 @@ PRIVATE void HTMIME_put_character ARGS2( switch (me->field) { case miACCEPT_RANGES: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Accept-Ranges: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Accept-Ranges: '%s'\n", + me->value)); break; case miAGE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Age: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Age: '%s'\n", + me->value)); break; case miALLOW: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Allow: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Allow: '%s'\n", + me->value)); break; case miALTERNATES: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Alternates: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Alternates: '%s'\n", + me->value)); break; case miCACHE_CONTROL: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Cache-Control: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Cache-Control: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1269,18 +1269,18 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCOOKIE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Cookie: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Cookie: '%s'\n", + me->value)); break; case miCONNECTION: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Connection: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Connection: '%s'\n", + me->value)); break; case miCONTENT_BASE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Base: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Base: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1290,8 +1290,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_DISPOSITION: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Disposition: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Disposition: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1340,8 +1340,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_ENCODING: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Encoding: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Encoding: '%s'\n", + me->value)); if (!(me->value && *me->value) || !strcasecomp(me->value, "identity")) break; @@ -1358,7 +1358,7 @@ PRIVATE void HTMIME_put_character ARGS2( ** Some server indicated "8bit", "7bit" or "binary" ** inappropriately. We'll ignore it. - FM */ - CTRACE(tfp, " Ignoring it!\n"); + CTRACE((tfp, " Ignoring it!\n")); } else { /* ** Save it to use as a flag for setting @@ -1369,13 +1369,13 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_FEATURES: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Features: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Features: '%s'\n", + me->value)); break; case miCONTENT_LANGUAGE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Language: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Language: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1386,8 +1386,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_LENGTH: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Length: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Length: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1396,13 +1396,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->anchor->content_length = atoi(me->value); if (me->anchor->content_length < 0) me->anchor->content_length = 0; - CTRACE(tfp, " Converted to integer: '%d'\n", - me->anchor->content_length); + CTRACE((tfp, " Converted to integer: '%d'\n", + me->anchor->content_length)); break; case miCONTENT_LOCATION: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Location: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Location: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1412,8 +1412,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_MD5: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-MD5: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-MD5: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1423,13 +1423,13 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_RANGE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Range: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Range: '%s'\n", + me->value)); break; case miCONTENT_TRANSFER_ENCODING: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Transfer-Encoding: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Transfer-Encoding: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1441,8 +1441,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_TYPE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Content-Type: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Content-Type: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1459,8 +1459,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miDATE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Date: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Date: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1473,8 +1473,8 @@ PRIVATE void HTMIME_put_character ARGS2( * an entity tag consists of an opaque quoted string, * possibly prefixed by a weakness indicator. */ - CTRACE(tfp, "HTMIME: PICKED UP ETag: %s\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP ETag: %s\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1484,8 +1484,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miEXPIRES: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Expires: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Expires: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1495,13 +1495,13 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miKEEP_ALIVE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Keep-Alive: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Keep-Alive: '%s'\n", + me->value)); break; case miLAST_MODIFIED: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Last-Modified: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Last-Modified: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1511,18 +1511,18 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miLINK: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Link: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Link: '%s'\n", + me->value)); break; case miLOCATION: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Location: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Location: '%s'\n", + me->value)); break; case miPRAGMA: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Pragma: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Pragma: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1533,23 +1533,23 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miPROXY_AUTHENTICATE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Proxy-Authenticate: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Proxy-Authenticate: '%s'\n", + me->value)); break; case miPUBLIC: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Public: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Public: '%s'\n", + me->value)); break; case miRETRY_AFTER: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Retry-After: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Retry-After: '%s'\n", + me->value)); break; case miSAFE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Safe: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Safe: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1569,8 +1569,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miSERVER: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Server: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Server: '%s'\n", + me->value)); if (!(me->value && *me->value)) break; /* @@ -1580,8 +1580,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miSET_COOKIE1: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Set-Cookie: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Set-Cookie: '%s'\n", + me->value)); if (me->set_cookie == NULL) { StrAllocCopy(me->set_cookie, me->value); } else { @@ -1591,8 +1591,8 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miSET_COOKIE2: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Set-Cookie2: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Set-Cookie2: '%s'\n", + me->value)); if (me->set_cookie2 == NULL) { StrAllocCopy(me->set_cookie2, me->value); } else { @@ -1602,43 +1602,43 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miTITLE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Title: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Title: '%s'\n", + me->value)); break; case miTRANSFER_ENCODING: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Transfer-Encoding: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Transfer-Encoding: '%s'\n", + me->value)); break; case miUPGRADE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Upgrade: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Upgrade: '%s'\n", + me->value)); break; case miURI: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP URI: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP URI: '%s'\n", + me->value)); break; case miVARY: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Vary: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Vary: '%s'\n", + me->value)); break; case miVIA: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Via: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Via: '%s'\n", + me->value)); break; case miWARNING: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP Warning: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP Warning: '%s'\n", + me->value)); break; case miWWW_AUTHENTICATE: HTMIME_TrimDoubleQuotes(me->value); - CTRACE(tfp, "HTMIME: PICKED UP WWW-Authenticate: '%s'\n", - me->value); + CTRACE((tfp, "HTMIME: PICKED UP WWW-Authenticate: '%s'\n", + me->value)); break; default: /* Should never get here */ break; @@ -1666,7 +1666,7 @@ PRIVATE void HTMIME_put_character ARGS2( return; value_too_long: - CTRACE(tfp, "HTMIME: *** Syntax error. (string too long)\n"); + CTRACE((tfp, "HTMIME: *** Syntax error. (string too long)\n")); bad_field_name: /* Ignore it */ me->state = miJUNK_LINE; @@ -1691,7 +1691,7 @@ PRIVATE void HTMIME_put_string ARGS2( (*me->targetClass.put_string)(me->target,s); } else if (me->state != MIME_IGNORE) { - CTRACE(tfp, "HTMIME: %s\n", s); + CTRACE((tfp, "HTMIME: %s\n", s)); for (p=s; *p; p++) HTMIME_put_character(me, *p); @@ -1713,7 +1713,7 @@ PRIVATE void HTMIME_write ARGS3( (*me->targetClass.put_block)(me->target, s, l); } else { - CTRACE(tfp, "HTMIME: %.*s\n", l, s); + CTRACE((tfp, "HTMIME: %.*s\n", l, s)); for (p = s; p < s+l; p++) HTMIME_put_character(me, *p); diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c index 97d94de5..66397291 100644 --- a/WWW/Library/Implementation/HTMLDTD.c +++ b/WWW/Library/Implementation/HTMLDTD.c @@ -1651,10 +1651,10 @@ PUBLIC void HTSwitchDTD ARGS1( BOOL, new) { if (TRACE) - CTRACE(tfp,"HTMLDTD: Copying DTD element info of size %d, %d * %d\n", + CTRACE((tfp,"HTMLDTD: Copying DTD element info of size %d, %d * %d\n", (int) (new ? sizeof(tags_new) : sizeof(tags_old)), HTML_ELEMENTS, - (int) sizeof(HTTag)); + (int) sizeof(HTTag))); if (new) memcpy(tags, tags_new, HTML_ELEMENTS * sizeof(HTTag)); else diff --git a/WWW/Library/Implementation/HTMLGen.c b/WWW/Library/Implementation/HTMLGen.c index a5269eba..6af8a344 100644 --- a/WWW/Library/Implementation/HTMLGen.c +++ b/WWW/Library/Implementation/HTMLGen.c @@ -372,8 +372,8 @@ PRIVATE void HTMLGen_start_element ARGS6( if (displayStyles[element_number + STARTAT].color > -2) /* actually set */ { - CTRACE(tfp, "CSSTRIM: start_element: top <%s>\n", - HTML_dtd.tags[element_number].name); + CTRACE((tfp, "CSSTRIM: start_element: top <%s>\n", + HTML_dtd.tags[element_number].name)); do_cstyle_flush(me); HText_characterStyle(me->text, hcode, 1); } @@ -412,7 +412,7 @@ PRIVATE void HTMLGen_start_element ARGS6( if (title && *title) { HTSprintf0(&title_tmp, "link.%s.%s", value[HTML_LINK_CLASS], title); - CTRACE(tfp, "CSSTRIM:link=%s\n", title_tmp); + CTRACE((tfp, "CSSTRIM:link=%s\n", title_tmp)); do_cstyle_flush(me); HText_characterStyle(me->text, hash_code(title_tmp), 1); @@ -492,7 +492,7 @@ PRIVATE void HTMLGen_start_element ARGS6( if (LYPreparsedSource && REALLY_EMPTY(element_number)) { - CTRACE(tfp, "STYLE:begin_element:ending EMPTY element style\n"); + CTRACE((tfp, "STYLE:begin_element:ending EMPTY element style\n")); do_cstyle_flush(me); #if !defined(USE_HASH) HText_characterStyle(me->text, element_number+STARTAT, STACK_OFF); @@ -546,7 +546,7 @@ PRIVATE void HTMLGen_end_element ARGS3( if (LYPreparsedSource && !REALLY_EMPTY(element_number)) { - CTRACE(tfp, "STYLE:end_element: ending non-EMPTY style\n"); + CTRACE((tfp, "STYLE:end_element: ending non-EMPTY style\n")); do_cstyle_flush(me); #if !defined(USE_HASH) HText_characterStyle(me->text, element_number+STARTAT, STACK_OFF); diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index 6c781e51..2cd431e1 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -196,16 +196,16 @@ PRIVATE BOOL initialize NOARGS #else if (getenv("NNTPSERVER")) { StrAllocCopy(HTNewsHost, (char *)getenv("NNTPSERVER")); - CTRACE(tfp, "HTNews: NNTPSERVER defined as `%s'\n", - HTNewsHost); + CTRACE((tfp, "HTNews: NNTPSERVER defined as `%s'\n", + HTNewsHost)); } else { char server_name[256]; FILE* fp = fopen(SERVER_FILE, "r"); if (fp) { if (fscanf(fp, "%s", server_name)==1) { StrAllocCopy(HTNewsHost, server_name); - CTRACE(tfp, "HTNews: File %s defines news host as `%s'\n", - SERVER_FILE, HTNewsHost); + CTRACE((tfp, "HTNews: File %s defines news host as `%s'\n", + SERVER_FILE, HTNewsHost)); } fclose(fp); } @@ -240,7 +240,7 @@ PRIVATE int response ARGS1(CONST char *,command) if (command) { int status; int length = strlen(command); - CTRACE(tfp, "NNTP command to be sent: %s", command); + CTRACE((tfp, "NNTP command to be sent: %s", command)); #ifdef NOT_ASCII { CONST char * p; @@ -255,7 +255,7 @@ PRIVATE int response ARGS1(CONST char *,command) status = NEWS_NETWRITE(s, (char *)command, length); #endif /* NOT_ASCII */ if (status < 0){ - CTRACE(tfp, "HTNews: Unable to send command. Disconnecting.\n"); + CTRACE((tfp, "HTNews: Unable to send command. Disconnecting.\n")); NEWS_NETCLOSE(s); s = -1; return status; @@ -267,7 +267,7 @@ PRIVATE int response ARGS1(CONST char *,command) if (((*p++ = (char) ich) == LF) || (p == &response_text[LINE_LENGTH])) { *--p = '\0'; /* Terminate the string */ - CTRACE(tfp, "NNTP Response: %s\n", response_text); + CTRACE((tfp, "NNTP Response: %s\n", response_text)); sscanf(response_text, "%d", &result); return result; } /* if end of line */ @@ -275,11 +275,11 @@ PRIVATE int response ARGS1(CONST char *,command) if (ich == EOF) { *(p-1) = '\0'; if (interrupted_in_htgetcharacter) { - CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", - s); + CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n", + s)); } else { - CTRACE(tfp, "HTNews: EOF on read, closing socket %d\n", - s); + CTRACE((tfp, "HTNews: EOF on read, closing socket %d\n", + s)); } NEWS_NETCLOSE(s); /* End of file, close socket */ s = -1; @@ -566,7 +566,7 @@ PRIVATE char * author_name ARGS1 (char *,email) char *p, *e; StrAllocCopy(name, email); - CTRACE(tfp,"Trying to find name in: %s\n",name); + CTRACE((tfp,"Trying to find name in: %s\n",name)); if ((p = strrchr(name, '(')) && (e = strrchr(name, ')'))) { if (e > p) { @@ -602,7 +602,7 @@ PRIVATE char * author_address ARGS1(char *,email) char *p, *at, *e; StrAllocCopy(address, email); - CTRACE(tfp,"Trying to find address in: %s\n",address); + CTRACE((tfp,"Trying to find address in: %s\n",address)); if ((p = strrchr(address, '<'))) { if ((e = strrchr(p, '>')) && (at = strrchr(p, '@'))) { @@ -774,7 +774,7 @@ PRIVATE void write_anchors ARGS1 (char *,text) */ PRIVATE void abort_socket NOARGS { - CTRACE(tfp, "HTNews: EOF on read, closing socket %d\n", s); + CTRACE((tfp, "HTNews: EOF on read, closing socket %d\n", s)); NEWS_NETCLOSE(s); /* End of file, close socket */ if (rawtext) { RAW_PUTS("Network Error: connection lost\n"); @@ -1060,8 +1060,8 @@ PRIVATE int read_article ARGS1( if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", - s); + CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n", + s)); NEWS_NETCLOSE(s); s = -1; return(HT_INTERRUPTED); @@ -1071,7 +1071,7 @@ PRIVATE int read_article ARGS1( } if (((char)ich == LF) || (p == &line[LINE_LENGTH])) { *--p = '\0'; /* Terminate the string */ - CTRACE(tfp, "H %s\n", line); + CTRACE((tfp, "H %s\n", line)); if (line[0] == '\t' || line[0] == ' ') { int i = 0; @@ -1390,8 +1390,8 @@ PRIVATE int read_article ARGS1( if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", - s); + CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n", + s)); NEWS_NETCLOSE(s); s = -1; return(HT_INTERRUPTED); @@ -1401,7 +1401,7 @@ PRIVATE int read_article ARGS1( } if (((char)ich == LF) || (p == &line[LINE_LENGTH])) { *p++ = '\0'; /* Terminate the string */ - CTRACE(tfp, "B %s", line); + CTRACE((tfp, "B %s", line)); #if NEWS_DEBUG /* 1997/11/09 (Sun) 15:56:11 */ debug_print(line); /* @@@ */ #endif @@ -1599,8 +1599,8 @@ PRIVATE int read_list ARGS1(char *, arg) if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", - s); + CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n", + s)); NEWS_NETCLOSE(s); s = -1; return(HT_INTERRUPTED); @@ -1619,7 +1619,7 @@ PRIVATE int read_list ARGS1(char *, arg) continue; } } else if (p == &line[LINE_LENGTH]) { - CTRACE(tfp, "b %.*s%c[...]\n", (LINE_LENGTH), line, ch); + CTRACE((tfp, "b %.*s%c[...]\n", (LINE_LENGTH), line, ch)); *p = '\0'; if (ch == LF) { ; /* Will be dealt with below */ @@ -1629,7 +1629,7 @@ PRIVATE int read_list ARGS1(char *, arg) } else if (strchr(line, ' ') == NULL && strchr(line, '\t') == NULL) { /* No separator found */ - CTRACE(tfp, "HTNews..... group name too long, discarding.\n"); + CTRACE((tfp, "HTNews..... group name too long, discarding.\n")); skip_this_line = YES; /* ignore whole line */ continue; } else { @@ -1641,7 +1641,7 @@ PRIVATE int read_list ARGS1(char *, arg) if (ch == LF) { skip_rest_of_line = NO; /* done, reset flag */ *p = '\0'; /* Terminate the string */ - CTRACE(tfp, "B %s", line); + CTRACE((tfp, "B %s", line)); if (line[0] == '.') { /* ** End of article? @@ -1750,8 +1750,8 @@ PRIVATE int read_group ARGS3( PUTC('\n'); sscanf(response_text, " %d %d %d %d", &status, &count, &first, &last); - CTRACE(tfp, "Newsgroup status=%d, count=%d, (%d-%d) required:(%d-%d)\n", - status, count, first, last, first_required, last_required); + CTRACE((tfp, "Newsgroup status=%d, count=%d, (%d-%d) required:(%d-%d)\n", + status, count, first, last, first_required, last_required)); if (last == 0) { PUTS(gettext("\nNo articles in this group.\n")); goto add_post; @@ -1773,8 +1773,8 @@ PRIVATE int read_group ARGS3( if (last_required-first_required+1 > HTNewsMaxChunk) { /* Trim this block */ first_required = last_required-HTNewsChunkSize+1; } - CTRACE(tfp, " Chunk will be (%d-%d)\n", - first_required, last_required); + CTRACE((tfp, " Chunk will be (%d-%d)\n", + first_required, last_required)); /* ** Set window title. @@ -1798,7 +1798,7 @@ PRIVATE int read_group ARGS3( before = first_required-HTNewsChunkSize; HTSprintf0(&dbuf, "%s%s/%d-%d", NewsHREF, groupName, before, first_required-1); - CTRACE(tfp, " Block before is %s\n", dbuf); + CTRACE((tfp, " Block before is %s\n", dbuf)); PUTC('('); start_anchor(dbuf); PUTS(gettext("Earlier articles")); @@ -1828,8 +1828,8 @@ PRIVATE int read_group ARGS3( if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", - s); + CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n", + s)); NEWS_NETCLOSE(s); s = -1; return(HT_INTERRUPTED); @@ -1839,7 +1839,7 @@ PRIVATE int read_group ARGS3( } if (((char)ich == '\n') || (p == &line[LINE_LENGTH])) { *p = '\0'; /* Terminate the string */ - CTRACE(tfp, "X %s", line); + CTRACE((tfp, "X %s", line)); if (line[0] == '.') { /* ** End of article? @@ -1932,8 +1932,8 @@ PRIVATE int read_group ARGS3( if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", - s); + CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n", + s)); NEWS_NETCLOSE(s); s = -1; return(HT_INTERRUPTED); @@ -1946,7 +1946,7 @@ PRIVATE int read_group ARGS3( *--p = '\0'; /* Terminate & chop LF*/ p = line; /* Restart at beginning */ - CTRACE(tfp, "G %s\n", line); + CTRACE((tfp, "G %s\n", line)); switch(line[0]) { case '.': @@ -2045,8 +2045,8 @@ PRIVATE int read_group ARGS3( */ } else if (status == HT_INTERRUPTED) { interrupted_in_htgetcharacter = 0; - CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", - s); + CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n", + s)); NEWS_NETCLOSE(s); s = -1; return(HT_INTERRUPTED); @@ -2087,7 +2087,7 @@ PRIVATE int read_group ARGS3( else HTSprintf0(&dbuf, "%s%s/%d-%d", NewsHREF, groupName, last_required+1, after); - CTRACE(tfp, " Block after is %s\n", dbuf); + CTRACE((tfp, " Block after is %s\n", dbuf)); PUTC('('); start_anchor(dbuf); PUTS(gettext("Later articles")); @@ -2158,7 +2158,7 @@ PRIVATE int HTLoadNews ARGS4( format_out == HTAtom_for("www/dump")); rawtext = NO; - CTRACE(tfp, "HTNews: Looking for %s\n", arg); + CTRACE((tfp, "HTNews: Looking for %s\n", arg)); if (!initialized) initialized = initialize(); @@ -2361,8 +2361,8 @@ PRIVATE int HTLoadNews ARGS4( sprintf(proxycmd, "GET %.*s%c%c%c%c", (int) sizeof(proxycmd)-9, command, CR, LF, CR, LF); - CTRACE(tfp, "HTNews: Proxy command is '%.*s'\n", - (int)(strlen(proxycmd) - 4), proxycmd); + CTRACE((tfp, "HTNews: Proxy command is '%.*s'\n", + (int)(strlen(proxycmd) - 4), proxycmd)); strcat(command, "/"); StrAllocCopy(ProxyHREF, NewsHREF); StrAllocCopy(NewsHREF, command); @@ -2503,7 +2503,7 @@ PRIVATE int HTLoadNews ARGS4( } else { SnipIn (url, "%.*s", 1, NewsHREF); } - CTRACE (tfp, "News: doing HTDoConnect on '%s'\n", url); + CTRACE((tfp, "News: doing HTDoConnect on '%s'\n", url)); _HTProgress(gettext("Connecting to NewsHost ...")); @@ -2512,7 +2512,7 @@ PRIVATE int HTLoadNews ARGS4( /* ** Interrupt cleanly. */ - CTRACE(tfp, "HTNews: Interrupted on connect; recovering cleanly.\n"); + CTRACE((tfp, "HTNews: Interrupted on connect; recovering cleanly.\n")); _HTProgress(CONNECTION_INTERRUPTED); if (!(post_wanted || reply_wanted || spost_wanted || sreply_wanted)) { @@ -2532,7 +2532,7 @@ PRIVATE int HTLoadNews ARGS4( if (status < 0) { NEWS_NETCLOSE(s); s = -1; - CTRACE(tfp, "HTNews: Unable to connect to news host.\n"); + CTRACE((tfp, "HTNews: Unable to connect to news host.\n")); if (retries < 1) continue; if (!(post_wanted || reply_wanted || @@ -2551,13 +2551,13 @@ PRIVATE int HTLoadNews ARGS4( } return HTLoadError(stream, 500, dbuf); } else { - CTRACE(tfp, "HTNews: Connected to news host %s.\n", - NewsHost); + CTRACE((tfp, "HTNews: Connected to news host %s.\n", + NewsHost)); HTInitInput(s); /* set up buffering */ if (proxycmd[0]) { status = NEWS_NETWRITE(s, proxycmd, strlen(proxycmd)); - CTRACE(tfp, "HTNews: Proxy command returned status '%d'.\n", - status); + CTRACE((tfp, "HTNews: Proxy command returned status '%d'.\n", + status)); } if (((status = response(NULL)) / 100) != 2) { NEWS_NETCLOSE(s); diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c index e4d6496b..74197460 100644 --- a/WWW/Library/Implementation/HTParse.c +++ b/WWW/Library/Implementation/HTParse.c @@ -187,8 +187,8 @@ PUBLIC char * HTParse ARGS3( char * acc_method; struct struct_parts given, related; - CTRACE(tfp, "HTParse: aName:`%s'\n", aName); - CTRACE(tfp, " relatedName:`%s'\n", relatedName); + CTRACE((tfp, "HTParse: aName:`%s'\n", aName)); + CTRACE((tfp, " relatedName:`%s'\n", relatedName)); if (wanted & (PARSE_STRICTPATH | PARSE_QUERY)) { /* if detail wanted... */ if ((wanted & (PARSE_STRICTPATH | PARSE_QUERY)) @@ -372,7 +372,7 @@ PUBLIC char * HTParse ARGS3( if (wanted & PARSE_PUNCTUATION) strcat(result, "/"); strcat(result, given.absolute); - CTRACE(tfp, "HTParse: (ABS)\n"); + CTRACE((tfp, "HTParse: (ABS)\n")); } else if (related.absolute) { /* Adopt path not name */ strcat(result, "/"); strcat(result, related.absolute); @@ -386,13 +386,13 @@ PUBLIC char * HTParse ARGS3( strcat(result, given.relative); /* Add given one */ HTSimplify (result); } - CTRACE(tfp, "HTParse: (Related-ABS)\n"); + CTRACE((tfp, "HTParse: (Related-ABS)\n")); } else if (given.relative) { strcat(result, given.relative); /* what we've got */ - CTRACE(tfp, "HTParse: (REL)\n"); + CTRACE((tfp, "HTParse: (REL)\n")); } else if (related.relative) { strcat(result, related.relative); - CTRACE(tfp, "HTParse: (Related-REL)\n"); + CTRACE((tfp, "HTParse: (Related-REL)\n")); } else { /* No inheritance */ if (strncasecomp(aName, "lynxcgi:", 8) && strncasecomp(aName, "lynxexec:", 9) && @@ -401,7 +401,7 @@ PUBLIC char * HTParse ARGS3( } if (!strcmp(result, "news:/")) result[5] = '*'; - CTRACE(tfp, "HTParse: (No inheritance)\n"); + CTRACE((tfp, "HTParse: (No inheritance)\n")); } if (want_detail) { p = strchr(tail, '?'); /* Search part? */ @@ -433,7 +433,7 @@ PUBLIC char * HTParse ARGS3( strcat(result, (given.anchor) ? given.anchor : related.anchor); } - CTRACE(tfp, "HTParse: result:%s\n", result); + CTRACE((tfp, "HTParse: result:%s\n", result)); FREE(rel); FREE(name); @@ -665,9 +665,9 @@ PUBLIC char * HTRelative ARGS2( strcat(result, "../"); strcat(result, last_slash+1); } - CTRACE(tfp, + CTRACE((tfp, "HTparse: `%s' expressed relative to\n `%s' is\n `%s'.\n", - aName, relatedName, result); + aName, relatedName, result)); return result; } diff --git a/WWW/Library/Implementation/HTPlain.c b/WWW/Library/Implementation/HTPlain.c index 26d11f4c..c82e6365 100644 --- a/WWW/Library/Implementation/HTPlain.c +++ b/WWW/Library/Implementation/HTPlain.c @@ -482,8 +482,8 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) (uck = UCTransUniChar(code, me->outUCLYhndl)) >= ' ' && /* S/390 -- gil -- 0464 */ uck < 256) { - CTRACE(tfp, "UCTransUniChar returned 0x%.2lX:'%c'.\n", - uck, FROMASCII((char)uck)); + CTRACE((tfp, "UCTransUniChar returned 0x%.2lX:'%c'.\n", + uck, FROMASCII((char)uck))); HText_appendCharacter(me->text, ((char)(uck & 0xff))); } else if (chk && (uck == -4 || @@ -565,12 +565,12 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) /* ** Ignore 8204 (zwnj) or 8205 (zwj), if we get to here. - FM */ - CTRACE(tfp, "HTPlain_write: Ignoring '%ld'.\n", code); + CTRACE((tfp, "HTPlain_write: Ignoring '%ld'.\n", code)); } else if (code == 8206 || code == 8207) { /* ** Ignore 8206 (lrm) or 8207 (rlm), if we get to here. - FM */ - CTRACE(tfp, "HTPlain_write: Ignoring '%ld'.\n", code); + CTRACE((tfp, "HTPlain_write: Ignoring '%ld'.\n", code)); } else { /* ** Out of luck, so use the UHHH notation (ugh). - FM diff --git a/WWW/Library/Implementation/HTRules.c b/WWW/Library/Implementation/HTRules.c index 828d9f67..909a852c 100644 --- a/WWW/Library/Implementation/HTRules.c +++ b/WWW/Library/Implementation/HTRules.c @@ -110,14 +110,14 @@ PUBLIC int HTAddRule ARGS5( strcpy(pPattern, pattern); if (equiv) { - CTRACE(tfp, "Rule: For `%s' op %d `%s'", pattern, op, equiv); + CTRACE((tfp, "Rule: For `%s' op %d `%s'", pattern, op, equiv)); } else { - CTRACE(tfp, "Rule: For `%s' op %d", pattern, op); + CTRACE((tfp, "Rule: For `%s' op %d", pattern, op)); } if (cond_op) { - CTRACE(tfp, "\t%s %s\n", cond_op, cond ? cond : "<null>"); + CTRACE((tfp, "\t%s %s\n", cond_op, cond ? cond : "<null>")); } else { - CTRACE(tfp, "\n"); + CTRACE((tfp, "\n")); } if (!rules) { @@ -172,8 +172,8 @@ PRIVATE BOOL rule_cond_ok ARGS1( if (!r->condition_op) return YES; if (strcmp(r->condition_op, "if") && strcmp(r->condition_op, "unless")) { - CTRACE(tfp, "....... rule ignored, unrecognized `%s'!\n", - r->condition_op); + CTRACE((tfp, "....... rule ignored, unrecognized `%s'!\n", + r->condition_op)); return NO; } if (!strcmp(r->condition, "redirected")) @@ -181,8 +181,8 @@ PRIVATE BOOL rule_cond_ok ARGS1( else if (!strcmp(r->condition, "userspec")) result = LYUserSpecifiedURL; else { - CTRACE(tfp, "....... rule ignored, unrecognized `%s %s'!\n", - r->condition_op, r->condition ? r->condition : "<null>"); + CTRACE((tfp, "....... rule ignored, unrecognized `%s %s'!\n", + r->condition_op, r->condition ? r->condition : "<null>")); return NO; } if (!strcmp(r->condition_op, "if")) @@ -251,12 +251,12 @@ char * HTTranslate ARGS1( char *eff_ids = NULL; char *prot_file = NULL; - CTRACE(tfp, "HTRule: `%s' matched %s %s: `%s'\n", + CTRACE((tfp, "HTRule: `%s' matched %s %s: `%s'\n", current, (r->op==HT_Protect ? "Protect" : "DefProt"), "rule, setup", (r->equiv ? r->equiv : - (r->op==HT_Protect ?"DEFAULT" :"NULL!!"))); + (r->op==HT_Protect ?"DEFAULT" :"NULL!!")))); if (r->equiv) { StrAllocCopy(local_copy, r->equiv); @@ -303,29 +303,29 @@ char * HTTranslate ARGS1( break; case HT_PermitRedir: /* Set special flag */ - permitredir_flag = 1; - CTRACE(tfp, "HTRule: Mark for redirection permitted\n"); - break; + permitredir_flag = 1; + CTRACE((tfp, "HTRule: Mark for redirection permitted\n")); + break; case HT_Pass: /* Authorised */ - if (!r->equiv) { - if (proxy_none_flag) { - char * temp = NULL; - StrAllocCopy(temp, "NoProxy="); - StrAllocCat(temp, current); - FREE(current); - current = temp; - } - CTRACE(tfp, "HTRule: Pass `%s'\n", current); - return current; + if (!r->equiv) { + if (proxy_none_flag) { + char * temp = NULL; + StrAllocCopy(temp, "NoProxy="); + StrAllocCat(temp, current); + FREE(current); + current = temp; } - /* Else fall through ...to map and pass */ + CTRACE((tfp, "HTRule: Pass `%s'\n", current)); + return current; + } + /* Else fall through ...to map and pass */ case HT_Map: case HT_Redirect: case HT_RedirectPerm: if (*p == *q) { /* End of both strings, no wildcard */ - CTRACE(tfp, "For `%s' using `%s'\n", current, r->equiv); + CTRACE((tfp, "For `%s' using `%s'\n", current, r->equiv)); StrAllocCopy(current, r->equiv); /* use entire translation */ } else { char * ins = strchr(r->equiv, '*'); /* Insertion point */ @@ -338,8 +338,8 @@ char * HTTranslate ARGS1( /* Note: temp may be unterminated now! */ strncpy(temp+(ins-r->equiv), q, m); /* Matched bit */ strcpy (temp+(ins-r->equiv)+m, ins+1); /* Last bit */ - CTRACE(tfp, "For `%s' using `%s'\n", - current, temp); + CTRACE((tfp, "For `%s' using `%s'\n", + current, temp)); FREE(current); current = temp; /* Use this */ @@ -348,8 +348,8 @@ char * HTTranslate ARGS1( if (temp==NULL) outofmem(__FILE__, "HTTranslate"); /* NT & AS */ strcpy(temp, r->equiv); - CTRACE(tfp, "For `%s' using `%s'\n", - current, temp); + CTRACE((tfp, "For `%s' using `%s'\n", + current, temp)); FREE(current); current = temp; /* Use this */ } /* If no insertion point exists */ @@ -362,18 +362,18 @@ char * HTTranslate ARGS1( FREE(current); current = temp; } - CTRACE(tfp, "HTRule: ...and pass `%s'\n", - current); + CTRACE((tfp, "HTRule: ...and pass `%s'\n", + current)); return current; } else if (r->op == HT_Redirect) { - CTRACE(tfp, "HTRule: ...and redirect to `%s'\n", - current); + CTRACE((tfp, "HTRule: ...and redirect to `%s'\n", + current)); redirecting_url = current; HTPermitRedir = (BOOL) (permitredir_flag == 1); return (char *)0; } else if (r->op == HT_RedirectPerm) { - CTRACE(tfp, "HTRule: ...and redirect like 301 to `%s'\n", - current); + CTRACE((tfp, "HTRule: ...and redirect like 301 to `%s'\n", + current)); redirecting_url = current; permanent_redirection = TRUE; HTPermitRedir = (BOOL) (permitredir_flag == 1); @@ -383,19 +383,19 @@ char * HTTranslate ARGS1( case HT_UseProxy: if (r->equiv && 0==strcasecomp(r->equiv, "none")) { - CTRACE(tfp, "For `%s' will not use proxy\n", current); + CTRACE((tfp, "For `%s' will not use proxy\n", current)); proxy_none_flag = 1; } else if (proxy_none_flag) { - CTRACE(tfp, "For `%s' proxy server ignored: %s\n", + CTRACE((tfp, "For `%s' proxy server ignored: %s\n", current, - r->equiv ? r->equiv : "<null>"); + r->equiv ? r->equiv : "<null>")); } else { char * temp = NULL; StrAllocCopy(temp, "Proxied="); StrAllocCat(temp, r->equiv); StrAllocCat(temp, current); - CTRACE(tfp, "HTRule: proxy server found: %s\n", - r->equiv ? r->equiv : "<null>"); + CTRACE((tfp, "HTRule: proxy server found: %s\n", + r->equiv ? r->equiv : "<null>")); FREE(current); return temp; } @@ -403,8 +403,8 @@ char * HTTranslate ARGS1( case HT_Invalid: case HT_Fail: /* Unauthorised */ - CTRACE(tfp, "HTRule: *** FAIL `%s'\n", - current); + CTRACE((tfp, "HTRule: *** FAIL `%s'\n", + current)); FREE(current); return (char *)0; } /* if tail matches ... switch operation */ @@ -547,7 +547,7 @@ PUBLIC int HTSetConfiguration ARGS1( 0==strcmp(word2, "303") || 0==strcasecomp(word2, "temp") || 0==strcasecomp(word2, "seeother"))) { - CTRACE(tfp, "Rule: Ignoring `%s' in Redirect\n", word2); + CTRACE((tfp, "Rule: Ignoring `%s' in Redirect\n", word2)); } word2 = word3; word3 = cond_op; /* cond_op isn't condition op after all */ @@ -638,7 +638,7 @@ int HTLoadRules ARGS1( char line[LINE_LENGTH+1]; if (!fp) { - CTRACE(tfp, "HTRules: Can't open rules file %s\n", filename); + CTRACE((tfp, "HTRules: Can't open rules file %s\n", filename)); return -1; /* File open error */ } for(;;) { diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c index 89412e39..b7cd8758 100644 --- a/WWW/Library/Implementation/HTString.c +++ b/WWW/Library/Implementation/HTString.c @@ -642,8 +642,8 @@ PRIVATE char * StrAllocVsprintf ARGS4( used = 0; break; default: - CTRACE(tfp, "unknown format character '%c' in %s\n", - *fmt, format); + CTRACE((tfp, "unknown format character '%c' in %s\n", + *fmt, format)); break; } } else if (*fmt == '.') { @@ -893,7 +893,7 @@ PUBLIC void HTAddXpand ARGS4( (*result)[len] = 0; } HTSACat(result, parameter); - CTRACE(tfp, "PARAM-EXP:%s\n", *result); + CTRACE((tfp, "PARAM-EXP:%s\n", *result)); return; } next++; @@ -946,7 +946,7 @@ PUBLIC void HTAddParam ARGS4( #else HTSACat(result, parameter); #endif - CTRACE(tfp, "PARAM-ADD:%s\n", *result); + CTRACE((tfp, "PARAM-ADD:%s\n", *result)); return; } next++; @@ -972,7 +972,7 @@ PUBLIC void HTEndParam ARGS3( if (last[0] != 0) { HTSACat(result, last); } - CTRACE(tfp, "PARAM-END:%s\n", *result); + CTRACE((tfp, "PARAM-END:%s\n", *result)); } @@ -988,7 +988,7 @@ PUBLIC void HTSABCopy ARGS3( int, len) { bstring *t; - CTRACE(tfp, "HTSABCopy(%p, %p, %d)\n", dest, src, len); + CTRACE((tfp, "HTSABCopy(%p, %p, %d)\n", dest, src, len)); /* if we already have a bstring ** ... */ if (dest) { /* ... with a valid bstring *, free it ... */ @@ -998,7 +998,7 @@ PUBLIC void HTSABCopy ARGS3( } *dest = malloc(sizeof(bstring)); if (src) { - CTRACE(tfp, "%% [%s]\n", src); + CTRACE((tfp, "%% [%s]\n", src)); t = (bstring*) malloc(sizeof(bstring)); if (t == NULL) outofmem(__FILE__, "HTSABCopy"); diff --git a/WWW/Library/Implementation/HTStyle.c b/WWW/Library/Implementation/HTStyle.c index c5cabf78..2e8494d2 100644 --- a/WWW/Library/Implementation/HTStyle.c +++ b/WWW/Library/Implementation/HTStyle.c @@ -186,7 +186,7 @@ HTStyle * HTStyleNamed ARGS2 (HTStyleSheet *,self, CONST char *,name) HTStyle * scan; for (scan=self->styles; scan; scan=scan->next) if (0==strcmp(scan->name, name)) return scan; - CTRACE(tfp, "StyleSheet: No style named `%s'\n", name); + CTRACE((tfp, "StyleSheet: No style named `%s'\n", name)); return NULL; } @@ -237,8 +237,8 @@ HTStyle * HTStyleForRun (HTStyleSheet *self, NXRun *run) } } } - CTRACE(tfp, "HTStyleForRun: Best match for style is %d out of 18\n", - bestMatch); + CTRACE((tfp, "HTStyleForRun: Best match for style is %d out of 18\n", + bestMatch)); return best; } #endif /* NEXT_SUPRESS */ @@ -329,7 +329,7 @@ HTStyleSheet * HTStyleSheetRead(HTStyleSheet * self, NXStream * stream) HTStyle * style; char styleName[80]; NXScanf(stream, " %d ", &numStyles); - CTRACE(tfp, "Stylesheet: Reading %d styles\n", numStyles); + CTRACE((tfp, "Stylesheet: Reading %d styles\n", numStyles)); for (i=0; i<numStyles; i++) { NXScanf(stream, "%s", styleName); style = HTStyleNamed(self, styleName); @@ -357,7 +357,7 @@ HTStyleSheet * HTStyleSheetWrite(HTStyleSheet * self, NXStream * stream) for(style=self->styles; style; style=style->next) numStyles++; NXPrintf(stream, "%d\n", numStyles); - CTRACE(tfp, "StyleSheet: Writing %d styles\n", numStyles); + CTRACE((tfp, "StyleSheet: Writing %d styles\n", numStyles)); for (style=self->styles; style; style=style->next) { NXPrintf(stream, "%s ", style->name); (void) HTStyleWrite(style, stream); diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 5a9c6648..9bd4bcd3 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -197,6 +197,9 @@ PUBLIC int HTioctl ARGS3( } #endif /* VMS && UCX */ +#define MY_FORMAT "TCP: Error %d in `SOCKET_ERRNO' after call to %s() failed.\n\t%s\n" + /* third arg is transport/platform specific */ + /* Report Internet Error ** --------------------- */ @@ -209,43 +212,44 @@ PUBLIC int HTInetStatus ARGS1( #endif /* MULTINET */ #endif /* VMS */ - CTRACE(tfp, - "TCP: Error %d in `SOCKET_ERRNO' after call to %s() failed.\n\t%s\n", - SOCKET_ERRNO, where, - /* third arg is transport/platform specific */ #ifdef VM - "(Error number not translated)"); /* What Is the VM equiv? */ + CTRACE((tfp, MY_FORMAT, SOCKET_ERRNO, where, + "(Error number not translated)")); /* What Is the VM equiv? */ #define ER_NO_TRANS_DONE #endif /* VM */ #ifdef VMS #ifdef MULTINET - vms_errno_string()); + CTRACE((tfp, MY_FORMAT, SOCKET_ERRNO, where, + vms_errno_string())); #else + CTRACE((tfp, MY_FORMAT, SOCKET_ERRNO, where, ((SOCKET_ERRNO > 0 && SOCKET_ERRNO <= 65) ? - strerror(SOCKET_ERRNO) : "(Error number not translated)")); + strerror(SOCKET_ERRNO) : "(Error number not translated)"))); #endif /* MULTINET */ #define ER_NO_TRANS_DONE #endif /* VMS */ #ifdef HAVE_STRERROR - strerror(SOCKET_ERRNO)); + CTRACE((tfp, MY_FORMAT, SOCKET_ERRNO, where, + strerror(SOCKET_ERRNO))); #define ER_NO_TRANS_DONE #endif /* HAVE_STRERROR */ #ifndef ER_NO_TRANS_DONE + CTRACE((tfp, MY_FORMAT, SOCKET_ERRNO, where, (SOCKET_ERRNO < sys_nerr ? - sys_errlist[SOCKET_ERRNO] : "Unknown error" )); + sys_errlist[SOCKET_ERRNO] : "Unknown error" ))); #endif /* !ER_NO_TRANS_DONE */ #ifdef VMS #ifndef MULTINET - CTRACE(tfp, + CTRACE((tfp, " Unix error number (SOCKET_ERRNO) = %ld dec\n", - SOCKET_ERRNO); - CTRACE(tfp, + SOCKET_ERRNO)); + CTRACE((tfp, " VMS error (vaxc$errno) = %lx hex\n", - vaxc$errno); + vaxc$errno)); #endif /* MULTINET */ #endif /* VMS */ @@ -403,52 +407,52 @@ PRIVATE void dump_hostent ARGS2( if (TRACE) { int i; char **pcnt; - CTRACE(tfp,"%s: %p ", msgprefix, phost); + CTRACE((tfp,"%s: %p ", msgprefix, phost)); if (phost) { - CTRACE(tfp,"{ h_name = %p", phost->h_name); + CTRACE((tfp,"{ h_name = %p", phost->h_name)); if (phost->h_name) { - CTRACE(tfp, " \"%s\",", phost->h_name); + CTRACE((tfp, " \"%s\",", phost->h_name)); } else { - CTRACE(tfp, ","); + CTRACE((tfp, ",")); } - CTRACE(tfp,"\n\t h_aliases = %p", phost->h_aliases); + CTRACE((tfp,"\n\t h_aliases = %p", phost->h_aliases)); if (phost->h_aliases) { - CTRACE(tfp, " {"); + CTRACE((tfp, " {")); for (pcnt = phost->h_aliases; *pcnt; pcnt++) { - CTRACE(tfp,"%s %p \"%s\"", + CTRACE((tfp,"%s %p \"%s\"", (pcnt == phost->h_aliases ? " " : ", "), - *pcnt, *pcnt); + *pcnt, *pcnt)); } - CTRACE(tfp, "%s0x0 },\n\t", - (*phost->h_aliases ? ", " : " ")); + CTRACE((tfp, "%s0x0 },\n\t", + (*phost->h_aliases ? ", " : " "))); } else { - CTRACE(tfp, ",\n\t"); + CTRACE((tfp, ",\n\t")); } - CTRACE(tfp," h_addrtype = %d,", phost->h_addrtype); - CTRACE(tfp," h_length = %d,\n\t", phost->h_length); - CTRACE(tfp," h_addr_list = %p", phost->h_addr_list); + CTRACE((tfp," h_addrtype = %d,", phost->h_addrtype)); + CTRACE((tfp," h_length = %d,\n\t", phost->h_length)); + CTRACE((tfp," h_addr_list = %p", phost->h_addr_list)); if (phost->h_addr_list) { - CTRACE(tfp, " {"); + CTRACE((tfp, " {")); for (pcnt = phost->h_addr_list; *pcnt; pcnt++) { - CTRACE(tfp,"%s %p", + CTRACE((tfp,"%s %p", (pcnt == phost->h_addr_list ? "" : ","), - *pcnt); + *pcnt)); for (i = 0; i < phost->h_length; i++) { - CTRACE(tfp, "%s%d%s", (i==0 ? " \"" : "."), + CTRACE((tfp, "%s%d%s", (i==0 ? " \"" : "."), (int)*((unsigned char *)(*pcnt)+i), - (i+1 == phost->h_length ? "\"" : "")); + (i+1 == phost->h_length ? "\"" : ""))); } } if (*phost->h_addr_list) { - CTRACE(tfp, ", 0x0 } }"); + CTRACE((tfp, ", 0x0 } }")); } else { - CTRACE(tfp, " 0x0 } }"); + CTRACE((tfp, " 0x0 } }")); } } else { - CTRACE(tfp, "}"); + CTRACE((tfp, "}")); } } - CTRACE(tfp,"\n"); + CTRACE((tfp,"\n")); fflush(tfp); } } @@ -676,15 +680,15 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( struct hostent *result_phost = NULL; if (!str) { - CTRACE(tfp, "LYGetHostByName: Can't parse `NULL'.\n"); + CTRACE((tfp, "LYGetHostByName: Can't parse `NULL'.\n")); lynx_nsl_status = HT_INTERNAL; return NULL; } - CTRACE(tfp, "LYGetHostByName: parsing `%s'.\n", str); + CTRACE((tfp, "LYGetHostByName: parsing `%s'.\n", str)); /* Could disable this if all our callers already check - kw */ if (HTCheckForInterrupt()) { - CTRACE (tfp, "LYGetHostByName: INTERRUPTED for '%s'.\n", str); + CTRACE((tfp, "LYGetHostByName: INTERRUPTED for '%s'.\n", str)); lynx_nsl_status = HT_INTERRUPTED; return NULL; } @@ -708,7 +712,7 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( #endif /* _WINDOWS_NSL */ #ifdef MVS /* Outstanding problem with crash in MVS gethostbyname */ - CTRACE(tfp, "LYGetHostByName: Calling gethostbyname(%s)\n", host); + CTRACE((tfp, "LYGetHostByName: Calling gethostbyname(%s)\n", host)); #endif /* MVS */ CTRACE_FLUSH(tfp); /* so child messages will not mess up parent log */ @@ -839,7 +843,7 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( statuses.h_errno_valid = YES; #endif #ifdef MVS - CTRACE(tfp, "LYGetHostByName: gethostbyname() returned %d\n", phost); + CTRACE((tfp, "LYGetHostByName: gethostbyname() returned %d\n", phost)); #endif /* MVS */ #ifdef DEBUG_HOSTENT_CHILD @@ -1044,7 +1048,7 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( ** Abort if interrupt key pressed. */ if (HTCheckForInterrupt()) { - CTRACE(tfp, "LYGetHostByName: INTERRUPTED gethostbyname.\n"); + CTRACE((tfp, "LYGetHostByName: INTERRUPTED gethostbyname.\n")); kill(fpid, SIGTERM); waitpid(fpid, NULL, WNOHANG); close(pfd[0]); @@ -1059,20 +1063,20 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( } if (waitret > 0) { if (WIFEXITED(waitstat)) { - CTRACE(tfp, "LYGetHostByName: NSL_FORK child %d exited, status 0x%x.\n", - (int)waitret, waitstat); + CTRACE((tfp, "LYGetHostByName: NSL_FORK child %d exited, status 0x%x.\n", + (int)waitret, waitstat)); } else if (WIFSIGNALED(waitstat)) { - CTRACE(tfp, "LYGetHostByName: NSL_FORK child %d got signal, status 0x%x!\n", - (int)waitret, waitstat); + CTRACE((tfp, "LYGetHostByName: NSL_FORK child %d got signal, status 0x%x!\n", + (int)waitret, waitstat)); #ifdef WCOREDUMP if (WCOREDUMP(waitstat)) { - CTRACE(tfp, "LYGetHostByName: NSL_FORK child %d dumped core!\n", - (int)waitret); + CTRACE((tfp, "LYGetHostByName: NSL_FORK child %d dumped core!\n", + (int)waitret)); } #endif /* WCOREDUMP */ } else if (WIFSTOPPED(waitstat)) { - CTRACE(tfp, "LYGetHostByName: NSL_FORK child %d is stopped, status 0x%x!\n", - (int)waitret, waitstat); + CTRACE((tfp, "LYGetHostByName: NSL_FORK child %d is stopped, status 0x%x!\n", + (int)waitret, waitstat)); } } if (!got_rehostent) { @@ -1129,7 +1133,7 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( struct hostent *phost; phost = gethostbyname((char *)host); /* See netdb.h */ #ifdef MVS - CTRACE(tfp, "LYGetHostByName: gethostbyname() returned %d\n", phost); + CTRACE((tfp, "LYGetHostByName: gethostbyname() returned %d\n", phost)); #endif /* MVS */ if (phost) { lynx_nsl_status = HT_OK; @@ -1144,14 +1148,14 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( #ifdef DEBUG_HOSTENT dump_hostent("End of LYGetHostByName", result_phost); - CTRACE(tfp, "LYGetHostByName: Resolved name to a hostent.\n"); + CTRACE((tfp, "LYGetHostByName: Resolved name to a hostent.\n")); #endif return result_phost; /* OK */ failed: - CTRACE(tfp, "LYGetHostByName: Can't find internet node name `%s'.\n", - host); + CTRACE((tfp, "LYGetHostByName: Can't find internet node name `%s'.\n", + host)); return NULL; } @@ -1181,12 +1185,12 @@ PUBLIC int HTParseInet ARGS2( #endif /* _WINDOWS_NSL */ if (!str) { - CTRACE(tfp, "HTParseInet: Can't parse `NULL'.\n"); + CTRACE((tfp, "HTParseInet: Can't parse `NULL'.\n")); return -1; } - CTRACE(tfp, "HTParseInet: parsing `%s'.\n", str); + CTRACE((tfp, "HTParseInet: parsing `%s'.\n", str)); if (HTCheckForInterrupt()) { - CTRACE (tfp, "HTParseInet: INTERRUPTED for '%s'.\n", str); + CTRACE((tfp, "HTParseInet: INTERRUPTED for '%s'.\n", str)); return -1; } #ifdef _WINDOWS_NSL @@ -1215,7 +1219,7 @@ PUBLIC int HTParseInet ARGS2( if (serv) { soc_in->sin_port = serv->s_port; } else { - CTRACE(tfp, "TCP: Unknown service %s\n", port); + CTRACE((tfp, "TCP: Unknown service %s\n", port)); } #endif /* SUPPRESS */ } @@ -1228,8 +1232,8 @@ PUBLIC int HTParseInet ARGS2( */ soc_in->sdn_nam.n_len = min(DN_MAXNAML, strlen(host)); /* <=6 in phase 4 */ strncpy(soc_in->sdn_nam.n_name, host, soc_in->sdn_nam.n_len + 1); - CTRACE(tfp, "DECnet: Parsed address as object number %d on host %.6s...\n", - soc_in->sdn_objnum, host); + CTRACE((tfp, "DECnet: Parsed address as object number %d on host %.6s...\n", + soc_in->sdn_objnum, host)); #else /* parse Internet host: */ if (*host >= '0' && *host <= '9') { /* Test for numeric node address: */ @@ -1263,7 +1267,7 @@ PUBLIC int HTParseInet ARGS2( #else #ifdef HAVE_INET_ATON if (!inet_aton(host, &(soc_in->sin_addr))) { - CTRACE(tfp, "inet_aton(%s) returns error\n", host); + CTRACE((tfp, "inet_aton(%s) returns error\n", host)); #ifndef _WINDOWS_NSL FREE(host); #endif /* _WINDOWS_NSL */ @@ -1281,7 +1285,7 @@ PUBLIC int HTParseInet ARGS2( } else { /* Alphanumeric node name: */ #ifdef MVS /* Outstanding problem with crash in MVS gethostbyname */ - CTRACE(tfp, "HTParseInet: Calling LYGetHostByName(%s)\n", host); + CTRACE((tfp, "HTParseInet: Calling LYGetHostByName(%s)\n", host)); #endif /* MVS */ #if defined(__DJGPP__) && !defined(WATT32) @@ -1330,19 +1334,19 @@ PUBLIC int HTParseInet ARGS2( } /* Alphanumeric node name */ - CTRACE(tfp, "HTParseInet: Parsed address as port %d, IP address %d.%d.%d.%d\n", + CTRACE((tfp, "HTParseInet: Parsed address as port %d, IP address %d.%d.%d.%d\n", (int)ntohs(soc_in->sin_port), (int)*((unsigned char *)(&soc_in->sin_addr)+0), (int)*((unsigned char *)(&soc_in->sin_addr)+1), (int)*((unsigned char *)(&soc_in->sin_addr)+2), - (int)*((unsigned char *)(&soc_in->sin_addr)+3)); + (int)*((unsigned char *)(&soc_in->sin_addr)+3))); #endif /* Internet vs. Decnet */ return 0; /* OK */ failed: - CTRACE(tfp, "HTParseInet: Can't find internet node name `%s'.\n", - host); + CTRACE((tfp, "HTParseInet: Can't find internet node name `%s'.\n", + host)); #ifndef _WINDOWS_NSL FREE(host); #endif /* _WINDOWS_NSL */ @@ -1405,20 +1409,20 @@ PRIVATE void get_host_details NOARGS } } #endif /* UCX */ - CTRACE(tfp, "TCP: Local host name is %s\n", hostname); + CTRACE((tfp, "TCP: Local host name is %s\n", hostname)); #ifndef DECNET /* Decnet ain't got no damn name server 8#OO */ #ifdef NEED_HOST_ADDRESS /* no -- needs name server! */ phost = gethostbyname(name); /* See netdb.h */ if (!OK_HOST(phost)) { - CTRACE(tfp, "TCP: Can't find my own internet node address for `%s'!!\n", - name); + CTRACE((tfp, "TCP: Can't find my own internet node address for `%s'!!\n", + name)); return; /* Fail! */ } StrAllocCopy(hostname, phost->h_name); memcpy(&HTHostAddress, &phost->h_addr, phost->h_length); - CTRACE(tfp, " Name server says that I am `%s' = %s\n", - hostname, HTInetString(&HTHostAddress)); + CTRACE((tfp, " Name server says that I am `%s' = %s\n", + hostname, HTInetString(&HTHostAddress))); #endif /* NEED_HOST_ADDRESS */ #endif /* !DECNET */ @@ -1721,7 +1725,7 @@ PUBLIC int HTDoConnect ARGS4( } } if (HTCheckForInterrupt()) { - CTRACE(tfp, "*** INTERRUPTED in middle of connect.\n"); + CTRACE((tfp, "*** INTERRUPTED in middle of connect.\n")); status = HT_INTERRUPTED; #ifdef _WINDOWS WSASetLastError(EINTR); @@ -1795,7 +1799,7 @@ PUBLIC int HTDoRead ARGS3( * have gone wrong. - kw */ if (isatty(fildes)) { - CTRACE(tfp, "HTDoRead - refusing to read fd 0 which is a tty!\n"); + CTRACE((tfp, "HTDoRead - refusing to read fd 0 which is a tty!\n")); return -1; } } else @@ -1901,8 +1905,8 @@ PUBLIC int HTDoRead ARGS3( */ errno = vaxc$errno = 0; nb = SOCKET_READ (fildes, buf, nbyte); - CTRACE(tfp, - "Read - nb,errno,vaxc$errno: %d %d %d\n", nb,errno,vaxc$errno); + CTRACE((tfp, + "Read - nb,errno,vaxc$errno: %d %d %d\n", nb,errno,vaxc$errno)); if ((nb <= 0) && TRACE) perror ("HTTCP.C:HTDoRead:read"); /* RJF */ /* diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index 57937767..cb53e06f 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -349,20 +349,20 @@ try_again: /* ** Interrupt cleanly. */ - CTRACE (tfp, "HTTP: Interrupted on connect; recovering cleanly.\n"); + CTRACE((tfp, "HTTP: Interrupted on connect; recovering cleanly.\n")); _HTProgress (CONNECTION_INTERRUPTED); status = HT_NOT_LOADED; goto done; } if (status < 0) { #ifdef _WINDOWS - CTRACE(tfp, "HTTP: Unable to connect to remote host for `%s'\n" + CTRACE((tfp, "HTTP: Unable to connect to remote host for `%s'\n" " (status = %d, sock_errno = %d).\n", - url, status, SOCKET_ERRNO); + url, status, SOCKET_ERRNO)); #else - CTRACE(tfp, + CTRACE((tfp, "HTTP: Unable to connect to remote host for `%s' (errno = %d).\n", - url, SOCKET_ERRNO); + url, SOCKET_ERRNO)); #endif HTAlert(gettext("Unable to connect to remote host.")); status = HT_NOT_LOADED; @@ -631,7 +631,7 @@ try_again: */ sprintf(line, "%s%c%c", auth, CR, LF); StrAllocCat(command, line); - CTRACE(tfp, "HTTP: Sending authorization: %s\n", auth); + CTRACE((tfp, "HTTP: Sending authorization: %s\n", auth)); } else if (auth && *auth == '\0') { /* ** If auth is a zero-length string, the user either @@ -654,7 +654,7 @@ try_again: goto done; } } else { - CTRACE(tfp, "HTTP: Not sending authorization (yet).\n"); + CTRACE((tfp, "HTTP: Not sending authorization (yet).\n")); } /* ** Add 'Cookie:' header, if it's HTTP or HTTPS @@ -687,7 +687,7 @@ try_again: */ StrAllocCat(command, "Cookie2: $Version=\"1\""); StrAllocCat(command, crlf); - CTRACE(tfp, "HTTP: Sending Cookie2: $Version =\"1\"\n"); + CTRACE((tfp, "HTTP: Sending Cookie2: $Version =\"1\"\n")); } if (*cookie != '\0') { /* @@ -698,7 +698,7 @@ try_again: StrAllocCat(command, "Cookie: "); StrAllocCat(command, cookie); StrAllocCat(command, crlf); - CTRACE(tfp, "HTTP: Sending Cookie: %s\n", cookie); + CTRACE((tfp, "HTTP: Sending Cookie: %s\n", cookie)); } FREE(cookie); } @@ -723,10 +723,10 @@ try_again: */ sprintf(line, "%s%c%c", auth, CR, LF); StrAllocCat(command, line); - CTRACE(tfp, (auth_proxy ? + CTRACE((tfp, (auth_proxy ? "HTTP: Sending proxy authorization: %s\n" : "HTTP: Sending authorization: %s\n"), - auth); + auth)); } else if (auth && *auth == '\0') { /* ** If auth is a zero-length string, the user either @@ -749,9 +749,9 @@ try_again: goto done; } } else { - CTRACE(tfp, (auth_proxy ? + CTRACE((tfp, (auth_proxy ? "HTTP: Not sending proxy authorization (yet).\n" : - "HTTP: Not sending authorization (yet).\n")); + "HTTP: Not sending authorization (yet).\n"))); } FREE(hostname); FREE(docname); @@ -760,9 +760,9 @@ try_again: } if (do_post) { - CTRACE (tfp, "HTTP: Doing post, content-type '%s'\n", + CTRACE((tfp, "HTTP: Doing post, content-type '%s'\n", anAnchor->post_content_type ? anAnchor->post_content_type - : "lose"); + : "lose")); sprintf (line, "Content-type: %s%c%c", anAnchor->post_content_type ? anAnchor->post_content_type : "lose", CR, LF); @@ -789,9 +789,9 @@ try_again: else StrAllocCat(command, crlf); /* Blank line means "end" of headers */ - CTRACE (tfp, "Writing:\n%s%s----------------------------------\n", + CTRACE((tfp, "Writing:\n%s%s----------------------------------\n", command, - (anAnchor->post_data ? crlf : "")); + (anAnchor->post_data ? crlf : ""))); _HTProgress (gettext("Sending HTTP request.")); @@ -806,7 +806,7 @@ try_again: FREE(command); if (status <= 0) { if (status == 0) { - CTRACE (tfp, "HTTP: Got status 0 in initial write\n"); + CTRACE((tfp, "HTTP: Got status 0 in initial write\n")); /* Do nothing. */ } else if ((SOCKET_ERRNO == ENOTCONN || SOCKET_ERRNO == ECONNRESET || @@ -816,14 +816,14 @@ try_again: /* ** Arrrrgh, HTTP 0/1 compability problem, maybe. */ - CTRACE (tfp, "HTTP: BONZO ON WRITE Trying again with HTTP0 request.\n"); + CTRACE((tfp, "HTTP: BONZO ON WRITE Trying again with HTTP0 request.\n")); _HTProgress (RETRYING_AS_HTTP0); HTTP_NETCLOSE(s, handle); extensions = NO; already_retrying = TRUE; goto try_again; } else { - CTRACE (tfp, "HTTP: Hit unexpected network WRITE error; aborting connection.\n"); + CTRACE((tfp, "HTTP: Hit unexpected network WRITE error; aborting connection.\n")); HTTP_NETCLOSE(s, handle); status = -1; HTAlert(gettext("Unexpected network write error; connection aborted.")); @@ -831,7 +831,7 @@ try_again: } } - CTRACE (tfp, "HTTP: WRITE delivered OK\n"); + CTRACE((tfp, "HTTP: WRITE delivered OK\n")); _HTProgress (gettext("HTTP request sent; waiting for response.")); /* Read the first line of the response @@ -858,17 +858,17 @@ try_again: if (line_buffer == NULL) outofmem(__FILE__, "HTLoadHTTP"); } - CTRACE(tfp, "HTTP: Trying to read %d\n", buffer_length - length - 1); + CTRACE((tfp, "HTTP: Trying to read %d\n", buffer_length - length - 1)); status = HTTP_NETREAD(s, line_buffer + length, buffer_length - length - 1, handle); - CTRACE (tfp, "HTTP: Read %d\n", status); + CTRACE((tfp, "HTTP: Read %d\n", status)); if (status <= 0) { /* * Retry if we get nothing back too. * Bomb out if we get nothing twice. */ if (status == HT_INTERRUPTED) { - CTRACE (tfp, "HTTP: Interrupted initial read.\n"); + CTRACE((tfp, "HTTP: Interrupted initial read.\n")); _HTProgress (CONNECTION_INTERRUPTED); HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; @@ -884,7 +884,7 @@ try_again: /* ** Arrrrgh, HTTP 0/1 compability problem, maybe. */ - CTRACE (tfp, "HTTP: BONZO Trying again with HTTP0 request.\n"); + CTRACE((tfp, "HTTP: BONZO Trying again with HTTP0 request.\n")); HTTP_NETCLOSE(s, handle); FREE(line_buffer); FREE(line_kept_clean); @@ -894,8 +894,8 @@ try_again: _HTProgress (RETRYING_AS_HTTP0); goto try_again; } else { - CTRACE (tfp, "HTTP: Hit unexpected network read error; aborting connection; status %d.\n", - status); + CTRACE((tfp, "HTTP: Hit unexpected network read error; aborting connection; status %d.\n", + status)); HTAlert(gettext("Unexpected network read error; connection aborted.")); HTTP_NETCLOSE(s, handle); status = -1; @@ -961,7 +961,7 @@ try_again: /* We now have a terminated unfolded line. Parse it. ** -------------------------------------------------- */ - CTRACE(tfp, "HTTP: Rx: %s\n", line_buffer); + CTRACE((tfp, "HTTP: Rx: %s\n", line_buffer)); /* ** Kludge to work with old buggy servers and the VMS Help gateway. @@ -977,7 +977,7 @@ try_again: FREE(line_kept_clean); extensions = NO; already_retrying = TRUE; - CTRACE(tfp, "HTTP: close socket %d to retry with HTTP0\n", s); + CTRACE((tfp, "HTTP: close socket %d to retry with HTTP0\n", s)); HTTP_NETCLOSE(s, handle); /* print a progress message */ _HTProgress (RETRYING_AS_HTTP0); @@ -996,7 +996,7 @@ try_again: server_version, &server_status); - CTRACE (tfp, "HTTP: Scanned %d fields from line_buffer\n", fields); + CTRACE((tfp, "HTTP: Scanned %d fields from line_buffer\n", fields)); if (http_error_file) { /* Make the status code externally available */ FILE *error_file; @@ -1028,7 +1028,7 @@ try_again: */ HTAtom * encoding; - CTRACE (tfp, "--- Talking HTTP0.\n"); + CTRACE((tfp, "--- Talking HTTP0.\n")); format_in = HTFileFormat(url, &encoding, NULL); /* @@ -1037,19 +1037,19 @@ try_again: ** without looking at content. */ if (!strncmp(HTAtom_name(format_in), "text/plain",10)) { - CTRACE(tfp, "HTTP: format_in being changed to text/HTML\n"); + CTRACE((tfp, "HTTP: format_in being changed to text/HTML\n")); format_in = WWW_HTML; } if (!IsUnityEnc(encoding)) { /* ** Change the format to that for "www/compressed". */ - CTRACE(tfp, "HTTP: format_in is '%s',\n", HTAtom_name(format_in)); + CTRACE((tfp, "HTTP: format_in is '%s',\n", HTAtom_name(format_in))); StrAllocCopy(anAnchor->content_type, HTAtom_name(format_in)); StrAllocCopy(anAnchor->content_encoding, HTAtom_name(encoding)); format_in = HTAtom_for("www/compressed"); - CTRACE(tfp, " Treating as '%s' with encoding '%s'\n", - "www/compressed", HTAtom_name(encoding)); + CTRACE((tfp, " Treating as '%s' with encoding '%s'\n", + "www/compressed", HTAtom_name(encoding))); } start_of_data = line_kept_clean; @@ -1058,7 +1058,7 @@ try_again: ** Set up to decode full HTTP/1.n response. - FM */ format_in = HTAtom_for("www/mime"); - CTRACE (tfp, "--- Talking HTTP1.\n"); + CTRACE((tfp, "--- Talking HTTP1.\n")); /* ** We set start_of_data to "" when !eol here because there @@ -1315,7 +1315,7 @@ try_again: /* * Impatient user. - FM */ - CTRACE (tfp, "HTTP: Interrupted followup read.\n"); + CTRACE((tfp, "HTTP: Interrupted followup read.\n")); _HTProgress (CONNECTION_INTERRUPTED); status = HT_INTERRUPTED; goto clean_up; @@ -1328,7 +1328,7 @@ try_again: * Don't make the redirection permanent * if we have POST content. - FM */ - CTRACE(tfp, "HTTP: Have POST content. Treating 301 (Permanent) as Temporary.\n"); + CTRACE((tfp, "HTTP: Have POST content. Treating 301 (Permanent) as Temporary.\n")); HTAlert( gettext("Have POST content. Treating Permanent Redirection as Temporary.\n")); } else { @@ -1546,7 +1546,7 @@ Cookie2_continuation: * thus is probably something in the body, so * we'll show the user what was returned. - FM */ - CTRACE(tfp, "HTTP: 'Location:' is zero-length!\n"); + CTRACE((tfp, "HTTP: 'Location:' is zero-length!\n")); if (cp1) *cp1 = LF; if (cp2) @@ -1565,8 +1565,8 @@ Cookie2_continuation: * seek the document at that Location. - FM */ HTProgress(line_buffer); - CTRACE(tfp, "HTTP: Picked up location '%s'\n", - redirecting_url); + CTRACE((tfp, "HTTP: Picked up location '%s'\n", + redirecting_url)); if (cp1) *cp1 = LF; if (cp2) @@ -1583,8 +1583,8 @@ Cookie2_continuation: * Append our URL. - FM */ StrAllocCat(redirecting_url, anAnchor->address); - CTRACE(tfp, "HTTP: Proxy URL is '%s'\n", - redirecting_url); + CTRACE((tfp, "HTTP: Proxy URL is '%s'\n", + redirecting_url)); } if (!do_post || server_status == 303 || @@ -1647,7 +1647,7 @@ Cookie2_continuation: * header, so we'll show the user what we got, if * anything. - FM */ - CTRACE (tfp, "HTTP: Failed to pick up location.\n"); + CTRACE((tfp, "HTTP: Failed to pick up location.\n")); doing_redirect = FALSE; permanent_redirection = FALSE; start_of_data = line_kept_clean; @@ -1703,9 +1703,9 @@ Cookie2_continuation: goto clean_up; } - CTRACE(tfp, "%s %d %s\n", + CTRACE((tfp, "%s %d %s\n", "HTTP: close socket", s, - "to retry with Access Authorization"); + "to retry with Access Authorization")); _HTProgress ( gettext("Retrying with access authorization information.")); @@ -1749,9 +1749,9 @@ Cookie2_continuation: goto clean_up; } - CTRACE(tfp, "%s %d %s\n", + CTRACE((tfp, "%s %d %s\n", "HTTP: close socket", s, - "to retry with Proxy Authorization"); + "to retry with Proxy Authorization")); _HTProgress (HTTP_RETRY_WITH_PROXY); FREE(line_buffer); @@ -1958,7 +1958,7 @@ Cookie2_continuation: (*target->isa->_abort)(target, NULL); HTTP_NETCLOSE(s, handle); if (!already_retrying && !do_post) { - CTRACE (tfp, "HTTP: Trying again with HTTP0 request.\n"); + CTRACE((tfp, "HTTP: Trying again with HTTP0 request.\n")); /* ** May as well consider it an interrupt -- right? */ diff --git a/WWW/Library/Implementation/HTTelnet.c b/WWW/Library/Implementation/HTTelnet.c index a0c78d23..77f9ec69 100644 --- a/WWW/Library/Implementation/HTTelnet.c +++ b/WWW/Library/Implementation/HTTelnet.c @@ -36,7 +36,7 @@ PRIVATE void do_system ARGS1(char *, command) { - CTRACE(tfp, "HTTelnet: Command is: %s\n\n", command); + CTRACE((tfp, "HTTelnet: Command is: %s\n\n", command)); system(command); FREE(command); } @@ -87,12 +87,12 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) *port++ = '\0'; /* Split */ if (!hostname || *hostname == '\0') { - CTRACE(tfp, "HTTelnet: No host specified!\n"); + CTRACE((tfp, "HTTelnet: No host specified!\n")); return HT_NO_DATA; } else if (!valid_hostname(hostname)) { char *prefix = NULL; char *line = NULL; - CTRACE(tfp, "HTTelnet: Invalid hostname %s!\n", host); + CTRACE((tfp, "HTTelnet: Invalid hostname %s!\n", host)); HTSprintf0(&prefix, gettext("remote %s session:"), acc_method); HTSprintf0(&line, @@ -548,7 +548,7 @@ ARGS4 int status; if (sink) { - CTRACE(tfp, "HTTelnet: Can't output a live session -- must be interactive!\n"); + CTRACE((tfp, "HTTelnet: Can't output a live session -- must be interactive!\n")); return HT_NO_DATA; } acc_method = HTParse(addr, "file:", PARSE_ACCESS); @@ -556,7 +556,7 @@ ARGS4 host = HTParse(addr, "", PARSE_HOST); if (!host || *host == '\0') { status = HT_NO_DATA; - CTRACE(tfp, "HTTelnet: No host specified!\n"); + CTRACE((tfp, "HTTelnet: No host specified!\n")); } else { status = remote_session(acc_method, host); } diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index e1efe305..827a096a 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -460,7 +460,7 @@ The local equivalents of CR and LF #define LF FROMASCII('\012') /* ASCII line feed LOCAL EQUIVALENT */ #define CR FROMASCII('\015') /* Will be converted to ^M for transmission */ -#define CTRACE if(TRACE)fprintf +#define CTRACE(p) if(TRACE)fprintf p #define tfp TraceFP() #define CTRACE_SLEEP(secs) if (TRACE && LYTraceLogFP == 0) sleep(secs) #define CTRACE_FLUSH(fp) if(TRACE) fflush(fp) diff --git a/WWW/Library/Implementation/HTVMSUtils.c b/WWW/Library/Implementation/HTVMSUtils.c index 775d411f..57eeb09b 100644 --- a/WWW/Library/Implementation/HTVMSUtils.c +++ b/WWW/Library/Implementation/HTVMSUtils.c @@ -104,7 +104,7 @@ unsigned long Prv[2], PreviousPrv[2]; if (Result == SS$_NORMAL) { if (!(PreviousPrv[0] & PRV$M_SYSPRV)) { - CTRACE(tfp, "HTVMS_enableSysPrv: Enabled SYSPRV\n"); + CTRACE((tfp, "HTVMS_enableSysPrv: Enabled SYSPRV\n")); } } } @@ -130,7 +130,7 @@ unsigned long Prv[2], PreviousPrv[2]; if (Result == SS$_NORMAL) { if (PreviousPrv[0] & PRV$M_SYSPRV) { - CTRACE(tfp, "HTVMS_disableSysPrv: Disabled SYSPRV\n"); + CTRACE((tfp, "HTVMS_disableSysPrv: Disabled SYSPRV\n")); } } } @@ -889,7 +889,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( extern BOOLEAN no_dotfiles, show_dotfiles; HTUnEscape(pathname); - CTRACE(tfp,"HTVMSBrowseDir: Browsing `%s\'\n", pathname); + CTRACE((tfp,"HTVMSBrowseDir: Browsing `%s\'\n", pathname)); /* * Require at least two elements (presumably a device and directory) @@ -1160,8 +1160,8 @@ PUBLIC int HTVMSBrowseDir ARGS4( /* Now, update the BTree etc. */ if(entry_info->display) { - CTRACE(tfp,"Adding file to BTree: %s\n", - entry_info->filename); + CTRACE((tfp,"Adding file to BTree: %s\n", + entry_info->filename)); HTBTree_add(bt, (VMSEntryInfo *)entry_info); } diff --git a/WWW/Library/Implementation/HTWAIS.c b/WWW/Library/Implementation/HTWAIS.c index 6eea24ee..52e613e7 100644 --- a/WWW/Library/Implementation/HTWAIS.c +++ b/WWW/Library/Implementation/HTWAIS.c @@ -278,9 +278,9 @@ PRIVATE char * WWW_from_WAIS ARGS1( } for (p = docid->bytes; (p < docid->bytes+docid->size) && (q < &buf[BIG]);) { - CTRACE(tfp, " Record type %d, length %d\n", p[0], p[1]); + CTRACE((tfp, " Record type %d, length %d\n", p[0], p[1])); if (*p > 10) { - CTRACE(tfp, "Eh? DOCID record type of %d!\n", *p); + CTRACE((tfp, "Eh? DOCID record type of %d!\n", *p)); return 0; } { /* Bug fix -- allow any byte value 15 Apr 93 */ @@ -309,7 +309,7 @@ PRIVATE char * WWW_from_WAIS ARGS1( *q++= ';'; /* Terminate field */ } *q++ = 0; /* Terminate string */ - CTRACE(tfp, "WWW form of id: %s\n", buf); + CTRACE((tfp, "WWW form of id: %s\n", buf)); { char * result = (char *)malloc(strlen(buf)+1); if (!result) @@ -340,7 +340,7 @@ PRIVATE any * WAIS_from_WWW ARGS2( char *s; /* Position of semicolon */ int n; /* size */ - CTRACE(tfp, "WWW id (to become WAIS id): %s\n", docname); + CTRACE((tfp, "WWW id (to become WAIS id): %s\n", docname)); for (n = 0, p = docname; *p; p++) { /* Count sizes of strings */ n++; if (*p == ';') @@ -465,7 +465,7 @@ PRIVATE void display_search_response ARGS4( BOOL archie = strstr(database, "archie")!=0; /* Specical handling */ - CTRACE(tfp, "HTWAIS: Displaying search response\n"); + CTRACE((tfp, "HTWAIS: Displaying search response\n")); PUTS(gettext("Index ")); START(HTML_EM); PUTS(database); @@ -503,11 +503,11 @@ PRIVATE void display_search_response ARGS4( /* ** Make a printable string out of the document id. */ - CTRACE(tfp, "HTWAIS: %2ld: Score: %4ld, lines:%4ld '%s'\n", + CTRACE((tfp, "HTWAIS: %2ld: Score: %4ld, lines:%4ld '%s'\n", i, (long int)(info->DocHeaders[k]->Score), (long int)(info->DocHeaders[k]->Lines), - headline); + headline)); START(HTML_LI); @@ -695,7 +695,7 @@ PUBLIC int HTLoadWAIS ARGS4( if (!ok) return HTLoadError(sink, 500, gettext("Syntax error in WAIS URL")); - CTRACE(tfp, "HTWAIS: Parsed OK\n"); + CTRACE((tfp, "HTWAIS: Parsed OK\n")); service = strchr(names, ':'); if (service) @@ -712,16 +712,16 @@ PUBLIC int HTLoadWAIS ARGS4( } else if (!(key && !*key)) { int status; - CTRACE (tfp, "===WAIS=== calling mosaic_connect_to_server\n"); + CTRACE((tfp, "===WAIS=== calling mosaic_connect_to_server\n")); status = mosaic_connect_to_server(server_name, atoi(service), &connection); if (status == 0) { - CTRACE (tfp, "===WAIS=== connection failed\n"); + CTRACE((tfp, "===WAIS=== connection failed\n")); FREE(names); return HT_NOT_LOADED; } else if (status == -1) { - CTRACE (tfp, "===WAIS=== connection interrupted\n"); + CTRACE((tfp, "===WAIS=== connection interrupted\n")); FREE(names); return HT_NOT_LOADED; } @@ -794,9 +794,9 @@ PUBLIC int HTLoadWAIS ARGS4( server_name, service, www_database); fp = fopen(filename, "r"); /* Have we found this already? */ - CTRACE(tfp, "HTWAIS: Description of server %s %s.\n", + CTRACE((tfp, "HTWAIS: Description of server %s %s.\n", filename, - fp ? "exists already" : "does NOT exist!"); + fp ? "exists already" : "does NOT exist!")); if (fp) { char c; @@ -850,8 +850,8 @@ PUBLIC int HTLoadWAIS ARGS4( PUTC('\n'); request_buffer_length = MAX_MESSAGE_LEN; /* Amount left */ - CTRACE(tfp, "HTWAIS: Search for `%s' in `%s'\n", - keywords, wais_database); + CTRACE((tfp, "HTWAIS: Search for `%s' in `%s'\n", + keywords, wais_database)); if(NULL == generate_search_apdu(request_message + HEADER_LENGTH, &request_buffer_length, @@ -909,8 +909,8 @@ PUBLIC int HTLoadWAIS ARGS4( any doc_chunk; any * docid = &doc_chunk; - CTRACE(tfp, "HTWAIS: Retrieve document id `%s' type `%s' length %ld\n", - docname, doctype, document_length); + CTRACE((tfp, "HTWAIS: Retrieve document id `%s' type `%s' length %ld\n", + docname, doctype, document_length)); format_in = !strcmp(doctype, "WSRC") ? HTAtom_for("application/x-wais-source") : @@ -946,7 +946,7 @@ PUBLIC int HTLoadWAIS ARGS4( char *type = s_strdup(doctype); /* Gets freed I guess */ #endif /* VMS */ request_buffer_length = MAX_MESSAGE_LEN; /* Amount left */ - CTRACE(tfp, "HTWAIS: Slice number %ld\n", count); + CTRACE((tfp, "HTWAIS: Slice number %ld\n", count)); if (HTCheckForInterrupt()) { HTAlert (TRANSFER_INTERRUPTED); diff --git a/WWW/Library/Implementation/HTWSRC.c b/WWW/Library/Implementation/HTWSRC.c index 4fa761d6..5dd7856a 100644 --- a/WWW/Library/Implementation/HTWSRC.c +++ b/WWW/Library/Implementation/HTWSRC.c @@ -159,8 +159,8 @@ PRIVATE void WSRCParser_put_character ARGS2(HTStream*, me, char, c) } } if (!par_name[me->param_number]) { /* Unknown field */ - CTRACE(tfp, "HTWSRC: Unknown field `%s' in source file\n", - me->param); + CTRACE((tfp, "HTWSRC: Unknown field `%s' in source file\n", + me->param)); me->param_number = PAR_UNKNOWN; me->state = before_value; /* Could be better ignore */ return; diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index bbf446c2..7568f2e2 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -210,7 +210,7 @@ PRIVATE void HTMLSRC_apply_markup ARGS3( force_classname = TRUE; } #endif - CTRACE(tfp,ts->start ? "SRCSTART %d\n" : "SRCSTOP %d\n",(int)lexem); + CTRACE((tfp,ts->start ? "SRCSTART %d\n" : "SRCSTOP %d\n",(int)lexem)); if (ts->start) (*context->actions->start_element)( context->target, @@ -411,7 +411,7 @@ PRIVATE void handle_attribute_name ARGS2( # else current_is_class = (!strcasecomp("class", s)); # endif - CTRACE(tfp, "SGML: found attribute %s, %d\n", s, current_is_class); + CTRACE((tfp, "SGML: found attribute %s, %d\n", s, current_is_class)); #endif #ifdef USE_PSRC @@ -425,8 +425,8 @@ PRIVATE void handle_attribute_name ARGS2( } /* for */ - CTRACE(tfp, "SGML: Unknown attribute %s for tag %s\n", - s, context->current_tag->name); + CTRACE((tfp, "SGML: Unknown attribute %s for tag %s\n", + s, context->current_tag->name)); context->current_attribute_number = INVALID; /* Invalid */ } @@ -444,15 +444,15 @@ PRIVATE void handle_attribute_value ARGS2( if (current_is_class) { strncpy (class_string, s, TEMPSTRINGSIZE); - CTRACE(tfp, "SGML: class is '%s'\n", s); + CTRACE((tfp, "SGML: class is '%s'\n", s)); } else { - CTRACE(tfp, "SGML: attribute value is '%s'\n", s); + CTRACE((tfp, "SGML: attribute value is '%s'\n", s)); } #endif } else { - CTRACE(tfp, "SGML: Attribute value %s ***ignored\n", s); + CTRACE((tfp, "SGML: Attribute value %s ***ignored\n", s)); } context->current_attribute_number = INVALID; /* can't have two assignments! */ } @@ -670,7 +670,7 @@ PRIVATE void handle_entity ARGS2( */ if (!strcmp(s, "zwnj") || !strcmp(s, "zwj")) { - CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); + CTRACE((tfp, "handle_entity: Ignoring '%s'.\n", s)); #ifdef USE_PSRC if (psrc_view) { HTMLSRC_apply_markup(context,HTL_entity,START); @@ -689,7 +689,7 @@ PRIVATE void handle_entity ARGS2( */ if (!strcmp(s, "lrm") || !strcmp(s, "rlm")) { - CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); + CTRACE((tfp, "handle_entity: Ignoring '%s'.\n", s)); #ifdef USE_PSRC if (psrc_view) { HTMLSRC_apply_markup(context,HTL_entity,START); @@ -712,7 +712,7 @@ PRIVATE void handle_entity ARGS2( if (psrc_view) PSRCSTART(badseq); #endif - CTRACE(tfp, "SGML: Unknown entity '%s' %ld %ld\n", s, (long)code, uck); /* S/390 -- gil -- 0695 */ + CTRACE((tfp, "SGML: Unknown entity '%s' %ld %ld\n", s, (long)code, uck)); /* S/390 -- gil -- 0695 */ PUTC('&'); for (p = s; *p; p++) { PUTC(*p); @@ -734,7 +734,7 @@ PRIVATE void handle_comment ARGS1( { CONST char *s = context->string->data; - CTRACE(tfp, "SGML Comment:\n<%s>\n", s); + CTRACE((tfp, "SGML Comment:\n<%s>\n", s)); if (context->csi == NULL && strncmp(s, "!--#", 4) == 0 && @@ -756,7 +756,7 @@ PRIVATE void handle_identifier ARGS1( { CONST char *s = context->string->data; - CTRACE(tfp, "SGML Identifier:\n<%s>\n", s); + CTRACE((tfp, "SGML Identifier:\n<%s>\n", s)); return; } @@ -770,7 +770,7 @@ PRIVATE void handle_doctype ARGS1( { CONST char *s = context->string->data; - CTRACE(tfp, "SGML Doctype:\n<%s>\n", s); + CTRACE((tfp, "SGML Doctype:\n<%s>\n", s)); return; } @@ -784,7 +784,7 @@ PRIVATE void handle_marked ARGS1( { CONST char *s = context->string->data; - CTRACE(tfp, "SGML Marked Section:\n<%s>\n", s); + CTRACE((tfp, "SGML Marked Section:\n<%s>\n", s)); return; } @@ -798,7 +798,7 @@ PRIVATE void handle_sgmlent ARGS1( { CONST char *s = context->string->data; - CTRACE(tfp, "SGML Entity Declaration:\n<%s>\n", s); + CTRACE((tfp, "SGML Entity Declaration:\n<%s>\n", s)); return; } @@ -812,7 +812,7 @@ PRIVATE void handle_sgmlele ARGS1( { CONST char *s = context->string->data; - CTRACE(tfp, "SGML Element Declaration:\n<%s>\n", s); + CTRACE((tfp, "SGML Element Declaration:\n<%s>\n", s)); return; } @@ -826,7 +826,7 @@ PRIVATE void handle_sgmlatt ARGS1( { CONST char *s = context->string->data; - CTRACE(tfp, "SGML Attribute Declaration:\n<%s>\n", s); + CTRACE((tfp, "SGML Attribute Declaration:\n<%s>\n", s)); return; } @@ -924,34 +924,34 @@ PRIVATE void end_element ARGS2( (stackpos > 1 || (!extra_action_taken && stackpos == 0))) { canclose_check = can_close(old_tag, context->element_stack->tag); if (canclose_check != close_NO) { - CTRACE(tfp, "SGML: End </%s> \t<- %s end </%s>\n", + CTRACE((tfp, "SGML: End </%s> \t<- %s end </%s>\n", context->element_stack->tag->name, canclose_check == close_valid ? "supplied," : "***forced by", - old_tag->name); + old_tag->name)); do_close_stacked(context); extra_action_taken = YES; stackpos = is_on_stack(context, old_tag); } else { - CTRACE(tfp, "SGML: Still open %s \t<- ***invalid end </%s>\n", + CTRACE((tfp, "SGML: Still open %s \t<- ***invalid end </%s>\n", context->element_stack->tag->name, - old_tag->name); + old_tag->name)); return; } } if (stackpos == 0 && old_tag->contents != SGML_EMPTY) { - CTRACE(tfp, "SGML: Still open %s, ***no open %s for </%s>\n", + CTRACE((tfp, "SGML: Still open %s, ***no open %s for </%s>\n", context->element_stack ? context->element_stack->tag->name : "none", old_tag->name, - old_tag->name); + old_tag->name)); return; } if (stackpos > 1) { - CTRACE(tfp, "SGML: Nesting <%s>...<%s> \t<- ***invalid end </%s>\n", + CTRACE((tfp, "SGML: Nesting <%s>...<%s> \t<- ***invalid end </%s>\n", old_tag->name, context->element_stack->tag->name, - old_tag->name); + old_tag->name)); return; } } @@ -973,18 +973,18 @@ PRIVATE void end_element ARGS2( /* ** Ignore the end tag. - FM */ - CTRACE(tfp, "SGML: ***Ignoring end tag </%s> in SELECT block.\n", - old_tag->name); + CTRACE((tfp, "SGML: ***Ignoring end tag </%s> in SELECT block.\n", + old_tag->name)); return; } } /* ** Handle the end tag. - FM */ - CTRACE(tfp, "SGML: End </%s>\n", old_tag->name); + CTRACE((tfp, "SGML: End </%s>\n", old_tag->name)); if (old_tag->contents == SGML_EMPTY) { - CTRACE(tfp, "SGML: ***Illegal end tag </%s> found.\n", - old_tag->name); + CTRACE((tfp, "SGML: ***Illegal end tag </%s> found.\n", + old_tag->name)); return; } #ifdef WIND_DOWN_STACK @@ -998,11 +998,11 @@ PRIVATE void end_element ARGS2( if (old_tag != t) { /* Mismatch: syntax error */ if (context->element_stack->next) { /* This is not the last level */ - CTRACE(tfp, "SGML: Found </%s> when expecting </%s>. </%s> ***assumed.\n", - old_tag->name, t->name, t->name); + CTRACE((tfp, "SGML: Found </%s> when expecting </%s>. </%s> ***assumed.\n", + old_tag->name, t->name, t->name)); } else { /* last level */ - CTRACE(tfp, "SGML: Found </%s> when expecting </%s>. </%s> ***Ignored.\n", - old_tag->name, t->name, old_tag->name); + CTRACE((tfp, "SGML: Found </%s> when expecting </%s>. </%s> ***Ignored.\n", + old_tag->name, t->name, old_tag->name)); return; /* Ignore */ } } @@ -1021,8 +1021,8 @@ PRIVATE void end_element ARGS2( /* Syntax error path only */ } - CTRACE(tfp, "SGML: Extra end tag </%s> found and ignored.\n", - old_tag->name); + CTRACE((tfp, "SGML: Extra end tag </%s> found and ignored.\n", + old_tag->name)); } @@ -1053,27 +1053,27 @@ PRIVATE void start_element ARGS1( direct_container))) { canclose_check = can_close(new_tag, context->element_stack->tag); if (canclose_check != close_NO) { - CTRACE(tfp, "SGML: End </%s> \t<- %s start <%s>\n", + CTRACE((tfp, "SGML: End </%s> \t<- %s start <%s>\n", context->element_stack->tag->name, canclose_check == close_valid ? "supplied," : "***forced by", - new_tag->name); + new_tag->name)); do_close_stacked(context); extra_action_taken = YES; if (canclose_check == close_error) direct_container = NO; } else { - CTRACE(tfp, "SGML: Still open %s \t<- ***invalid start <%s>\n", + CTRACE((tfp, "SGML: Still open %s \t<- ***invalid start <%s>\n", context->element_stack->tag->name, - new_tag->name); + new_tag->name)); } } if (context->element_stack && !valid && (context->element_stack->tag->flags & Tgf_strict) && !(valid = element_valid_within(new_tag, context->element_stack->tag, direct_container))) { - CTRACE(tfp, "SGML: Still open %s \t<- ***ignoring start <%s>\n", + CTRACE((tfp, "SGML: Still open %s \t<- ***ignoring start <%s>\n", context->element_stack->tag->name, - new_tag->name); + new_tag->name)); return; } @@ -1084,10 +1084,10 @@ PRIVATE void start_element ARGS1( for (; i< new_tag->number_of_attributes && !has_attributes; i++) has_attributes = context->present[i]; if (!has_attributes) { - CTRACE(tfp, "SGML: Still open %s, ***converting invalid <%s> to </%s>\n", + CTRACE((tfp, "SGML: Still open %s, ***converting invalid <%s> to </%s>\n", context->element_stack->tag->name, new_tag->name, - new_tag->name); + new_tag->name)); end_element(context, new_tag); return; } @@ -1099,9 +1099,9 @@ PRIVATE void start_element ARGS1( new_tag, context->element_stack->tag, direct_container))) { - CTRACE(tfp, "SGML: Still open %s \t<- ***invalid start <%s>\n", + CTRACE((tfp, "SGML: Still open %s \t<- ***invalid start <%s>\n", context->element_stack->tag->name, - new_tag->name); + new_tag->name)); } } /* Fall through to the non-extended code - kw */ @@ -1159,15 +1159,15 @@ PRIVATE void start_element ARGS1( ** It is another form-related start tag, so terminate ** the current SELECT block and fall through. - FM */ - CTRACE(tfp, "SGML: ***Faking SELECT end tag before <%s> start tag.\n", - new_tag->name); + CTRACE((tfp, "SGML: ***Faking SELECT end tag before <%s> start tag.\n", + new_tag->name)); end_element(context, SGMLFindTag(context->dtd, "SELECT")); } else { /* ** Ignore the start tag. - FM */ - CTRACE(tfp, "SGML: ***Ignoring start tag <%s> in SELECT block.\n", - new_tag->name); + CTRACE((tfp, "SGML: ***Ignoring start tag <%s> in SELECT block.\n", + new_tag->name)); return; } } @@ -1175,7 +1175,7 @@ PRIVATE void start_element ARGS1( /* ** Handle the start tag. - FM */ - CTRACE(tfp, "SGML: Start <%s>\n", new_tag->name); + CTRACE((tfp, "SGML: Start <%s>\n", new_tag->name)); (*context->actions->start_element)( context->target, new_tag - context->dtd->tags, @@ -1740,8 +1740,8 @@ top1: (uck = UCTransUniChar(unsign_c, context->outUCLYhndl)) >= ' ' && uck < 256) { - CTRACE(tfp, "UCTransUniChar returned 0x%.2lX:'%c'.\n", - uck, FROMASCII((char)uck)); + CTRACE((tfp, "UCTransUniChar returned 0x%.2lX:'%c'.\n", + uck, FROMASCII((char)uck))); /* ** We got one octet from the conversions, so use it. - FM */ @@ -2014,7 +2014,7 @@ top1: entity_string = string->data; #endif /* S/390 -- gil -- 1039 */ - /* CTRACE(tfp, "%s: %d: %s\n", __FILE__, __LINE__, string->data); */ + /* CTRACE((tfp, "%s: %d: %s\n", __FILE__, __LINE__, string->data)); */ if (!strcmp(string->data, "zwnj") && (!context->element_stack || (context->element_stack->tag && @@ -2024,7 +2024,7 @@ top1: */ char temp[8]; - CTRACE(tfp, "SGML_character: Handling 'zwnj' entity as 'WBR' element.\n"); + CTRACE((tfp, "SGML_character: Handling 'zwnj' entity as 'WBR' element.\n")); if (c != ';') { sprintf(temp, "<WBR>%c", c); @@ -2101,8 +2101,8 @@ top1: ** Handle a numeric entity. */ case S_incro: - /* S/390 -- gil -- 1075 */ /* CTRACE(tfp, "%s: %d: numeric %d %d\n", - __FILE__, __LINE__, unsign_c, c); */ + /* S/390 -- gil -- 1075 */ /* CTRACE((tfp, "%s: %d: numeric %d %d\n", + __FILE__, __LINE__, unsign_c, c)); */ if ((TOASCII(unsign_c) < 127) && (context->isHex ? isxdigit((unsigned char)c) : isdigit((unsigned char)c))) { @@ -2289,7 +2289,7 @@ top1: */ char temp[8]; - CTRACE(tfp, "SGML_character: Handling '8204' (zwnj) reference as 'WBR' element.\n"); + CTRACE((tfp, "SGML_character: Handling '8204' (zwnj) reference as 'WBR' element.\n")); /* ** Include the terminator if it is not @@ -2676,7 +2676,7 @@ top1: HTTag * t; if (c == '/') { if (string->size != 0) - CTRACE(tfp,"SGML: `<%s/' found!\n", string->data); + CTRACE((tfp,"SGML: `<%s/' found!\n", string->data)); context->state = S_end; break; } @@ -2702,14 +2702,14 @@ top1: if (psrc_view) PSRCSTOP(badseq); #endif - CTRACE(tfp, "SGML: Treating <%s%c as text\n", - string->data, c); + CTRACE((tfp, "SGML: Treating <%s%c as text\n", + string->data, c)); string->size = 0; context->state = S_text; break; } else if (!t) { - CTRACE(tfp, "SGML: *** Invalid element %s\n", - string->data); + CTRACE((tfp, "SGML: *** Invalid element %s\n", + string->data)); #ifdef USE_PSRC if (psrc_view) { @@ -2732,8 +2732,8 @@ top1: context->state = (c == '>') ? S_text : S_junk_tag; break; } else if (t == context->unknown_tag) { - CTRACE(tfp, "SGML: *** Unknown element %s\n", - string->data); + CTRACE((tfp, "SGML: *** Unknown element %s\n", + string->data)); /* ** Fall through and treat like valid ** tag for attribute parsing. - KW @@ -3281,7 +3281,7 @@ top1: if (WHITE(c)) break; /* Before attribute value */ if (c == '>') { /* End of tag */ - CTRACE(tfp, "SGML: found = but no value\n"); + CTRACE((tfp, "SGML: found = but no value\n")); #ifdef USE_PSRC if (psrc_view) { if (context->current_tag != context->unknown_tag) @@ -3553,7 +3553,7 @@ top1: t = SGMLFindTag(dtd, string->data); } if (!t || t == context->unknown_tag) { - CTRACE(tfp, "Unknown end tag </%s>\n", string->data); + CTRACE((tfp, "Unknown end tag </%s>\n", string->data)); #ifdef USE_PSRC if (psrc_view) { PSRCSTART(abracket); @@ -3632,8 +3632,8 @@ top1: ** Don't treat these end tags as invalid, ** nor act on them. - FM */ - CTRACE(tfp, "SGML: `</%s%c' found! ***Ignoring it.\n", - string->data, c); + CTRACE((tfp, "SGML: `</%s%c' found! ***Ignoring it.\n", + string->data, c)); string->size = 0; context->current_attribute_number = INVALID; if (c != '>') { @@ -3675,18 +3675,18 @@ top1: /* ** It is not at FORM end tag, so ignore it. - FM */ - CTRACE(tfp, "SGML: ***Ignoring end tag </%s> in SELECT block.\n", - string->data); + CTRACE((tfp, "SGML: ***Ignoring end tag </%s> in SELECT block.\n", + string->data)); } else { /* ** End the SELECT block and then ** handle the FORM end tag. - FM */ - CTRACE(tfp, "SGML: ***Faking SELECT end tag before </%s> end tag.\n", - string->data); + CTRACE((tfp, "SGML: ***Faking SELECT end tag before </%s> end tag.\n", + string->data)); end_element(context, SGMLFindTag(context->dtd, "SELECT")); - CTRACE(tfp, "SGML: End </%s>\n", string->data); + CTRACE((tfp, "SGML: End </%s>\n", string->data)); (*context->actions->end_element) (context->target, @@ -3698,8 +3698,8 @@ top1: ** Treat a P end tag like a P start tag (Ugh, ** what a hack! 8-). - FM */ - CTRACE(tfp, "SGML: `</%s%c' found! ***Treating as '<%s%c'.\n", - string->data, c, string->data, c); + CTRACE((tfp, "SGML: `</%s%c' found! ***Treating as '<%s%c'.\n", + string->data, c, string->data, c)); { int i; for (i = 0; @@ -3711,7 +3711,7 @@ top1: if (context->current_tag->name) start_element(context); } else { - CTRACE(tfp, "SGML: End </%s>\n", string->data); + CTRACE((tfp, "SGML: End </%s>\n", string->data)); (*context->actions->end_element) (context->target, @@ -3762,7 +3762,7 @@ top1: context->current_attribute_number = INVALID; if (c != '>') { if (!WHITE(c)) - CTRACE(tfp,"SGML: `</%s%c' found!\n", string->data, c); + CTRACE((tfp,"SGML: `</%s%c' found!\n", string->data, c)); context->state = S_junk_tag; } else { context->state = S_text; |