Update a bit of module em_code.
This commit is contained in:
parent
e54911f642
commit
60330b05cd
@ -22,9 +22,7 @@ static char *C_old_opp;
|
|||||||
#ifndef INCORE
|
#ifndef INCORE
|
||||||
static File *C_old_ofp;
|
static File *C_old_ofp;
|
||||||
|
|
||||||
static int
|
static int getbyte(long b)
|
||||||
getbyte(b)
|
|
||||||
long b;
|
|
||||||
{
|
{
|
||||||
/* Get the byte at offset "b" from the start of the
|
/* Get the byte at offset "b" from the start of the
|
||||||
temporary file, and try to do so in an efficient way.
|
temporary file, and try to do so in an efficient way.
|
||||||
@ -56,12 +54,10 @@ getbyte(b)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static C_out_parts();
|
static void C_out_parts(PartOfPart *pp);
|
||||||
static Part *C_findpart();
|
static Part *C_findpart(int part);
|
||||||
|
|
||||||
static
|
static void outpart(int id)
|
||||||
outpart(id)
|
|
||||||
int id;
|
|
||||||
{
|
{
|
||||||
/* Output part "id", if present.
|
/* Output part "id", if present.
|
||||||
*/
|
*/
|
||||||
@ -73,9 +69,7 @@ outpart(id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void C_out_parts(PartOfPart *pp)
|
||||||
C_out_parts(pp)
|
|
||||||
register PartOfPart *pp;
|
|
||||||
{
|
{
|
||||||
/* Output the list of chunks started by "pp".
|
/* Output the list of chunks started by "pp".
|
||||||
The list is build in reverse order, so this routine is
|
The list is build in reverse order, so this routine is
|
||||||
@ -118,9 +112,7 @@ C_out_parts(pp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Part *
|
static Part *C_findpart(int part)
|
||||||
C_findpart(part)
|
|
||||||
int part;
|
|
||||||
{
|
{
|
||||||
/* Look for part "part" in the table.
|
/* Look for part "part" in the table.
|
||||||
Return 0 if not present,
|
Return 0 if not present,
|
||||||
@ -133,10 +125,7 @@ C_findpart(part)
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern char *strcpy(), *strcat(), *mktemp();
|
static void swttmp()
|
||||||
|
|
||||||
static
|
|
||||||
swttmp()
|
|
||||||
{
|
{
|
||||||
#ifndef INCORE
|
#ifndef INCORE
|
||||||
if (C_tmpfile == 0) {
|
if (C_tmpfile == 0) {
|
||||||
@ -177,8 +166,7 @@ swttmp()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void swtout()
|
||||||
swtout()
|
|
||||||
{
|
{
|
||||||
#ifndef INCORE
|
#ifndef INCORE
|
||||||
if (C_ontmpfile) {
|
if (C_ontmpfile) {
|
||||||
@ -205,9 +193,7 @@ swtout()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int available(int part)
|
||||||
available(part)
|
|
||||||
int part;
|
|
||||||
{
|
{
|
||||||
/* See if part "part", and all the parts it consists of,
|
/* See if part "part", and all the parts it consists of,
|
||||||
are available. Return 1 if they are, 0 otherwize
|
are available. Return 1 if they are, 0 otherwize
|
||||||
@ -240,9 +226,7 @@ available(part)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Part *
|
static Part *mkpart(int part)
|
||||||
mkpart(part)
|
|
||||||
int part;
|
|
||||||
{
|
{
|
||||||
/* Create a Part structure with id "part", and return a
|
/* Create a Part structure with id "part", and return a
|
||||||
pointer to it, after checking that is does not exist
|
pointer to it, after checking that is does not exist
|
||||||
@ -266,9 +250,7 @@ mkpart(part)
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void end_partofpart(Part *p)
|
||||||
end_partofpart(p)
|
|
||||||
register Part *p;
|
|
||||||
{
|
{
|
||||||
/* End the current chunk of part *p.
|
/* End the current chunk of part *p.
|
||||||
*/
|
*/
|
||||||
@ -285,9 +267,7 @@ end_partofpart(p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void resume(Part *p)
|
||||||
resume(p)
|
|
||||||
register Part *p;
|
|
||||||
{
|
{
|
||||||
/* Resume part "p", by creating a new PartOfPart structure
|
/* Resume part "p", by creating a new PartOfPart structure
|
||||||
for it.
|
for it.
|
||||||
@ -302,9 +282,7 @@ resume(p)
|
|||||||
pp->pp_begin = C_current_out - C_BASE;
|
pp->pp_begin = C_current_out - C_BASE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void C_insertpart(int part)
|
||||||
C_insertpart(part)
|
|
||||||
int part;
|
|
||||||
{
|
{
|
||||||
/* Insert part "part" in the current part. If C_sequential is
|
/* Insert part "part" in the current part. If C_sequential is
|
||||||
still set and the part to be inserted is available now,
|
still set and the part to be inserted is available now,
|
||||||
@ -341,9 +319,7 @@ C_insertpart(part)
|
|||||||
resume(p);
|
resume(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void C_beginpart(int part)
|
||||||
C_beginpart(part)
|
|
||||||
int part;
|
|
||||||
{
|
{
|
||||||
/* Now follows the definition for part "part".
|
/* Now follows the definition for part "part".
|
||||||
Suspend the current part, and add part "part" to the
|
Suspend the current part, and add part "part" to the
|
||||||
@ -361,9 +337,7 @@ C_beginpart(part)
|
|||||||
resume(p);
|
resume(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void C_endpart(int part)
|
||||||
C_endpart(part)
|
|
||||||
int part;
|
|
||||||
{
|
{
|
||||||
/* End the current part. The parameter "part" is just there
|
/* End the current part. The parameter "part" is just there
|
||||||
for the checking. Do we really need it ???
|
for the checking. Do we really need it ???
|
||||||
|
|||||||
@ -54,7 +54,7 @@ extern long
|
|||||||
extern char *C_opp;
|
extern char *C_opp;
|
||||||
#define C_BASE 0
|
#define C_BASE 0
|
||||||
#endif
|
#endif
|
||||||
extern int (*C_outpart)(), (*C_swtout)(), (*C_swttmp)();
|
extern void (*C_outpart)(int), (*C_swtout)(void), (*C_swttmp)(void);
|
||||||
|
|
||||||
extern File *C_ofp;
|
extern File *C_ofp;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user