Created 25-Aug-95 by Peter Orbaek <poe@daimi.aau.dk>
Fixed by JDS June 1996 to clear lists and close files
- 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
+ 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
- added Native Language Support
*/
#include "pathnames.h"
#include "login.h"
+#include "xstrncpy.h"
#ifdef TESTING
struct hostent hostaddress;
tc->next = ttyclasses;
tc->first = NULL;
- strncpy(tc->classname, class, CLASSNAMELEN);
- tc->classname[CLASSNAMELEN-1] = 0;
+ xstrncpy(tc->classname, class, CLASSNAMELEN);
ttyclasses = tc;
return tc;
}
}
ge->next = tc->first;
- strncpy(ge->name, tty, NAMELEN);
- ge->name[NAMELEN-1] = 0;
+ xstrncpy(ge->name, tty, NAMELEN);
tc->first = ge;
}
if (class[0] == '[') {
if ((p = strchr(class, ']'))) {
*p = 0;
- strncpy(timespec, class+1, sizeof(timespec));
- timespec[sizeof(timespec)-1] = 0;
+ xstrncpy(timespec, class+1, sizeof(timespec));
*p = ']';
if(!timeok(tm, timespec)) return 0;
class = p+1;
if (n[0] == '[') {
if ((p = strchr(n, ']'))) {
*p = 0;
- strncpy(timespec, n+1, sizeof(timespec));
- timespec[sizeof(timespec)-1] = 0;
+ xstrncpy(timespec, n+1, sizeof(timespec));
*p = ']';
if(!timeok(tm, timespec)) continue;
n = p+1;
if(*ptr == '#') *ptr = 0;
if (buf[0] == '*') {
- strncpy(defaultbuf, buf, 256);
- defaultbuf[255] = 0;
+ xstrncpy(defaultbuf, buf, 256);
continue;
}