Main Page | Class List | Directories | File List | Class Members | File Members

cpp_scan.c File Reference

CKPM C pre-processor. More...

#include <unistd.h>
#include "cpp_token.h"
#include "cpp_scan.h"

Functions

int isDigit (char ch)
 check if a given character is a digit
int isOctDigit (char ch)
 check if a given character is a octal digit
int isHexDigit (char ch)
 check if a given character is a hex digit
int isLetter (char ch)
 check if a given character is a letter
int isSpace (char ch)
 check if a given character is a white space
int read_byte (int fd, char *c)
 read one byte
void GetSymNoSpace (int fd, struct _token *t)
 get next symbol that is no white space
void GetSym (int fd, struct _token *t)
 get next symbol
int CopyTillNewline (int fd_in, int fd_out)
 read characters from an input files and copy them to an output file until '
' occurs.
char * sym_to_string (int sym)
 convert symbols to the corresponding text


Detailed Description

CKPM C pre-processor.


Function Documentation

int CopyTillNewline int  fd_in,
int  fd_out
 

read characters from an input files and copy them to an output file until '
' occurs.

Parameters:
fd_in file descriptor index of the input file
fd_out file descriptor index of the output file
Returns:
status code of read(2) and write(2), respectively.

void GetSym int  fd,
struct _token t
 

get next symbol

Parameters:
fd file descriptor index of the input file
t contains a complete token

void GetSymNoSpace int  fd,
struct _token t
 

get next symbol that is no white space

Parameters:
fd file descriptor index of the input file
t contains a complete token

int isDigit char  ch  ) 
 

check if a given character is a digit

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a digit, otherwise 0

int isHexDigit char  ch  ) 
 

check if a given character is a hex digit

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a hex digit, otherwise 0

int isLetter char  ch  ) 
 

check if a given character is a letter

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a letter, otherwise 0

int isOctDigit char  ch  ) 
 

check if a given character is a octal digit

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a digit, otherwise 0

int isSpace char  ch  ) 
 

check if a given character is a white space

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a white space, otherwise 0

int read_byte int  fd,
char *  c
 

read one byte

Parameters:
fd file descriptor index of the input file
c the output variable containing the byte
Returns:
status on from file read

char* sym_to_string int  sym  ) 
 

convert symbols to the corresponding text

Parameters:
sym the symbol
Returns:
the symbol as a string


Generated on Thu Jul 13 03:56:37 2006 for CKPMcc by  doxygen 1.4.4