]> skyeroc.xyz Git - dgamelaunch/commitdiff
fix some errors pointed out by jilles and paxed
authorJoshua Kwan <joshk@triplehelix.org>
Sat, 3 Jan 2004 03:51:29 +0000 (03:51 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Sat, 3 Jan 2004 03:51:29 +0000 (03:51 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@50 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

README
dgamelaunch.c

diff --git a/README b/README
index c1f493476753f7f6ff3a185f79a4be6ab8cd71c4..58ba5ae54080f6f2f67d169677874974df087321 100644 (file)
--- a/README
+++ b/README
@@ -81,7 +81,7 @@ service telnet
   bind      = 64.71.163.206
 }
 
-An classic inetd line would look like this
+A classic inetd line would look like this:
 
 telnet stream tcp nowait root.root /usr/sbin/tcpd /usr/sbin/in.telnetd -h -L /usr/sbin/dgamelaunch
 
index f27e0d3188d8417e16e28d8bde7e2a47e33e4499..2f3938a39195b42d29431d6a1271cc88251dfcd7 100644 (file)
@@ -109,11 +109,11 @@ ttyrec_getmaster ()
   (void) tcgetattr (0, &tt);
   (void) ioctl (0, TIOCGWINSZ, (char *) &win);
 #ifdef USE_OPENPTY
-  if (openpty(&master, &slave, NULL, &tt, &win) == -1)
+  if (openpty (&master, &slave, NULL, &tt, &win) == -1)
 #else
   if ((master = open ("/dev/ptmx", O_RDWR)) < 0)
 #endif
-      exit (62);
+    exit (62);
 }
 
 /* ************************************************************* */
@@ -183,7 +183,7 @@ loadbanner (struct dg_banner *ban)
                 " - network console game launcher");
       ban->lines[1] =
         strdup
-        ("### NOTE: administrator has not installed a /dgl-banner file");
+        ("### NOTE: administrator has not installed a " LOC_BANNER " file");
       return;
     }
 
@@ -212,7 +212,7 @@ loadbanner (struct dg_banner *ban)
                 {
                   strncat (bufnew, VERSION, 80 - i);
                   b += 8;       /* skip the whole $VERSION string */
-                  i += ARRAY_SIZE(VERSION);
+                  i += ARRAY_SIZE (VERSION);
                 }
 
               if (strlen (b) == 0)
@@ -367,14 +367,14 @@ inprogressmenu ()
 
       switch ((menuchoice = tolower (getch ())))
         {
-        case 'd':
+        case '>':
           if ((offset + 14) >= len)
             break;
           else
             offset += 14;
           break;
 
-        case 'u':
+        case '<':
           if ((offset - 14) < 0)
             break;
           else
@@ -419,7 +419,7 @@ changepw ()
   char buf[21];
   int error = 2;
 
-  /* A precondiction is that struct `me' exists because we can be not-yet-logged-in. */
+  /* A precondition is that struct `me' exists because we can be not-yet-logged-in. */
   if (!me)
     exit (122);                 /* Die. */
 
@@ -489,7 +489,7 @@ domailuser (char *username)
 
   assert (loggedin);
 
-  len = ARRAY_SIZE(LOC_SPOOLDIR) +  strlen (username) + 1;
+  len = ARRAY_SIZE (LOC_SPOOLDIR) + strlen (username) + 1;
   spool_fn = malloc (len + 1);
   time (&now);
   snprintf (spool_fn, len, "%s/%s", LOC_SPOOLDIR, username);
@@ -1094,23 +1094,23 @@ main (void)
     }
 
   /* shed privs. this is done immediately after chroot. */
-  if (setgroups(1, &newgid) == -1)
-  {
-    perror("setgroups");
-    exit(1);
-  }
+  if (setgroups (1, &newgid) == -1)
+    {
+      perror ("setgroups");
+      exit (1);
+    }
 
   if (setgid (newgid) == -1)
-  {
-    perror("setgid");
-    exit(1);
-  }
+    {
+      perror ("setgid");
+      exit (1);
+    }
 
   if (setuid (newuid) == -1)
-  {
-    perror("setuid");
-    exit(1);
-  }
+    {
+      perror ("setuid");
+      exit (1);
+    }
 
   /* simple login routine, uses ncurses */
   if (readfile (0))
@@ -1156,7 +1156,7 @@ main (void)
   /* environment */
   snprintf (atrcfilename, 81, "@%s", rcfilename);
 
-  len = ARRAY_SIZE(LOC_SPOOLDIR) + strlen (me->username) + 1;
+  len = ARRAY_SIZE (LOC_SPOOLDIR) + strlen (me->username) + 1;
   spool = malloc (len + 1);
   snprintf (spool, len, "%s/%s", LOC_SPOOLDIR, me->username);