]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/env.c
Update svn:keyword properties.
[thirdparty/cups.git] / scheduler / env.c
index 0b66b5e22df145e19b230ca23f30c180b221ee5e..b41fea1185294c5318e969acc75af3a25965d4b9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: env.c 7673 2008-06-18 22:31:26Z mike $"
+ * "$Id$"
  *
  *   Environment management routines for the CUPS scheduler.
  *
@@ -62,7 +62,7 @@ cupsdInitEnv(void)
 
 #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()...
@@ -227,6 +227,8 @@ cupsdUpdateEnv(void)
   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);
 }
 
 
@@ -248,5 +250,24 @@ clear_env(void)
 
 
 /*
- * 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$".
  */