#include "xstat.h"
#include <X11/Xaw/Scrollbar.h>
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif /* ndef MAXPATHLEN */
+
+
#if defined(SVR4) || defined(SYSV) || defined(USG)
extern uid_t getuid();
extern void qsort();
if (strcmp(path, SFcurrentDir)) {
result = chdir(path);
if (!result) {
- (void) strcpy(SFcurrentDir, path);
+ (void) strncpy(SFcurrentDir, path, MAXPATHLEN);
}
}
return result;
}
-static
+static void
SFfree(i)
int i;
{
XtFree(dir->dir);
dir->dir = NULL;
+ return;
}
-static
+static void
SFstrdup(s1, s2)
char **s1;
char *s2;
{
*s1 = strcpy(XtMalloc((unsigned) (strlen(s2) + 1)), s2);
+ return;
}
-static
+static void
SFunreadableDir(dir)
SFDir *dir;
{
dir->entries[0].shown = dir->entries[0].real;
dir->nEntries = 1;
dir->nChars = strlen(cannotOpen);
+ return;
}
#ifdef SEL_FILE_IGNORE_CASE
}
#endif /* def SEL_FILE_IGNORE_CASE */
-static
+static void
SFreplaceText(dir, str)
SFDir *dir;
char *str;
}
SFtextChanged();
+ return;
}
static void
return 0;
}
-static
+static void
SFunselect()
{
SFDir *dir;
}
dir->beginSelection = -1;
dir->endSelection = -1;
+ return;
}
static int
return strcmp(p->name, q->name);
}
-static
+static void
SFgetHomeDirs()
{
struct passwd *pw;
for (i--; i >= 0; i--) {
(void) strcat(entries[i].real, "/");
}
+ return;
}
static int
if (!strcmp(SFhomeDir.entries[i].real, begin)) {
*end = save;
SFstrdup(&theRest, end);
- (void) strcat(strcat(strcpy(SFcurrentPath,
- SFlogins[i].dir), "/"), theRest);
+ (void) strcat(strcat(strncpy(SFcurrentPath,SFlogins[i].dir,
+ MAXPATHLEN), "/"),
+ theRest);
XtFree(theRest);
SFsetText(SFcurrentPath);
SFtextChanged();
return 0;
}
+void
SFupdatePath()
{
static int alloc;
}
}
}
+ return;
}
+void
SFsetText(path)
char *path;
{
XawTextReplace(selFileField, 0, strlen(SFtextBuffer), &text);
XawTextSetInsertionPoint(selFileField, strlen(SFtextBuffer));
+
+ return;
}
/* ARGSUSED */