sxppp.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include <ctype.h>
#include <stdarg.h>
Include dependency graph for sxppp.c:

Go to the source code of this file.

Data Structures

struct  saved_info
struct  string_info

Defines

#define SXPP_STRING_INFO   struct string_info
#define SXPP_SAVED_INFO   struct saved_info
#define toupper(c)   ((c)-'a'+'A')
#define tolower(c)   ((c)-'A'+'a')
#define DFLT_TABS_INTERVAL   SXTAB_INTERVAL
#define SKIPs   1
#define PAGEs   2
#define SPACEs   3
#define TABs   4
#define MARGIN   5
#define CALL   6
#define COL   7
#define RETURN   8
#define SPACE   ' '
#define HORIZONTAL_TAB   '\t'
#define NEW_LINE   '\n'
#define FORM_FEED   '\f'
#define BACKSPACE   '\b'
#define NEW_LINE_BYTES   1
#define sortie_1_car(c)   ((dispo_sortie--==0) ? (vider_sortie_puis_1_car(c),1) : ((*sortie++ = (c)),1))
#define NEEDED_CHARS(l)   (6 * l + 2)
#define ID_LENGTH   33
#define impr_key_word(kw)   (kw_manager (kw), impr ())
#define impr_token(ste, la)   (string_manager (ste, la), impr ())

Functions

static SXVOID vider_sortie (SXBOOLEAN continuer)
static SXVOID vider_sortie_puis_1_car (char c)
static SXVOID sortie_n_car (char *s, long l)
static SXVOID ppabort (char *format,...)
static SXVOID string_modify (char *string, long strl, SXCASE its_case, SXBOOLEAN must_darken)
static SXVOID string_manager (SXINT ste, SXINT lahead)
static SXVOID kw_manager (SXINT lahead)
static SXVOID call_put_error (void)
static SXVOID go_to_column (void)
static SXVOID cadrage (long taille)
static SXVOID impr_commentaire (char *ch_ptr)
static SXVOID impr (void)
static SXVOID paragrapheur (struct sxnode_pp *root_ptr)
static SXVOID sxppopen (struct sxtables *sxtables)
static SXVOID sxppclose (void)
SXVOID sxppp (SXINT sxppp_what, struct sxtables *sxtables)

Variables

char WHAT_SXPPP [] = "@(#)SYNTAX - $Id: sxppp.c 1510 2008-08-20 12:43:27Z sagot $" WHAT_DEBUG
static char ME [] = "paragrapher"
static char verbose_format [] = "\b\b\b\b\b\b\b%7d"
static SXINT save_stack_index
static SXINT column
static SXINT current_column
static SXBOOLEAN this_is_a_new_line
static charsortie
static charbase_sortie
static long dispo_sortie
static long taille_sortie

Define Documentation

#define BACKSPACE   '\b'

Definition at line 77 of file sxppp.c.

Referenced by string_modify().

#define CALL   6

Definition at line 68 of file sxppp.c.

Referenced by paragrapheur().

#define COL   7

Definition at line 69 of file sxppp.c.

Referenced by paragrapheur().

#define DFLT_TABS_INTERVAL   SXTAB_INTERVAL

Definition at line 60 of file sxppp.c.

Referenced by sxppopen().

#define FORM_FEED   '\f'

Definition at line 76 of file sxppp.c.

Referenced by impr_commentaire(), and paragrapheur().

#define HORIZONTAL_TAB   '\t'

Definition at line 74 of file sxppp.c.

Referenced by go_to_column(), and impr_commentaire().

#define ID_LENGTH   33

Referenced by string_modify().

#define impr_key_word ( kw   )     (kw_manager (kw), impr ())

Definition at line 766 of file sxppp.c.

Referenced by paragrapheur().

#define impr_token ( ste,
la   )     (string_manager (ste, la), impr ())

Definition at line 767 of file sxppp.c.

Referenced by paragrapheur().

#define MARGIN   5

Definition at line 67 of file sxppp.c.

Referenced by paragrapheur().

#define NEEDED_CHARS (  )     (6 * l + 2)

Referenced by string_modify().

#define NEW_LINE   '\n'

Definition at line 75 of file sxppp.c.

Referenced by go_to_column(), impr_commentaire(), kw_manager(), paragrapheur(), and string_manager().

#define NEW_LINE_BYTES   1

Definition at line 84 of file sxppp.c.

Referenced by go_to_column(), and impr_commentaire().

#define PAGEs   2

Definition at line 64 of file sxppp.c.

Referenced by paragrapheur().

#define RETURN   8

Definition at line 70 of file sxppp.c.

Referenced by paragrapheur().

#define SKIPs   1

Definition at line 63 of file sxppp.c.

Referenced by paragrapheur().

#define sortie_1_car (  )     ((dispo_sortie--==0) ? (vider_sortie_puis_1_car(c),1) : ((*sortie++ = (c)),1))

Definition at line 135 of file sxppp.c.

Referenced by go_to_column(), impr_commentaire(), and paragrapheur().

#define SPACE   ' '

Definition at line 73 of file sxppp.c.

Referenced by get_best(), go_to_column(), and impr_commentaire().

#define SPACEs   3

Definition at line 65 of file sxppp.c.

Referenced by paragrapheur().

#define SXPP_SAVED_INFO   struct saved_info

Definition at line 31 of file sxppp.c.

#define SXPP_STRING_INFO   struct string_info

Definition at line 30 of file sxppp.c.

#define TABs   4

Definition at line 66 of file sxppp.c.

Referenced by paragrapheur().

#define tolower (  )     ((c)-'A'+'a')

Definition at line 56 of file sxppp.c.

#define toupper (  )     ((c)-'a'+'A')

Definition at line 53 of file sxppp.c.


Function Documentation

static SXVOID cadrage ( long  taille  )  [static]

Definition at line 533 of file sxppp.c.

References column.

Referenced by impr_commentaire().

static SXVOID call_put_error ( void   )  [static]

Definition at line 446 of file sxppp.c.

References column, save_stack_index, sxerror(), and SXTRUE.

static SXVOID go_to_column ( void   )  [static]
static SXVOID impr ( void   )  [static]
static SXVOID impr_commentaire ( char ch_ptr  )  [static]
static SXVOID kw_manager ( SXINT  lahead  )  [static]

Definition at line 369 of file sxppp.c.

References NEW_LINE, string_modify(), SXBOOLEAN, and sxstrsave().

static SXVOID paragrapheur ( struct sxnode_pp *  root_ptr  )  [static]
static SXVOID ppabort ( char format,
  ... 
) [static]

Definition at line 176 of file sxppp.c.

References args.

Referenced by paragrapheur().

static SXVOID sortie_n_car ( char s,
long  l 
) [static]

Definition at line 138 of file sxppp.c.

References dispo_sortie, sortie, SXTRUE, and vider_sortie().

Referenced by impr(), and impr_commentaire().

static SXVOID string_manager ( SXINT  ste,
SXINT  lahead 
) [static]

Definition at line 286 of file sxppp.c.

References NEW_LINE, string_modify(), and SXBOOLEAN.

static SXVOID string_modify ( char string,
long  strl,
SXCASE  its_case,
SXBOOLEAN  must_darken 
) [static]

Definition at line 199 of file sxppp.c.

References BACKSPACE, ID_LENGTH, ME, NEEDED_CHARS, sxstrsave(), and sxtrap().

Referenced by kw_manager(), and string_manager().

static SXVOID sxppclose ( void   )  [static]

Definition at line 1123 of file sxppp.c.

Referenced by sxppp().

static SXVOID sxppopen ( struct sxtables sxtables  )  [static]

Definition at line 1075 of file sxppp.c.

References DFLT_TABS_INTERVAL, string_info::lahead, ME, and sxhmsg().

Referenced by sxppp().

SXVOID sxppp ( SXINT  sxppp_what,
struct sxtables sxtables 
)
static SXVOID vider_sortie ( SXBOOLEAN  continuer  )  [static]

Definition at line 108 of file sxppp.c.

References base_sortie, dispo_sortie, sortie, sxstdout, and taille_sortie.

Referenced by paragrapheur(), sortie_n_car(), and vider_sortie_puis_1_car().

static SXVOID vider_sortie_puis_1_car ( char  c  )  [static]

Definition at line 123 of file sxppp.c.

References dispo_sortie, sortie, SXTRUE, and vider_sortie().


Variable Documentation

char * base_sortie [static]

Definition at line 103 of file sxppp.c.

Referenced by paragrapheur(), and vider_sortie().

SXINT column [static]

Definition at line 97 of file sxppp.c.

Referenced by cadrage(), call_put_error(), go_to_column(), impr(), impr_commentaire(), and paragrapheur().

SXINT current_column [static]

Definition at line 98 of file sxppp.c.

Referenced by go_to_column(), impr(), impr_commentaire(), and paragrapheur().

long dispo_sortie [static]

Definition at line 104 of file sxppp.c.

Referenced by paragrapheur(), sortie_n_car(), vider_sortie(), and vider_sortie_puis_1_car().

char ME[] = "paragrapher" [static]

Definition at line 46 of file sxppp.c.

Referenced by paragrapheur(), string_modify(), sxppopen(), and sxppp().

SXINT save_stack_index [static]

Definition at line 96 of file sxppp.c.

Referenced by call_put_error(), and paragrapheur().

char* sortie [static]

Definition at line 103 of file sxppp.c.

Referenced by paragrapheur(), sortie_n_car(), vider_sortie(), and vider_sortie_puis_1_car().

long taille_sortie [static]

Definition at line 104 of file sxppp.c.

Referenced by paragrapheur(), and vider_sortie().

SXBOOLEAN this_is_a_new_line [static]

Definition at line 99 of file sxppp.c.

Referenced by go_to_column(), impr(), impr_commentaire(), and paragrapheur().

char verbose_format[] = "\b\b\b\b\b\b\b%7d" [static]

Definition at line 47 of file sxppp.c.

Referenced by go_to_column(), and paragrapheur().

char WHAT_SXPPP[] = "@(#)SYNTAX - $Id: sxppp.c 1510 2008-08-20 12:43:27Z sagot $" WHAT_DEBUG

Definition at line 36 of file sxppp.c.


Generated on Wed Apr 21 16:39:38 2010 for syntax-6.0b7 by  doxygen 1.6.1