summaryrefslogtreecommitdiff
path: root/cgi-bin
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-04-17 00:50:22 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-04-17 00:50:22 +0000
commitae71f5deb42f3d526b5f35d2eed9241abb6405ba (patch)
treec7ecc0ccd7d71c36c78085af240d52c0a5e66a2d /cgi-bin
parent839a51c83c61febe8d4c9ba56f6a05fce3d03710 (diff)
Import CUPS 1.4svn-r7464.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@713 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cgi-bin')
-rw-r--r--cgi-bin/help-index.c4
-rw-r--r--cgi-bin/var.c29
2 files changed, 14 insertions, 19 deletions
diff --git a/cgi-bin/help-index.c b/cgi-bin/help-index.c
index b32f8a7af..64f1380ac 100644
--- a/cgi-bin/help-index.c
+++ b/cgi-bin/help-index.c
@@ -3,7 +3,7 @@
*
* On-line help index routines for the Common UNIX Printing System (CUPS).
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -500,7 +500,7 @@ helpSaveIndex(help_index_t *hi, /* I - Index */
else
{
if (cupsFilePrintf(fp, "%s %d " CUPS_LLFMT " " CUPS_LLFMT " \"%s\" \"%s\"\n",
- node->filename, node->mtime,
+ node->filename, (int)node->mtime,
CUPS_LLCAST node->offset, CUPS_LLCAST node->length,
node->section ? node->section : "", node->text) < 0)
break;
diff --git a/cgi-bin/var.c b/cgi-bin/var.c
index 3ae98ca6c..596b24d0d 100644
--- a/cgi-bin/var.c
+++ b/cgi-bin/var.c
@@ -203,10 +203,10 @@ cgiGetVariable(const char *name) /* I - Name of variable */
#ifdef DEBUG
if (var == NULL)
- printf("cgiGetVariable(\"%s\") is returning NULL...\n", name);
+ DEBUG_printf(("cgiGetVariable(\"%s\") is returning NULL...\n", name));
else
- printf("cgiGetVariable(\"%s\") is returning \"%s\"...\n", name,
- var->values[var->nvalues - 1]);
+ DEBUG_printf(("cgiGetVariable(\"%s\") is returning \"%s\"...\n", name,
+ var->values[var->nvalues - 1]));
#endif /* DEBUG */
return ((var == NULL) ? NULL : var->values[var->nvalues - 1]);
@@ -242,7 +242,6 @@ cgiInitialize(void)
*/
setbuf(stdout, NULL);
- puts("Content-type: text/plain\n");
#endif /* DEBUG */
/*
@@ -444,9 +443,8 @@ cgi_add_variable(const char *name, /* I - Variable name */
if (name == NULL || value == NULL || element < 0 || element > 100000)
return;
-#ifdef DEBUG
- printf("Adding variable \'%s\' with value \'%s\'...\n", name, value);
-#endif /* DEBUG */
+ DEBUG_printf(("cgi_add_variable: Adding variable \'%s\' with value "
+ "\'%s\'...\n", name, value));
if (form_count >= form_alloc)
{
@@ -522,9 +520,7 @@ cgi_initialize_get(void)
char *data; /* Pointer to form data string */
-#ifdef DEBUG
- puts("Initializing variables using GET method...");
-#endif /* DEBUG */
+ DEBUG_puts("cgi_initialize_get: Initializing variables using GET method...");
/*
* Check to see if there is anything for us to read...
@@ -778,9 +774,7 @@ cgi_initialize_post(void)
status; /* Return status */
-#ifdef DEBUG
- puts("Initializing variables using POST method...");
-#endif /* DEBUG */
+ DEBUG_puts("cgi_initialize_post: Initializing variables using POST method...");
/*
* Check to see if there is anything for us to read...
@@ -996,7 +990,7 @@ cgi_sort_variables(void)
int i;
- puts("Sorting variables...");
+ DEBUG_puts("cgi_sort_variables: Sorting variables...");
#endif /* DEBUG */
if (form_count < 2)
@@ -1006,10 +1000,11 @@ cgi_sort_variables(void)
(int (*)(const void *, const void *))cgi_compare_variables);
#ifdef DEBUG
- puts("Sorted variable list is:");
+ DEBUG_puts("cgi_sort_variables: Sorted variable list is:");
for (i = 0; i < form_count; i ++)
- printf("%d: %s (%d) = \"%s\" ...\n", i, form_vars[i].name,
- form_vars[i].nvalues, form_vars[i].values[0]);
+ 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 */
}