X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=textclient%2Fsrc%2Fgetutline.c;fp=textclient%2Fsrc%2Fgetutline.c;h=0000000000000000000000000000000000000000;hb=60f3a5bad3479251ba9b75178269f0d3302fd4f2;hp=7c6b78e2fb5608de02d39a53b21c90353ad475cc;hpb=d007cf2d3930d0fda25139efafe4565d8693a08d;p=citadel.git diff --git a/textclient/src/getutline.c b/textclient/src/getutline.c deleted file mode 100644 index 7c6b78e2f..000000000 --- a/textclient/src/getutline.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * getutline.c: not-quite-compatible replacement for getutline(3) - * by nathan bryant, feb 1999 - */ - -#include "sysdep.h" -#ifdef HAVE_UTMP_H -#include -#include -#include -#ifdef HAVE_PATHS_H -#include -#endif -#include - -struct utmp *getutline(struct utmp *ut) -{ - static struct utmp retval; - FILE *utmp; - -#ifdef UTMP_FILE - if ((utmp = fopen(UTMP_FILE, "rb")) == NULL) -#else - if ((utmp = fopen(_PATH_UTMP, "rb")) == NULL) -#endif - return NULL; - - do - if (!fread(&retval, sizeof retval, 1, utmp)) - { - fclose(utmp); - return NULL; - } - while (strcmp(ut->ut_line, retval.ut_line)); - - fclose(utmp); - return &retval; -} -#endif /* HAVE_UTMP_H */