2 * LEVEE, or Captain Video; A vi clone
4 * Copyright (c) 1982-1997 David L Parsons
7 * Redistribution and use in source and binary forms are permitted
8 * provided that the above copyright notice and this paragraph are
9 * duplicated in all such forms and that any documentation,
10 * advertising materials, and other materials related to such
11 * distribution and use acknowledge that the software was developed
12 * by David L Parsons (orc@pell.chi.il.us). My name may not be used
13 * to endorse or promote products derived from this software without
14 * specific prior written permission. THIS SOFTWARE IS PROVIDED
15 * AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
16 * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
17 * FITNESS FOR A PARTICULAR PURPOSE.
22 /* read in a file -- return TRUE -- read file
27 addfile(f
, start
, endd
, size
)
34 chunk
= read(fileno(f
), core
+start
, (endd
-start
)-1);
37 return chunk
< (endd
-start
)-1;
41 /* write out a file -- return TRUE if ok. */
44 putfile(f
, start
, endd
)
48 write(fileno(f
), core
+start
, endd
-start
);