about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTFile.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-11-23 11:22:26 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1998-11-23 11:22:26 -0500
commite87f21b4ae754e738cbb577215a039a26e28ad52 (patch)
tree40cb2927aab0c440847fa74ff48bb6e0eab9a872 /WWW/Library/Implementation/HTFile.c
parent8da648ea48792ba4d8714759c557eb7c0f138b0d (diff)
downloadlynx-snapshots-e87f21b4ae754e738cbb577215a039a26e28ad52.tar.gz
snapshot of project "lynx", label v2-8-2dev_7
Diffstat (limited to 'WWW/Library/Implementation/HTFile.c')
-rw-r--r--WWW/Library/Implementation/HTFile.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index 3e030de0..a4f35b1a 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -38,13 +38,6 @@
 #include <stat.h>
 #endif /* VMS */
 
-#ifndef VMS
-#ifdef LONG_LIST
-#include <pwd.h>
-#include <grp.h>
-#endif /* LONG_LIST */
-#endif /* !VMS */
-
 #ifdef USE_ZLIB
 #include <GridText.h>
 #endif
@@ -59,6 +52,7 @@
 #endif /* !DECNET */
 #include <HTAnchor.h>
 #include <HTAtom.h>
+#include <HTAAProt.h>
 #include <HTWriter.h>
 #include <HTFWriter.h>
 #include <HTInit.h>
@@ -173,8 +167,7 @@ PRIVATE void LYListFmtParse ARGS5(
 	char buf[512];
 	char fmt[512];
 	char type;
-	struct passwd *p;
-	struct group *g;
+	char *name;
 	time_t now;
 	char *datestr;
 	int len;
@@ -308,10 +301,10 @@ PRIVATE void LYListFmtParse ARGS5(
 
 		case 'o':	/* owner */
 			sprintf(fmt, "%%%ss", start);
-			p = getpwuid(st.st_uid);
-			if (p) {
+			name = HTAA_UidToName (st.st_uid);
+			if (*name) {
 				sprintf(fmt, "%%%ss", start);
-				sprintf(buf, fmt, p->pw_name);
+				sprintf(buf, fmt, name);
 			} else {
 
 				sprintf(fmt, "%%%sd", start);
@@ -320,10 +313,10 @@ PRIVATE void LYListFmtParse ARGS5(
 			break;
 
 		case 'g':	/* group */
-			g = getgrgid(st.st_gid);
-			if (g) {
+			name = HTAA_GidToName(st.st_gid);
+			if (*name) {
 				sprintf(fmt, "%%%ss", start);
-				sprintf(buf, fmt, g->gr_name);
+				sprintf(buf, fmt, name);
 			} else {
 				sprintf(fmt, "%%%sd", start);
 				sprintf(buf, fmt, st.st_gid);
@@ -1545,14 +1538,15 @@ PUBLIC int HTLoadFile ARGS4(
 	**  If the file wasn't VMS syntax, then perhaps it is Ultrix.
 	*/
 	if (!fp) {
-	    char ultrixname[INFINITY];
+	    char * ultrixname = 0;
 	    CTRACE(tfp, "HTLoadFile: Can't open as %s\n", vmsname);
-	    sprintf(ultrixname, "%s::\"%s\"", nodename, filename);
+	    HTSprintf0(&ultrixname, "%s::\"%s\"", nodename, filename);
 	    fp = fopen(ultrixname, "r", "shr=put", "shr=upd");
 	    if (!fp) {
 		CTRACE(tfp, "HTLoadFile: Can't open as %s\n",
 			    ultrixname);
 	    }
+	    FREE(ultrixname);
 	}
 	if (fp) {
 	    int len;