/*
- * "$Id: env.c 7673 2008-06-18 22:31:26Z mike $"
+ * "$Id$"
*
* Environment management routines for the CUPS scheduler.
*
#if defined(__APPLE__)
/*
- * Add special voodoo magic for MacOS X - this allows MacOS X
+ * Add special voodoo magic for MacOS X - this allows MacOS X
* programs to access their bundle resources properly...
*
* This string is replaced in cupsdStartProcess()...
set_if_undefined("TZ", NULL);
set_if_undefined("USER", "root");
set_if_undefined("VG_ARGS", NULL);
+
+ cupsdSetEnvf("CUPS_MAX_MESSAGE", "%d", CUPSD_SB_BUFFER_SIZE - 1);
}
/*
- * End of "$Id: env.c 7673 2008-06-18 22:31:26Z mike $".
+ * 'find_env()' - Find a common environment variable.
+ */
+
+static int /* O - Index or -1 if not found */
+find_env(const char *name) /* I - Variable name */
+{
+ int i; /* Looping var */
+ size_t namelen; /* Length of name */
+
+
+ for (i = 0, namelen = strlen(name); i < num_common_env; i ++)
+ if (!strncmp(common_env[i], name, namelen) && common_env[i][namelen] == '=')
+ return (i);
+
+ return (-1);
+}
+
+
+/*
+ * End of "$Id$".
*/