aboutsummaryrefslogtreecommitdiff
path: root/lib/libcurses/fullname.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcurses/fullname.c')
-rw-r--r--lib/libcurses/fullname.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/lib/libcurses/fullname.c b/lib/libcurses/fullname.c
index 11cf4cbe5408..3d05e5d6ef81 100644
--- a/lib/libcurses/fullname.c
+++ b/lib/libcurses/fullname.c
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1981 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1981, 1993
+ * The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,34 +32,29 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)fullname.c 5.4 (Berkeley) 6/1/90";
-#endif /* not lint */
-
-# define reg register
+static char sccsid[] = "@(#)fullname.c 8.1 (Berkeley) 6/4/93";
+#endif /* not lint */
/*
+ * fullname --
* This routine fills in "def" with the full name of the terminal.
- * This is assumed to be the last name in the list of aliases.
- *
+ * This is assumed to be the last name in the list of aliases.
*/
char *
fullname(bp, def)
-reg char *bp, *def;
+ register char *bp, *def;
{
+ register char *cp;
- reg char *cp;
-
- *def = 0; /* in case no name */
+ *def = '\0'; /* In case no name. */
while (*bp && *bp != ':') {
- cp = def; /* start of answer */
- while (*bp && *bp != ':' && *bp != '|') {
- *cp++ = *bp++; /* copy name over */
- }
- *cp = 0; /* zero end of name */
- if (*bp == '|') {
- bp++; /* skip over '|' if that is case */
- }
+ cp = def; /* Start of answer. */
+ while (*bp && *bp != ':' && *bp != '|')
+ *cp++ = *bp++; /* Copy name over. */
+ *cp = '\0'; /* Zero end of name. */
+ if (*bp == '|')
+ bp++; /* Skip over '|' if that is case. */
}
- return(def);
+ return (def);
}