size_t len;
int seconds = 0;
- if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, ".."))
- continue;
+ if (!strcmp (dent->d_name, ".") || !strcmp (dent->d_name, ".."))
+ continue;
colon = strchr (dent->d_name, ':');
/* should never happen */
if (strncmp (dent->d_name, me->username, colon - dent->d_name))
continue;
- len = strlen(dent->d_name) + ARRAY_SIZE(LOC_INPROGRESSDIR) + 1;
+ len = strlen (dent->d_name) + ARRAY_SIZE (LOC_INPROGRESSDIR) + 1;
fn = malloc (len);
- snprintf(fn, len, "%s%s", LOC_INPROGRESSDIR, dent->d_name);
-
+ snprintf (fn, len, "%s%s", LOC_INPROGRESSDIR, dent->d_name);
+
if (!(ipfile = fopen (fn, "r")))
graceful_exit (202);
clear ();
drawbanner (1, 1);
- mvaddstr (3, 1, "There is a stale Nethack process, attempting to recover...");
+ mvaddstr (3, 1,
+ "There is a stale Nethack process, attempting to recover...");
refresh ();
pid = atoi (buf);
kill (pid, SIGTERM);
break;
}
- else
- {
- endwin();
- fprintf(stderr, "Sorry, no nethack for you now, please "
- "contact the admin.\n");
- graceful_exit(1);
- }
+ else
+ {
+ endwin ();
+ fprintf (stderr, "Sorry, no nethack for you now, please "
+ "contact the admin.\n");
+ graceful_exit (1);
+ }
}
}
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid =
- "$OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $";
+ "$OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
*/
size_t
strlcat (dst, src, siz)
- char *dst;
- const char *src;
- size_t siz;
+ char *dst;
+ const char *src;
+ size_t siz;
{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
- size_t dlen;
+ register char *d = dst;
+ register const char *s = src;
+ register size_t n = siz;
+ size_t dlen;
- /* Find the end of dst and adjust bytes left but don't go past end */
- while (n-- != 0 && *d != '\0')
- d++;
- dlen = d - dst;
- n = siz - dlen;
+ /* Find the end of dst and adjust bytes left but don't go past end */
+ while (n-- != 0 && *d != '\0')
+ d++;
+ dlen = d - dst;
+ n = siz - dlen;
- if (n == 0)
- return (dlen + strlen (s));
- while (*s != '\0')
- {
- if (n != 1)
- {
- *d++ = *s;
- n--;
- }
- s++;
- }
- *d = '\0';
+ if (n == 0)
+ return (dlen + strlen (s));
+ while (*s != '\0')
+ {
+ if (n != 1)
+ {
+ *d++ = *s;
+ n--;
+ }
+ s++;
+ }
+ *d = '\0';
- return (dlen + (s - src)); /* count does not include NUL */
+ return (dlen + (s - src)); /* count does not include NUL */
}