]> mj.ucw.cz Git - libucw.git/blobdiff - lib/proctitle.c
First bits of installation of .pc files.
[libucw.git] / lib / proctitle.c
index ef985a2753319c9d72bdb3e66b267b8b65adfaed..4e1541847b81bbd3ee75250622e073aaba544367 100644 (file)
@@ -1,7 +1,10 @@
 /*
- *     Sherlock Library -- Setting of Process Title
+ *     UCW Library -- Setting of Process Title
  *
- *     (c) 2001 Martin Mares <mj@ucw.cz>
+ *     (c) 2001--2006 Martin Mares <mj@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
  */
 
 #include "lib/lib.h"
@@ -17,7 +20,7 @@ static char *spt_start, *spt_end;
 void
 setproctitle_init(int argc, char **argv)
 {
-#ifdef linux
+#ifdef CONFIG_LINUX
   int i, len;
   char **env, **oldenv, *t;
 
@@ -51,7 +54,7 @@ setproctitle_init(int argc, char **argv)
 }
 
 void
-setproctitle(char *msg, ...)
+setproctitle(const char *msg, ...)
 {
   va_list args;
   byte buf[256];
@@ -71,3 +74,9 @@ setproctitle(char *msg, ...)
     }
   va_end(args);
 }
+
+char *
+getproctitle(void)
+{
+  return (spt_start < spt_end) ? spt_start : NULL;
+}