1 /* $Id: utils.h,v 1.11 2002/11/28 23:22:29 yooden Exp $ */
3 #ifndef NEDIT_UTILS_H_INCLUDED
4 #define NEDIT_UTILS_H_INCLUDED
6 #include <sys/utsname.h>
11 #include <sys/param.h>
14 extern const char *GetCurrentDir(void);
15 extern const char *GetHomeDir(void);
16 extern char *PrependHome(const char *filename
, char *buf
, int buflen
);
17 const char *GetUserName(void);
18 const char *GetNameOfHost(void);
19 extern int Max(int i1
, int i2
);
20 extern int Min(int i1
, int i2
);
21 extern int Min3(int i1
, int i2
, int i3
);
22 extern int Max3(int i1
, int i2
, int i3
);
23 const char* GetRCFileName(int type
);
25 /* N_FILE_TYPES must be the last entry!! This saves us from counting. */
26 enum {NEDIT_RC
, AUTOLOAD_NM
, NEDIT_HISTORY
, N_FILE_TYPES
};
28 /* If anyone knows where to get this from system include files (in a machine
29 independent way), please change this (L_cuserid is apparently not ANSI) */
30 #define MAXUSERNAMELEN 32
32 /* Ditto for the maximum length for a node name. SYS_NMLN is not available
33 on most systems, and I don't know what the portable alternative is. */
35 #define MAXNODENAMELEN SYS_NMLN
37 #define MAXNODENAMELEN (MAXPATHLEN+2)
40 #endif /* NEDIT_UTILS_H_INCLUDED */