summaryrefslogtreecommitdiff
path: root/usr.bin/sort/sort.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/sort/sort.h')
-rw-r--r--usr.bin/sort/sort.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/usr.bin/sort/sort.h b/usr.bin/sort/sort.h
index d7a3144..4d87a11 100644
--- a/usr.bin/sort/sort.h
+++ b/usr.bin/sort/sort.h
@@ -118,7 +118,7 @@ typedef struct recheader {
length_t length; /* total length of key and line */
length_t offset; /* to line */
int keylen; /* length of key */
- u_char data[]; /* key then line */
+ unsigned char data[]; /* key then line */
} RECHEADER;
/* This is the column as seen by struct field. It is used by enterfield.
@@ -134,8 +134,8 @@ struct column {
* corresponding column in the current line. This is determined in enterkey.
*/
typedef struct coldesc {
- u_char *start;
- u_char *end;
+ unsigned char *start;
+ unsigned char *end;
int num;
} COLDESC;
@@ -150,21 +150,21 @@ typedef struct coldesc {
struct field {
struct column icol;
struct column tcol;
- u_int flags;
- u_char *mask;
- u_char *weights;
+ unsigned int flags;
+ unsigned char *mask;
+ unsigned char *weights;
};
struct filelist {
const char * const * names;
};
-typedef int (*get_func_t)(FILE *, RECHEADER *, u_char *, struct field *);
+typedef int (*get_func_t)(FILE *, RECHEADER *, unsigned char *, struct field *);
typedef void (*put_func_t)(const RECHEADER *, FILE *);
-extern u_char ascii[NBINS], Rascii[NBINS], Ftable[NBINS], RFtable[NBINS];
-extern u_char *const weight_tables[4]; /* ascii, Rascii, Ftable, RFtable */
-extern u_char d_mask[NBINS];
+extern unsigned char ascii[NBINS], Rascii[NBINS], Ftable[NBINS], RFtable[NBINS];
+extern unsigned char *const weight_tables[4]; /* ascii, Rascii, Ftable, RFtable */
+extern unsigned char d_mask[NBINS];
extern int SINGL_FLD, SEP_FLAG, UNIQUE, REVERSE;
extern int posix_sort;
extern int REC_D;
@@ -178,7 +178,7 @@ extern unsigned int debug_flags;
RECHEADER *allocrec(RECHEADER *, size_t);
void append(RECHEADER **, int, FILE *, void (*)(const RECHEADER *, FILE *));
void concat(FILE *, FILE *);
-length_t enterkey(RECHEADER *, const u_char *, u_char *, size_t, struct field *);
+length_t enterkey(RECHEADER *, const unsigned char *, unsigned char *, size_t, struct field *);
void fixit(int *, char **, const char *);
void fldreset(struct field *);
FILE *ftmp(void);
@@ -186,16 +186,19 @@ void fmerge(struct filelist *, int, FILE *, struct field *);
void save_for_merge(FILE *, get_func_t, struct field *);
void merge_sort(FILE *, put_func_t, struct field *);
void fsort(struct filelist *, int, FILE *, struct field *);
-int geteasy(FILE *, RECHEADER *, u_char *, struct field *);
-int makekey(FILE *, RECHEADER *, u_char *, struct field *);
-int makeline(FILE *, RECHEADER *, u_char *, struct field *);
+int geteasy(FILE *, RECHEADER *, unsigned char *, struct field *);
+int makekey(FILE *, RECHEADER *, unsigned char *, struct field *);
+int makeline(FILE *, RECHEADER *, unsigned char *, struct field *);
void makeline_copydown(RECHEADER *);
int optval(int, int);
-__dead void order(struct filelist *, struct field *, int);
+void order(struct filelist *, struct field *, int);
void putline(const RECHEADER *, FILE *);
void putrec(const RECHEADER *, FILE *);
void putkeydump(const RECHEADER *, FILE *);
-void rd_append(int, int, int, FILE *, u_char *, u_char *);
+void rd_append(int, int, int, FILE *, unsigned char *, unsigned char *);
void radix_sort(RECHEADER **, RECHEADER **, int);
int setfield(const char *, struct field *, int);
void settables(void);
+
+#define ALLPERMS (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
+