From fb863569eb4f51ae62a066dc8049d3ffc0efb0bb Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 18 Oct 2018 14:25:09 -0400 Subject: Move debug printfs to internal usage only. Also, old MD5 code is internal-only. --- cgi-bin/Dependencies | 52 ++++++++++++++++++++++++++-------------------------- cgi-bin/help-index.c | 41 ----------------------------------------- cgi-bin/search.c | 4 ---- cgi-bin/var.c | 32 -------------------------------- 4 files changed, 26 insertions(+), 103 deletions(-) (limited to 'cgi-bin') diff --git a/cgi-bin/Dependencies b/cgi-bin/Dependencies index 900d59402..d50230446 100644 --- a/cgi-bin/Dependencies +++ b/cgi-bin/Dependencies @@ -1,66 +1,66 @@ help-index.o: help-index.c cgi-private.h cgi.h ../cups/cups.h \ ../cups/file.h ../cups/versioning.h ../cups/ipp.h ../cups/http.h \ ../cups/array.h ../cups/language.h ../cups/pwg.h help-index.h \ - ../cups/debug-private.h ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h \ + ../cups/debug-private.h ../cups/language-private.h ../config.h \ + ../cups/transcode.h ../cups/string-private.h ../cups/ipp-private.h \ ../cups/dir.h html.o: html.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h ipp-var.o: ipp-var.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h search.o: search.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h template.o: template.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h var.o: var.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h admin.o: admin.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h \ - ../cups/http-private.h ../cups/ppd-private.h ../cups/ppd.h \ - ../cups/raster.h ../cups/pwg-private.h ../cups/adminutil.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h ../cups/http-private.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/raster.h \ + ../cups/pwg-private.h ../cups/adminutil.h classes.o: classes.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h help.o: help.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h jobs.o: jobs.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h makedocset.o: makedocset.c cgi-private.h cgi.h ../cups/cups.h \ ../cups/file.h ../cups/versioning.h ../cups/ipp.h ../cups/http.h \ ../cups/array.h ../cups/language.h ../cups/pwg.h help-index.h \ - ../cups/debug-private.h ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/debug-private.h ../cups/language-private.h ../config.h \ + ../cups/transcode.h ../cups/string-private.h ../cups/ipp-private.h printers.o: printers.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \ - ../cups/language-private.h ../cups/transcode.h \ - ../cups/string-private.h ../config.h ../cups/ipp-private.h + ../cups/language-private.h ../config.h ../cups/transcode.h \ + ../cups/string-private.h ../cups/ipp-private.h testcgi.o: testcgi.c cgi.h ../cups/cups.h ../cups/file.h \ ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ ../cups/language.h ../cups/pwg.h help-index.h diff --git a/cgi-bin/help-index.c b/cgi-bin/help-index.c index 5f76d7aa5..a49536d6a 100644 --- a/cgi-bin/help-index.c +++ b/cgi-bin/help-index.c @@ -150,8 +150,6 @@ helpDeleteIndex(help_index_t *hi) /* I - Help index */ help_node_t *node; /* Current node */ - DEBUG_printf(("helpDeleteIndex(hi=%p)", hi)); - if (!hi) return; @@ -182,9 +180,6 @@ helpFindNode(help_index_t *hi, /* I - Index */ help_node_t key; /* Search key */ - DEBUG_printf(("helpFindNode(hi=%p, filename=\"%s\", anchor=\"%s\")", - hi, filename, anchor)); - /* * Range check input... */ @@ -232,9 +227,6 @@ helpLoadIndex(const char *hifile, /* I - Index filename */ help_word_t *word; /* Current word */ - DEBUG_printf(("helpLoadIndex(hifile=\"%s\", directory=\"%s\")", - hifile, directory)); - /* * Create a new, empty index. */ @@ -437,8 +429,6 @@ helpSaveIndex(help_index_t *hi, /* I - Index */ help_word_t *word; /* Current word */ - DEBUG_printf(("helpSaveIndex(hi=%p, hifile=\"%s\")", hi, hifile)); - /* * Try creating a new index file... */ @@ -518,9 +508,6 @@ helpSearchIndex(help_index_t *hi, /* I - Index */ int matches; /* Number of matches */ - DEBUG_printf(("helpSearchIndex(hi=%p, query=\"%s\", filename=\"%s\")", - hi, query, filename)); - /* * Range check... */ @@ -642,8 +629,6 @@ help_add_word(help_node_t *n, /* I - Node */ key; /* Search key */ - DEBUG_printf(("2help_add_word(n=%p, text=\"%s\")", n, text)); - /* * Create the words array as needed... */ @@ -695,8 +680,6 @@ help_delete_node(help_node_t *n) /* I - Node */ help_word_t *w; /* Current word */ - DEBUG_printf(("2help_delete_node(n=%p)", n)); - if (!n) return; @@ -730,8 +713,6 @@ help_delete_node(help_node_t *n) /* I - Node */ static void help_delete_word(help_word_t *w) /* I - Word */ { - DEBUG_printf(("2help_delete_word(w=%p)", w)); - if (!w) return; @@ -761,9 +742,6 @@ help_load_directory( help_node_t *node; /* Current node */ - DEBUG_printf(("2help_load_directory(hi=%p, directory=\"%s\", relative=\"%s\")", - hi, directory, relative)); - /* * Open the directory and scan it... */ @@ -873,9 +851,6 @@ help_load_file( int wordlen; /* Length of word */ - DEBUG_printf(("2help_load_file(hi=%p, filename=\"%s\", relative=\"%s\", " - "mtime=%ld)", hi, filename, relative, (long)mtime)); - if ((fp = cupsFileOpen(filename, "r")) == NULL) return (-1); @@ -1207,10 +1182,6 @@ help_new_node(const char *filename, /* I - Filename */ help_node_t *n; /* Node */ - DEBUG_printf(("2help_new_node(filename=\"%s\", anchor=\"%s\", text=\"%s\", " - "mtime=%ld, offset=%ld, length=%ld)", filename, anchor, text, - (long)mtime, (long)offset, (long)length)); - n = (help_node_t *)calloc(1, sizeof(help_node_t)); if (!n) return (NULL); @@ -1238,10 +1209,6 @@ help_sort_by_name(help_node_t *n1, /* I - First node */ int diff; /* Difference */ - DEBUG_printf(("2help_sort_by_name(n1=%p(%s#%s), n2=%p(%s#%s)", - n1, n1->filename, n1->anchor, - n2, n2->filename, n2->anchor)); - if ((diff = strcmp(n1->filename, n2->filename)) != 0) return (diff); @@ -1267,11 +1234,6 @@ help_sort_by_score(help_node_t *n1, /* I - First node */ int diff; /* Difference */ - DEBUG_printf(("2help_sort_by_score(n1=%p(%d \"%s\" \"%s\"), " - "n2=%p(%d \"%s\" \"%s\")", - n1, n1->score, n1->section, n1->text, - n2, n2->score, n2->section, n2->text)); - if (n1->score != n2->score) return (n2->score - n1->score); @@ -1295,8 +1257,5 @@ static int /* O - Difference */ help_sort_words(help_word_t *w1, /* I - Second word */ help_word_t *w2) /* I - Second word */ { - DEBUG_printf(("2help_sort_words(w1=%p(\"%s\"), w2=%p(\"%s\"))", - w1, w1->text, w2, w2->text)); - return (_cups_strcasecmp(w1->text, w2->text)); } diff --git a/cgi-bin/search.c b/cgi-bin/search.c index ad1f5ed0e..8dc5b32d5 100644 --- a/cgi-bin/search.c +++ b/cgi-bin/search.c @@ -36,8 +36,6 @@ cgiCompileSearch(const char *query) /* I - Query string */ char *lword; /* Last word in query */ - DEBUG_printf(("cgiCompileSearch(query=\"%s\")\n", query)); - /* * Range check input... */ @@ -293,8 +291,6 @@ cgiCompileSearch(const char *query) /* I - Query string */ * Compile the regular expression... */ - DEBUG_printf((" s=\"%s\"\n", s)); - if (regcomp(re, s, REG_EXTENDED | REG_ICASE)) { free(re); diff --git a/cgi-bin/var.c b/cgi-bin/var.c index bf0d98007..316b67f05 100644 --- a/cgi-bin/var.c +++ b/cgi-bin/var.c @@ -222,14 +222,6 @@ cgiGetVariable(const char *name) /* I - Name of variable */ var = cgi_find_variable(name); -#ifdef DEBUG - if (var == NULL) - DEBUG_printf(("cgiGetVariable(\"%s\") is returning NULL...\n", name)); - else - DEBUG_printf(("cgiGetVariable(\"%s\") is returning \"%s\"...\n", name, - var->values[var->nvalues - 1])); -#endif /* DEBUG */ - return ((var == NULL) ? NULL : _cupsStrRetain(var->values[var->nvalues - 1])); } @@ -534,9 +526,6 @@ cgi_add_variable(const char *name, /* I - Variable name */ if (name == NULL || value == NULL || element < 0 || element > 100000) return; - DEBUG_printf(("cgi_add_variable: Adding variable \'%s\' with value " - "\'%s\'...\n", name, value)); - if (form_count >= form_alloc) { _cgi_var_t *temp_vars; /* Temporary form pointer */ @@ -715,8 +704,6 @@ cgi_initialize_get(void) char *data; /* Pointer to form data string */ - DEBUG_puts("cgi_initialize_get: Initializing variables using GET method..."); - /* * Check to see if there is anything for us to read... */ @@ -756,8 +743,6 @@ cgi_initialize_multipart( size_t blen; /* Length of boundary string */ - DEBUG_printf(("cgi_initialize_multipart(boundary=\"%s\")\n", boundary)); - /* * Read multipart form data until we run out... */ @@ -970,8 +955,6 @@ cgi_initialize_post(void) int status; /* Return status */ - DEBUG_puts("cgi_initialize_post: Initializing variables using POST method..."); - /* * Check to see if there is anything for us to read... */ @@ -1234,26 +1217,11 @@ cgi_set_sid(void) static void cgi_sort_variables(void) { -#ifdef DEBUG - int i; - - - DEBUG_puts("cgi_sort_variables: Sorting variables..."); -#endif /* DEBUG */ - if (form_count < 2) return; qsort(form_vars, (size_t)form_count, sizeof(_cgi_var_t), (int (*)(const void *, const void *))cgi_compare_variables); - -#ifdef DEBUG - DEBUG_puts("cgi_sort_variables: Sorted variable list is:"); - for (i = 0; i < form_count; i ++) - DEBUG_printf(("cgi_sort_variables: %d: %s (%d) = \"%s\" ...\n", i, - form_vars[i].name, form_vars[i].nvalues, - form_vars[i].values[0])); -#endif /* DEBUG */ } -- cgit v1.2.1