-/* $Id$ */
+/*
+ * $Id$
+ *
+ * Server-side utility functions
+ *
+ */
+
+#ifdef DLL_EXPORT
+#define IN_LIBCIT
+#endif
+
#include "sysdep.h"
#include <stdlib.h>
#include <unistd.h>
{
int a;
+ if (string == NULL) return;
if (strlen(string)==0) return;
/* Convert non-printable characters to blanks */
void mesg_locate(char *targ, char *searchfor, int numdirs, char **dirs)
{
int a;
- char buf[256];
+ char buf[SIZ];
FILE *ls;
for (a=0; a<numdirs; ++a) {
sprintf(buf,"cd %s; exec ls",dirs[a]);
ls = (FILE *) popen(buf,"r");
if (ls != NULL) {
- while(fgets(buf,255,ls)!=NULL) {
+ while(fgets(buf,sizeof buf,ls)!=NULL) {
while (isspace(buf[strlen(buf)-1]))
buf[strlen(buf)-1] = 0;
if (!strcasecmp(buf,searchfor)) {