Back to index

tetex-bin  3.0
Defines | Functions
texfiles.c File Reference
#include <stdio.h>
#include "texfiles.h"

Go to the source code of this file.

Defines

#define one(fp)   ((unsigned char) getc(fp))

Functions

unsigned long num (FILE *fp, int size)
integer snum (FILE *fp, int size)

Define Documentation

#define one (   fp)    ((unsigned char) getc(fp))

Definition at line 11 of file texfiles.c.


Function Documentation

unsigned long num ( FILE fp,
int  size 
)

Definition at line 13 of file texfiles.c.

{  unsigned long x = 0;

   while (size--) x = (x << 8) | one(fp);
   return x;
}
integer snum ( FILE fp,
int  size 
)

Definition at line 20 of file texfiles.c.

{  integer x;

   x = getc(fp);
   while (--size) x = (x << 8) | one(fp);
   return x;
}