1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 #ifndef NEDIT_UTILS_H_INCLUDED
28 #define NEDIT_UTILS_H_INCLUDED
29
30 #include <sys/utsname.h>
31 #include <sys/types.h>
32
33 #ifdef VMS
34 #include "vmsparam.h"
35 #else
36 #include <sys/param.h>
37 #endif
38
39 const char *GetCurrentDir(
void);
40 const char *GetHomeDir(
void);
41 char *PrependHome(
const char *filename,
char *buf,
size_t buflen);
42 const char *GetUserName(
void);
43 const char *GetNameOfHost(
void);
44 int Min(
int i1,
int i2);
45 const char* GetRCFileName(
int type);
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61 typedef struct _stackObject {
62 void* value;
63 struct _stackObject* next;
64 } stackObject;
65
66 typedef struct {
67 unsigned size;
68 stackObject* top;
69 } Stack;
70
71 void Push(Stack* stack,
const void* value);
72 void* Pop(Stack* stack);
73
74
75 enum {
NEDIT_RC,
AUTOLOAD_NM,
NEDIT_HISTORY,
SEARCH_HISTORY,
XNEDIT_HOME,
N_FILE_TYPES};
76
77
78
79 #define MAXUSERNAMELEN 32
80
81
82
83 #ifdef SYS_NMLN
84 #define MAXNODENAMELEN SYS_NMLN
85 #else
86 #define MAXNODENAMELEN (
MAXPATHLEN+
2)
87 #endif
88
89 #endif
90