* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
} else if (_nc_access(path, R_OK | W_OK | X_OK) < 0) {
rc = -1; /* permission denied */
} else if (!(S_ISDIR(statbuf.st_mode))) {
} else if (_nc_access(path, R_OK | W_OK | X_OK) < 0) {
rc = -1; /* permission denied */
} else if (!(S_ISDIR(statbuf.st_mode))) {
}
#define Write(buf, size, count) fake_write(buffer, offset, limit, (char *) buf, count, size)
}
#define Write(buf, size, count) fake_write(buffer, offset, limit, (char *) buf, count, size)
#undef LITTLE_ENDIAN /* BSD/OS defines this as a feature macro */
#define HI(x) ((x) / 256)
#define LO(x) ((x) % 256)
#undef LITTLE_ENDIAN /* BSD/OS defines this as a feature macro */
#define HI(x) ((x) / 256)
#define LO(x) ((x) % 256)
-#define LITTLE_ENDIAN(p, x) (p)[0] = LO(x), (p)[1] = HI(x)
+#define LITTLE_ENDIAN(p, x) (p)[0] = (unsigned char)LO(x), \
+ (p)[1] = (unsigned char)HI(x)
#define WRITE_STRING(str) (Write(str, sizeof(char), strlen(str) + 1) == strlen(str) + 1)
static int
compute_offsets(char **Strings, unsigned strmax, short *offsets)
{
#define WRITE_STRING(str) (Write(str, sizeof(char), strlen(str) + 1) == strlen(str) + 1)
static int
compute_offsets(char **Strings, unsigned strmax, short *offsets)
{
TRACE_OUT(("put Strings[%d]=%s(%d)", (int) i,
_nc_visbuf(Strings[i]), (int) nextfree));
}
TRACE_OUT(("put Strings[%d]=%s(%d)", (int) i,
_nc_visbuf(Strings[i]), (int) nextfree));
}
size_t namelen, boolmax, nummax, strmax;
char zero = '\0';
size_t i;
size_t namelen, boolmax, nummax, strmax;
char zero = '\0';
size_t i;
short offsets[MAX_ENTRY_SIZE / 2];
unsigned char buf[MAX_ENTRY_SIZE];
unsigned last_bool = BOOLWRITE;
short offsets[MAX_ENTRY_SIZE / 2];
unsigned char buf[MAX_ENTRY_SIZE];
unsigned last_bool = BOOLWRITE;