Bytecount match = -1;
Bytecount len = XSTRING_LENGTH( extension );
if ( len > 0 ) {
- char re[len+6],
+ char re[len+6],
*rep = re;
Bufbyte *ext = XSTRING_DATA(extension);
Lisp_Object regexp;
terminator if need to append...
*/
rep += len-1;
- if ( *rep++ != '$' )
+ if ( *rep++ != '$' )
*rep++ = '$';
*rep = '\0';
regexp = make_string( (Bufbyte*)re, strlen(re));
res = make_string(p, end - p);
if ( STRINGP( extension ) ) {
Bytecount match;
- match = file_basename_match_extension(res,
+ match = file_basename_match_extension(res,
extension);
if ( match >= 0 )
RETURN_UNGCPRO(make_string(p, match));
do {
ext = XCAR(rest);
Bytecount match;
- match = file_basename_match_extension(res,
+ match = file_basename_match_extension(res,
ext);
if ( match >= 0 )
RETURN_UNGCPRO(make_string(p, match));
{
Lisp_Object handler =
Ffind_file_name_handler(expanded_name, Qfile_truename);
-
+
if (!NILP(handler))
RETURN_UNGCPRO
(call2_check_string
goto toolong;
/* Try doing it all at once. */
- /* !! Does realpath() Mule-encapsulate? Answer: Nope!
+ /* !! Does realpath() Mule-encapsulate? Answer: Nope!
So we do it above */
if (path != NULL && !xrealpath((char *)path, resolved_path)) {
/* Didn't resolve it -- have to do it one
- component at a time.
+ component at a time.
"realpath" is a typically useless, stupid
un*x piece of crap. It claims to return a
Since we depend on undocumented semantics
of various system realpath()s, we just use
- our own version in realpath.c.
+ our own version in realpath.c.
*/
for (;;) {
Extbyte *pos = NULL;
*p = DIRECTORY_SEP;
else
break;
-
+
} else if (errno == ENOENT || errno == EACCES) {
/* Failed on this component.
Just tack on the rest of
places in resolved_path the
absolute pathname of the
path component which could
- not be resolved."
+ not be resolved."
*/
if (p == NULL ) {
break;
}
int plen = elen - (p - path);
-
+
if (rlen > 1 &&
IS_DIRECTORY_SEP
(resolved_path[rlen - 1]))
Lisp_Object resolved_name;
int rlen = strlen(resolved_path);
- if (elen > 0
+ if (elen > 0
&& IS_DIRECTORY_SEP(
- XSTRING_BYTE(expanded_name, elen-1))
- && !(rlen > 0 &&
+ XSTRING_BYTE(expanded_name, elen-1))
+ && !(rlen > 0 &&
IS_DIRECTORY_SEP(resolved_path[rlen-1]))) {
if (rlen + 1 > countof(resolved_path))
goto toolong;
}
strncpy(dir, (char *)XSTRING_DATA(dirname_),
XSTRING_LENGTH(dirname_) + 1);
- dir[XSTRING_LENGTH(dirname_)]='\0';
+ dir[XSTRING_LENGTH(dirname_)]='\0';
if (dir[XSTRING_LENGTH(dirname_) - 1] == '/')
- dir[XSTRING_LENGTH(dirname_) - 1] = '\0';
+ dir[XSTRING_LENGTH(dirname_) - 1] = '\0';
if (mkdir(dir, 0777) != 0)
report_file_error("Creating directory", list1(dirname_));
to avoid a "file has changed on disk" warning on
next attempt to save. */
if (visiting)
- if (stat_res == 0)
+ if (stat_res == 0)
current_buffer->modtime = st.st_mtime;
- /* else:
+ /* else:
If sxemacs_stat failed, we have bigger problems, and
most likely the file is gone, so the error next time is
the right behavior
- */
+ */
if (failure) {
errno = save_errno;
max_sz = strlen(lock_info.user) + strlen(lock_info.host)
+ LOCK_PID_MAX + 9;
locker = (char *)alloca(max_sz);
- sz = snprintf(locker, max_sz, "%s@%s (pid %lu)",
+ sz = snprintf(locker, max_sz, "%s@%s (pid %lu)",
lock_info.user, lock_info.host,
lock_info.pid);
assert(sz>=0 && sz < max_sz);
All integers representable in Lisp are equally likely.
On most systems, this is 31 bits' worth.
-With positive integer argument LIMIT, return random number
+With positive integer argument LIMIT, return random number
in interval [0,LIMIT). LIMIT can be a big integer, in which
case the range of possible values is extended.
-With argument t, set the random number seed from the
+With argument t, set the random number seed from the
current time and pid.
*/
(limit))
Bufbyte *string_result_ptr = NULL;
struct gcpro gcpro1;
int speccount = specpdl_depth();
- Charcount total_length;
-
+ Charcount total_length;
+
/* The modus operandi in Emacs is "caller gc-protects args".
However, concat is called many times in Emacs on freshly
the result in the returned string's `string-translatable' property. */
#endif
if (target_type == c_string)
- XMALLOC_OR_ALLOCA(args_mse, nargs, struct merge_string_extents_struct);
+ XMALLOC_OR_ALLOCA(args_mse, nargs, struct merge_string_extents_struct);
/* In append, the last arg isn't treated like the others */
if (last_special && nargs > 0) {
/* Charcount is a misnomer here as we might be dealing with the
length of a vector or list, but emphasizes that we're not dealing
with Bytecounts in strings */
- /* Charcount total_length; */
+ /* Charcount total_length; */
for (argnum = 0, total_length = 0; argnum < nargs; argnum++) {
#ifdef LOSING_BYTECODE
switch (target_type) {
case c_cons:
- if (total_length == 0) {
+ if (total_length == 0) {
/* In append, if all but last arg are nil,
return last arg */
- XMALLOC_UNBIND(args_mse, nargs, speccount);
+ XMALLOC_UNBIND(args_mse, nargs, speccount);
RETURN_UNGCPRO(last_tail);
- }
+ }
val = Fmake_list(make_int(total_length), Qnil);
break;
case c_dllist:
- if (total_length == 0) {
+ if (total_length == 0) {
/* In append, if all but last arg are nil,
return last arg */
- XMALLOC_UNBIND(args_mse, nargs, speccount);
+ XMALLOC_UNBIND(args_mse, nargs, speccount);
RETURN_UNGCPRO(last_tail);
- }
+ }
val = Fmake_list(make_int(total_length), Qnil);
break;
case c_vector:
in order to make the char fit properly. O(N^2)
yuckage. */
val = Qnil;
- XMALLOC_ATOMIC_OR_ALLOCA( string_result,
+ XMALLOC_ATOMIC_OR_ALLOCA( string_result,
total_length * MAX_EMCHAR_LEN,
Bufbyte );
string_result_ptr = string_result;
XINT(elt));
} else {
CHECK_CHAR_COERCE_INT(elt);
- if(string_result_ptr != NULL) {
+ if(string_result_ptr != NULL) {
string_result_ptr +=
set_charptr_emchar(string_result_ptr,
XCHAR(elt));
If START or END is negative, it counts from the end.
Relevant parts of the string-extent-data are copied to the new string.
*/
- (string, start, end))
+ (string, start, end))
{
Charcount ccstart, ccend;
Bytecount bstart, blen;
}
\f
/************************************************************************/
-/* property-list functions */
+/* property-list functions */
/************************************************************************/
/* For properties of text, we need to do order-insensitive comparison of
const struct lrecord_implementation
*imp1 = XRECORD_LHEADER_IMPLEMENTATION (obj1),
*imp2 = XRECORD_LHEADER_IMPLEMENTATION (obj2);
-
+
/* #### not yet implemented properly, needs another flag to specify
equalp-ness */
return (imp1 == imp2) &&
.--------. .--------. .--------.
|aaaaaabb| |bbbbcccc| |ccdddddd|
`--------' `--------' `--------'
- 6 2 4 4 2 6
+ 6 2 4 4 2 6
.--------+--------+--------+--------.
|00aaaaaa|00bbbbbb|00cccccc|00dddddd|
`--------+--------+--------+--------'
low = ec - 'A' + 10;
else if (islower(ec))
low = ec - 'a' + 10;
- else
+ else
ignore_p = 1;
if (low < 0 || low >= 16)
printf "Vsxemacs_codename: "
pobj Vsxemacs_codename
end
-
UMAX
UMAX4_3
__linux__ Linux: assumes /proc filesystem mounted.
- Support from Michael K. Johnson.
+ Support from Michael K. Johnson.
__NetBSD__ NetBSD: assumes /kern filesystem mounted.
__OpenBSD__ OpenBSD: ditto.
/* read a buffer */
#define RD_BUF(f,p,l) \
- while ((l)) \
- if ((j = read((f),(p),(l))) < 0) \
- if (errno != EINTR) return (-1); \
- else continue; \
- else { (l) -= j; (p) += j; }
+ while ((l)) \
+ if ((j = read((f),(p),(l))) < 0) \
+ if (errno != EINTR) return (-1); \
+ else continue; \
+ else { (l) -= j; (p) += j; }
/*************** function prototypes ***************************/
#ifdef __STDC__
/* Least bad thing in case of in fatal_failure, where
assert will not terminate this function... */
return 0;
- }
+ }
vpix = 0;
for (i = start; i <= end; i++)
else {
dval1 = (dhz1 * 128 + 63) / 1000;
if ((dval1 < 1) || (dval1 > 255)) {
- int sz = snprintf(buf, sizeof(buf),
+ int sz = snprintf(buf, sizeof(buf),
"sst_tones: dhz1 %d out of range", dhz1);
assert(sz >= 0 && sz < sizeof(buf));
warn(buf);
/*
Format of a non-union-type Lisp Object
- 3 2 1 0
+ 3 2 1 0
bit 10987654321098765432109876543210
- --------------------------------
- VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTT
+ --------------------------------
+ VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTT
Integers are treated specially, and look like this:
- 3 2 1 0
+ 3 2 1 0
bit 10987654321098765432109876543210
- --------------------------------
- VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVT
+ --------------------------------
+ VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVT
For integral Lisp types, i.e. integers and characters, the value
bits are the Lisp object. Some people call such Lisp_Objects "immediate".
{
LIST_LOOP_3 (elt, list, tail)
{
- execute_code_here;
+ execute_code_here;
}
}
#define PRIVATE_EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \
tortoise, suspicion_length) \
for (tortoise = hare = list, len = 0; \
- \
+ \
(CONSP (hare) ? ((elt = XCAR (hare)), 1) : \
(NILP (hare) ? 0 : \
(signal_malformed_list_error (list), 0))); \
list = XCDR (tail_##elt); \
else \
XCDR (prev_tail_##elt) = XCDR (tail_##elt); \
- /* Keep tortoise from ever passing hare. */ \
+ /* Keep tortoise from ever passing hare. */ \
len_##elt = 0; \
} \
else \
tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
#define EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, hare, \
- tortoise, suspicion_length) \
+ tortoise, suspicion_length) \
for (tortoise = hare = list, len = 0; \
\
((CONSP (hare) && \
struct gcpro *, struct gcpro *, Lisp_Object *, Lisp_Object *,
Lisp_Object *, Lisp_Object *, Lisp_Object *);
void debug_gcpro6(char *, int, struct gcpro *, struct gcpro *, struct gcpro *,
- struct gcpro *, struct gcpro *, struct gcpro *, Lisp_Object *,
- Lisp_Object *, Lisp_Object *, Lisp_Object *, Lisp_Object *,
- Lisp_Object *);
+ struct gcpro *, struct gcpro *, struct gcpro *, Lisp_Object *,
+ Lisp_Object *, Lisp_Object *, Lisp_Object *, Lisp_Object *,
+ Lisp_Object *);
void debug_gcpro7(char *, int, struct gcpro *, struct gcpro *, struct gcpro *,
- struct gcpro *, struct gcpro *, struct gcpro *, struct gcpro *,
- Lisp_Object *, Lisp_Object *, Lisp_Object *, Lisp_Object *,
- Lisp_Object *, Lisp_Object *, Lisp_Object *);
+ struct gcpro *, struct gcpro *, struct gcpro *, struct gcpro *,
+ Lisp_Object *, Lisp_Object *, Lisp_Object *, Lisp_Object *,
+ Lisp_Object *, Lisp_Object *, Lisp_Object *);
void debug_gcpro8(char *, int, struct gcpro *, struct gcpro *, struct gcpro *,
struct gcpro *, struct gcpro *, struct gcpro *, struct gcpro *,
- struct gcpro *, Lisp_Object *, Lisp_Object *,
- Lisp_Object *, Lisp_Object *, Lisp_Object *, Lisp_Object *,
- Lisp_Object *, Lisp_Object *);
+ struct gcpro *, Lisp_Object *, Lisp_Object *,
+ Lisp_Object *, Lisp_Object *, Lisp_Object *, Lisp_Object *,
+ Lisp_Object *, Lisp_Object *);
void debug_ungcpro(char *, int, struct gcpro *);
#define GCPRO1(v) \
&v1,&v2,&v3,&v4,&v5)
#define GCPRO6(v1,v2,v3,v4,v5,v6) \
debug_gcpro6 (__FILE__, __LINE__,&gcpro1,&gcpro2,&gcpro3,&gcpro4,&gcpro5,&gcpro6, \
- &v1,&v2,&v3,&v4,&v5,&v6)
+ &v1,&v2,&v3,&v4,&v5,&v6)
#define GCPRO7(v1,v2,v3,v4,v5,v6,v7) \
debug_gcpro7 (__FILE__, __LINE__,&gcpro1,&gcpro2,&gcpro3,&gcpro4,&gcpro5,&gcpro6,&gcpro7,\
&v1,&v2,&v3,&v4,&v5,&v6,&v7)
#define GCPRO8(v1,v2,v3,v4,v5,v6,v7,v8) \
debug_gcpro8 (__FILE__, __LINE__,&gcpro1,&gcpro2,&gcpro3,&gcpro4,&gcpro5,&gcpro6,&gcpro7,&gcpro8, \
- &v1,&v2,&v3,&v4,&v5,&v6,&v7,&v8)
+ &v1,&v2,&v3,&v4,&v5,&v6,&v7,&v8)
#define UNGCPRO \
debug_ungcpro(__FILE__, __LINE__,&gcpro1)
&ngcpro5,&v1,&v2,&v3,&v4,&v5)
#define NGCPRO6(v1,v2,v3,v4,v5,v6) \
debug_gcpro6 (__FILE__, __LINE__,&ngcpro1,&ngcpro2,&ngcpro3,&ngcpro4,&ngcpro5,&ngcpro6, \
- &v1,&v2,&v3,&v4,&v5,&v6)
+ &v1,&v2,&v3,&v4,&v5,&v6)
#define NGCPRO7(v1,v2,v3,v4,v5,v6,v7) \
debug_gcpro7 (__FILE__, __LINE__,&ngcpro1,&ngcpro2,&ngcpro3,&ngcpro4,&ngcpro5,&ngcpro6,&ngcpro7,\
&v1,&v2,&v3,&v4,&v5,&v6,&v7)
#define NGCPRO8(v1,v2,v3,v4,v5,v6,v7,v8) \
debug_gcpro8 (__FILE__, __LINE__,&ngcpro1,&ngcpro2,&ngcpro3,&ngcpro4,&ngcpro5,&ngcpro6,&ngcpro7,&ngcpro8, \
- &v1,&v2,&v3,&v4,&v5,&v6,&v7,&v8)
+ &v1,&v2,&v3,&v4,&v5,&v6,&v7,&v8)
#define NUNGCPRO \
debug_ungcpro(__FILE__, __LINE__,&ngcpro1)
&nngcpro5,&v1,&v2,&v3,&v4,&v5)
#define NNGCPRO6(v1,v2,v3,v4,v5,v6) \
debug_gcpro6 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,&nngcpro5,&nngcpro6, \
- &v1,&v2,&v3,&v4,&v5,&v6)
+ &v1,&v2,&v3,&v4,&v5,&v6)
#define NNGCPRO7(v1,v2,v3,v4,v5,v6,v7) \
debug_gcpro7 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,&nngcpro5,&nngcpro6,&nngcpro7,\
&v1,&v2,&v3,&v4,&v5,&v6,&v7)
#define NNGCPRO8(v1,v2,v3,v4,v5,v6,v7,v8) \
debug_gcpro8 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,&nngcpro5,&nngcpro6,&nngcpro7,&nngcpro8, \
- &v1,&v2,&v3,&v4,&v5,&v6,&v7,&v8)
+ &v1,&v2,&v3,&v4,&v5,&v6,&v7,&v8)
#define NNUNGCPRO \
debug_ungcpro(__FILE__, __LINE__,&nngcpro1)
#endif
\f
/************************************************************************/
-/* Misc definitions */
+/* Misc definitions */
/************************************************************************/
#include "dllist.h"
\f
/************************************************************************/
-/* Other numeric types */
+/* Other numeric types */
/************************************************************************/
/* more allocation goodies, C99 wise */
Lisp_Object call2_trapping_errors(char*,
Lisp_Object, Lisp_Object, Lisp_Object);
Lisp_Object call3_trapping_errors(char*,
- Lisp_Object, Lisp_Object, Lisp_Object,
- Lisp_Object);
+ Lisp_Object, Lisp_Object, Lisp_Object,
+ Lisp_Object);
Lisp_Object call_with_suspended_errors(lisp_fn_t, volatile Lisp_Object,
Lisp_Object, Error_behavior, int, ...);
/* C Code should be using internal_catch, record_unwind_p, condition_case_1 */
* representation of an integral type. Add a few bytes for truncation,
* optional sign prefix, and null byte terminator.
* 2.40824 == log (256) / log (10).
- *
+ *
* We don't use floating point since Sun cc (buggily?) cannot use
* floating point computations to define a compile-time integral
* constant.
struct gcpro ngcpro1;
NGCPRO1(lstrm);
- if (fd < 0)
- signal_file_error("Cannot open load file", file);
+ if (fd < 0)
+ signal_file_error("Cannot open load file", file);
lstrm = make_filedesc_input_stream(fd, 0, -1, LSTR_CLOSING);
/* 64K is used for normal files; 8K should be OK here because
following semantics:
a) nil - no suffix, just search for file name intact
- (semantically different from "empty suffix list", which
- would be meaningless.)
+ (semantically different from "empty suffix list", which
+ would be meaningless.)
b) list - list of suffixes to append to file name. Each of these
- must be a string.
+ must be a string.
c) string - colon-separated suffixes to append to file name (backward
- compatibility).
+ compatibility).
All of this got hairy, so I decided to use a mapper. Calling a
function for each suffix shouldn't slow things down, since
static Lisp_Object
ureader_find(Lisp_Object name)
{
- return Fcdr(Fassoc(name, Vureaders));
+ return Fcdr(Fassoc(name, Vureaders));
}
/*
static Lisp_Object
ureader_read(Lisp_Object ureader_fun, Lisp_Object readcharfun)
{
- Emchar c;
- unsigned int oparens = 0;
- struct gcpro gcpro1;
- Lisp_Object instr;
+ Emchar c;
+ unsigned int oparens = 0;
+ struct gcpro gcpro1;
+ Lisp_Object instr;
Lstream_rewind(XLSTREAM(Vread_buffer_stream));
while ((c = readchar(readcharfun)) >= 0) {
- if (c == '<')
- oparens++;
- else if (c == '>') {
- if (oparens == 0)
- /* We got final closing paren */
- break;
- else
- oparens--;
- }
- Lstream_put_emchar(XLSTREAM (Vread_buffer_stream), c);
+ if (c == '<')
+ oparens++;
+ else if (c == '>') {
+ if (oparens == 0)
+ /* We got final closing paren */
+ break;
+ else
+ oparens--;
+ }
+ Lstream_put_emchar(XLSTREAM (Vread_buffer_stream), c);
QUIT;
}
if (c < 0)
list1(READCHARFUN_MAYBE(readcharfun)));
Lstream_flush(XLSTREAM(Vread_buffer_stream));
- GCPRO1(instr);
- instr = make_string(resizing_buffer_stream_ptr
- (XLSTREAM(Vread_buffer_stream)),
- Lstream_byte_count(XLSTREAM(Vread_buffer_stream)));
+ GCPRO1(instr);
+ instr = make_string(resizing_buffer_stream_ptr
+ (XLSTREAM(Vread_buffer_stream)),
+ Lstream_byte_count(XLSTREAM(Vread_buffer_stream)));
- RETURN_UNGCPRO(call1(ureader_fun, instr));
+ RETURN_UNGCPRO(call1(ureader_fun, instr));
}
\f
return read_bigfr_string(read_ptr);
#endif /* HAVE_MPFR */
#if defined HAVE_MPF && defined WITH_GMP
- if (isfloat_string(read_ptr) && (Vread_real_as == Qbigf))
+ if (isfloat_string(read_ptr) && (Vread_real_as == Qbigf))
return read_bigf_string(read_ptr);
#endif /* HAVE_MPF */
Emchar _c_ = reader_nextchar(readcharfun);
/* check for permutation syntax */
if (_c_ == '[') {
- Lisp_Object perm =
+ Lisp_Object perm =
read_vector(readcharfun, ']');
if (ase_permutation_f) {
return ase_permutation_f(perm);
* structure syntax */
return read_structure(readcharfun);
case '<': {
- /* Check user readers */
- Lisp_Object uoname = read_string(readcharfun, ' ', 0);
- Lisp_Object ureader = ureader_find(uoname);
- if (!NILP(ureader))
- return ureader_read(ureader, readcharfun);
+ /* Check user readers */
+ Lisp_Object uoname = read_string(readcharfun, ' ', 0);
+ Lisp_Object ureader = ureader_find(uoname);
+ if (!NILP(ureader))
+ return ureader_read(ureader, readcharfun);
unreadchar(readcharfun, c);
return Fsignal(Qinvalid_read_syntax,
/* Possible minus/plus sign */
if (*cp == '-' || *cp == '+')
cp++;
-
+
/* Numerator */
if (*cp < '0' || *cp > '9')
return 0;
do {
cp++;
} while (*cp >= '0' && *cp <= '9');
-
+
/* Slash */
if (*cp++ != '/')
return 0;
-
+
/* Denominator */
if (*cp < '0' || *cp > '9')
return 0;
tem = Qnil;
ch = XCHAR(elt);
#ifdef FEATUREP_SYNTAX
- if (ch == s->terminator) {
+ if (ch == s->terminator) {
/* deal with #+, #- reader macros */
unreadchar(readcharfun, s->terminator);
goto done;
}
#endif
- /* User defined readers */
- DEFVAR_LISP("ureaders", &Vureaders /*
+ /* User defined readers */
+ DEFVAR_LISP("ureaders", &Vureaders /*
Alist of user defined readers.
Car is ureader NAME, represented by string to match against when reading
-#<NAME bla-bla-bla>
+#<NAME bla-bla-bla>
Cdr is user function called with one arg - string.
Function must return lisp object or signal error.
- */
- );
+ */
+ );
}
/* lread.c ends here */
} \
extern Lisp_Object Q##c_name##p
-# define DECLARE_EXTERNAL_LRECORD(c_name, structtype) \
+# define DECLARE_EXTERNAL_LRECORD(c_name, structtype) \
extern unsigned int lrecord_type_##c_name; \
extern struct lrecord_implementation lrecord_##c_name; \
extern_inline structtype * \
Function equivalents of the above macros.
Lstream_data_count Lstream_read (Lstream *stream, void *data,
- Lstream_data_count size)
+ Lstream_data_count size)
Read SIZE bytes of DATA from the stream. Return the number of
bytes read. 0 means EOF. -1 means an error occurred and no
bytes were read.
Lstream_data_count Lstream_write (Lstream *stream, void *data,
- Lstream_data_count size)
+ Lstream_data_count size)
Write SIZE bytes of DATA to the stream. Return the number of
bytes written. -1 means an error occurred and no bytes were
written.
const char *mode)
{
Lisp_Object obj = Qnil;
- if (filedesc < 0)
+ if (filedesc < 0)
return obj;
lstream_t lstr = Lstream_new(lstream_filedesc, mode);
filedesc_stream_t fstr = FILEDESC_STREAM_DATA(lstr);
functions. This MUST BE SIGNED, since it also is used in functions
that return the number of bytes actually read to or written from in
an operation, and these functions can return -1 to signal error.
-
+
Note that the standard Unix read() and write() functions define the
count going in as a size_t, which is UNSIGNED, and the count going
out as an ssize_t, which is SIGNED. This is a horrible design