Back to index

tetex-bin  3.0
Classes | Defines | Typedefs | Functions | Variables
mkind.h File Reference
#include "c-auto.h"
#include <stdio.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  KFIELD
struct  KNODE

Defines

#define STDC   (__STDC__ || __cplusplus)
#define SHORTNAMES   0
#define STDC_PROTOTYPES   STDC
#define strchr   index /* convert STDC form to old K&R form */
#define strrchr   rindex /* convert STDC form to old K&R form */
#define EXIT   exit
#define TRUE   1
#define FALSE   0
#define NUL   '\0'
#define NIL   ""
#define TAB   '\t'
#define LFD   '\n'
#define SPC   ' '
#define LSQ   '['
#define RSQ   ']'
#define BSH   '\\'
#define ENV_SEPAR   ':'
#define DIR_DELIM   '/'
#define IS_DIR_DELIM(c)   ((c) == DIR_DELIM)
#define SW_PREFIX   '-'
#define EXT_DELIM   '.'
#define ROMAN_SIGN   '*'
#define EVEN   "even"
#define ODD   "odd"
#define ANY   "any"
#define GET_CHAR   getc
#define TOASCII(i)   (char)((i) + 48)
#define TOLOWER(C)
#define TOUPPER(C)
#define STREQ(A, B)   (strcmp(A, B) == 0)
#define STRNEQ(A, B)   (strcmp(A, B) != 0)
#define MESSAGE(F, S)
#define FATAL(F, S)
#define FATAL2(F, D1, D2)
#define OPEN_IN(FP)   fopen(FP, "r")
#define OPEN_OUT(FP)   fopen(FP, "w")
#define CLOSE(FP)   fclose(FP)
#define ISDIGIT(C)   ('0' <= C && C <= '9')
#define ISSYMBOL(C)
#define ARABIC_MAX   10 /* maximum digits in an Arabic page */
#define ARGUMENT_MAX   1024 /* maximum length of sort or actual key */
#define ARRAY_MAX   1024 /* maximum length of constant values in */
#define FIELD_MAX   3 /* maximum levels of index entries (item, */
#define LINE_MAX   72 /* maximum output line length (longer */
#define NUMBER_MAX   16 /* maximum digits in a Roman or Arabic */
#define PAGEFIELD_MAX   10 /* maximum fields in a composite page */
#define PAGETYPE_MAX   5 /* fixed at 5; see use in scanst.c */
#define ROMAN_MAX   16 /* maximum length of Roman page number */
#define STRING_MAX   256 /* maximum length of host filename */
#define VERSION   "version 2.14 [02-Oct-2002] (with Thai support)"
#define PUT_VERSION
#define USAGE   "Usage: %s [-ilqrcg] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...]\n"
#define STYLE_PATH   "INDEXSTYLE" /* environment variable defining search */
#define INDEX_IDX   ".idx"
#define INDEX_ILG   ".ilg"
#define INDEX_IND   ".ind"
#define INDEX_STY   ".mst"
#define INDEX_LOG   ".log"
#define EMPTY   -9999
#define ROML   0
#define ROMU   1
#define ARAB   2
#define ALPL   3
#define ALPU   4
#define DUPLICATE   9999
#define SYMBOL   -1
#define ALPHA   -2
#define GERMAN   0
#define DOT   "."
#define DOT_MAX   1000
#define CMP_MAX   1500
#define IDX_DOT(MAX)
#define ALL_DONE
#define DONE(A, B, C, D)
#define ARGS(arg_list)   ()
#define const
#define VOIDP   char*
#define VOID_ARG
#define R_OK   4 /* only symbol from sys/file.h */

Typedefs

typedef struct KFIELD FIELD
typedef struct KFIELDFIELD_PTR
typedef struct KNODE NODE
typedef struct KNODENODE_PTR

Functions

void gen_ind ARGS ((void))
int group_type ARGS ((char *str))
int main ARGS ((int argc, char **argv))
void qqsort ARGS ((char *base, int n, int size, int(*compar) ARGS((char *, char *))))
int access ARGS ((const char *, int))
char *getenv ARGS ((const char *name))
char *strchr ARGS ((const char *s, int c))
VOIDP calloc ARGS ((size_t nitems, size_t size))
VOIDP malloc ARGS ((size_t size))

Variables

int letter_ordering
int compress_blanks
int init_page
int merge_page
int even_odd
int verbose
int german_sort
int thai_sort
int locale_sort
char idx_keyword [ARRAY_MAX]
char idx_aopen
char idx_aclose
char idx_level
char idx_ropen
char idx_rclose
char idx_quote
char idx_actual
char idx_encap
char idx_escape
char page_comp [ARRAY_MAX]
int page_offset [PAGETYPE_MAX]
char preamble [ARRAY_MAX]
char postamble [ARRAY_MAX]
char setpage_open [ARRAY_MAX]
char setpage_close [ARRAY_MAX]
char group_skip [ARRAY_MAX]
int headings_flag
char heading_pre [ARRAY_MAX]
char heading_suf [ARRAY_MAX]
char symhead_pos [ARRAY_MAX]
char symhead_neg [ARRAY_MAX]
char numhead_pos [ARRAY_MAX]
char numhead_neg [ARRAY_MAX]
int prelen
int postlen
int skiplen
int headprelen
int headsuflen
int setpagelen
char item_r [FIELD_MAX][ARRAY_MAX]
char item_u [FIELD_MAX][ARRAY_MAX]
char item_x [FIELD_MAX][ARRAY_MAX]
int ilen_r [FIELD_MAX]
int ilen_u [FIELD_MAX]
int ilen_x [FIELD_MAX]
char delim_p [FIELD_MAX][ARRAY_MAX]
char delim_n [ARRAY_MAX]
char delim_r [ARRAY_MAX]
char delim_t [ARRAY_MAX]
char suffix_2p [ARRAY_MAX]
char suffix_3p [ARRAY_MAX]
char suffix_mp [ARRAY_MAX]
char encap_p [ARRAY_MAX]
char encap_i [ARRAY_MAX]
char encap_s [ARRAY_MAX]
int linemax
char indent_space [ARRAY_MAX]
int indent_length
FILEidx_fp
FILEsty_fp
FILEind_fp
FILEilg_fp
char * idx_fn
char * pgm_fn
char * ind_fn
char * ilg_fn
char sty_fn []
char ind []
char ilg []
char pageno []
FIELD_PTRidx_key
NODE_PTR head
NODE_PTR tail
int idx_dot
int idx_tt
int idx_gt
int idx_et
int idx_dc

Class Documentation

struct KFIELD

Definition at line 386 of file mkind.h.

Class Members
char * af
short count
char * encap
char * fn
int group
int lc
char lpg
int npg
char * sf
short type
struct KNODE

Definition at line 400 of file mkind.h.

Collaboration diagram for KNODE:
Class Members
FIELD data
struct KNODE * next

Define Documentation

#define ALL_DONE
Value:
{ \
    if (fn_no > 0) { \
       if (verbose) \
fprintf(stderr, \
       "Overall %d files read (%d entries accepted, %d rejected).\n", \
       fn_no+1, idx_gt, idx_et); \
fprintf(ilg_fp, \
       "Overall %d files read (%d entries accepted, %d rejected).\n", \
       fn_no+1, idx_gt, idx_et); \
    } \
}

Definition at line 520 of file mkind.h.

#define ALPHA   -2

Definition at line 382 of file mkind.h.

#define ALPL   3

Definition at line 377 of file mkind.h.

#define ALPU   4

Definition at line 378 of file mkind.h.

#define ANY   "any"

Definition at line 235 of file mkind.h.

#define ARAB   2

Definition at line 376 of file mkind.h.

#define ARABIC_MAX   10 /* maximum digits in an Arabic page */

Definition at line 307 of file mkind.h.

#define ARGS (   arg_list)    ()

Definition at line 543 of file mkind.h.

#define ARGUMENT_MAX   1024 /* maximum length of sort or actual key */

Definition at line 310 of file mkind.h.

#define ARRAY_MAX   1024 /* maximum length of constant values in */

Definition at line 313 of file mkind.h.

#define BSH   '\\'

Definition at line 214 of file mkind.h.

#define CLOSE (   FP)    fclose(FP)

Definition at line 284 of file mkind.h.

#define CMP_MAX   1500

Definition at line 507 of file mkind.h.

#define const

Definition at line 544 of file mkind.h.

#define DIR_DELIM   '/'

Definition at line 223 of file mkind.h.

#define DONE (   A,
  B,
  C,
 
)
Value:
{ \
    if (verbose) \
       fprintf(stderr, "done (%d %s, %d %s).\n", (A), B, C, D); \
    fprintf(ilg_fp, "done (%d %s, %d %s).\n", (A), B, C, D); \
}

Definition at line 532 of file mkind.h.

#define DOT   "."

Definition at line 505 of file mkind.h.

#define DOT_MAX   1000

Definition at line 506 of file mkind.h.

#define DUPLICATE   9999

Definition at line 379 of file mkind.h.

#define EMPTY   -9999

Definition at line 373 of file mkind.h.

#define ENV_SEPAR   ':'

Definition at line 222 of file mkind.h.

#define EVEN   "even"

Definition at line 233 of file mkind.h.

#define EXIT   exit

Definition at line 195 of file mkind.h.

#define EXT_DELIM   '.'

Definition at line 231 of file mkind.h.

#define FALSE   0

Definition at line 201 of file mkind.h.

#define FATAL (   F,
 
)
Value:
{ \
    fprintf(stderr, F, S); \
    fprintf(stderr, USAGE, pgm_fn); \
    EXIT(1); \
}

Definition at line 266 of file mkind.h.

#define FATAL2 (   F,
  D1,
  D2 
)
Value:
{ \
    fprintf(stderr, F, D1, D2); \
    fprintf(stderr, USAGE, pgm_fn); \
    EXIT(1); \
}

Definition at line 276 of file mkind.h.

#define FIELD_MAX   3 /* maximum levels of index entries (item, */

Definition at line 316 of file mkind.h.

#define GERMAN   0

Definition at line 384 of file mkind.h.

#define GET_CHAR   getc

Definition at line 237 of file mkind.h.

#define IDX_DOT (   MAX)
Value:
{ \
    idx_dot = TRUE; \
    if (idx_dc++ == 0) { \
       if (verbose) \
           fprintf(stderr, DOT); \
       fprintf(ilg_fp, DOT); \
    } \
    if (idx_dc == MAX) \
       idx_dc = 0; \
}

Definition at line 509 of file mkind.h.

#define INDEX_IDX   ".idx"

Definition at line 366 of file mkind.h.

#define INDEX_ILG   ".ilg"

Definition at line 367 of file mkind.h.

#define INDEX_IND   ".ind"

Definition at line 368 of file mkind.h.

#define INDEX_LOG   ".log"

Definition at line 371 of file mkind.h.

#define INDEX_STY   ".mst"

Definition at line 369 of file mkind.h.

#define IS_DIR_DELIM (   c)    ((c) == DIR_DELIM)

Definition at line 224 of file mkind.h.

#define ISDIGIT (   C)    ('0' <= C && C <= '9')

Definition at line 286 of file mkind.h.

#define ISSYMBOL (   C)
Value:
(('!' <= C && C <= '@') || \
                   ('[' <= C && C <= '`') || \
                   ('{' <= C && C <= '~'))

Definition at line 287 of file mkind.h.

#define LFD   '\n'

Definition at line 210 of file mkind.h.

#define LINE_MAX   72 /* maximum output line length (longer */

Definition at line 325 of file mkind.h.

#define LSQ   '['

Definition at line 212 of file mkind.h.

#define MESSAGE (   F,
 
)
Value:
{ \
    if (verbose) \
       fprintf(stderr, F, S); \
    fprintf(ilg_fp, F, S); \
}

Definition at line 256 of file mkind.h.

#define NIL   ""

Definition at line 207 of file mkind.h.

#define NUL   '\0'

Definition at line 204 of file mkind.h.

#define NUMBER_MAX   16 /* maximum digits in a Roman or Arabic */

Definition at line 328 of file mkind.h.

#define ODD   "odd"

Definition at line 234 of file mkind.h.

#define OPEN_IN (   FP)    fopen(FP, "r")

Definition at line 282 of file mkind.h.

#define OPEN_OUT (   FP)    fopen(FP, "w")

Definition at line 283 of file mkind.h.

#define PAGEFIELD_MAX   10 /* maximum fields in a composite page */

Definition at line 332 of file mkind.h.

#define PAGETYPE_MAX   5 /* fixed at 5; see use in scanst.c */

Definition at line 335 of file mkind.h.

#define PUT_VERSION
Value:
{ \
    MESSAGE("This is %s, ", pgm_fn); \
    MESSAGE("%s.\n", VERSION); \
    need_version = FALSE; \
}

Definition at line 350 of file mkind.h.

#define R_OK   4 /* only symbol from sys/file.h */

Definition at line 585 of file mkind.h.

#define ROMAN_MAX   16 /* maximum length of Roman page number */

Definition at line 337 of file mkind.h.

#define ROMAN_SIGN   '*'

Definition at line 232 of file mkind.h.

#define ROML   0

Definition at line 374 of file mkind.h.

#define ROMU   1

Definition at line 375 of file mkind.h.

#define RSQ   ']'

Definition at line 213 of file mkind.h.

#define SHORTNAMES   0

Definition at line 86 of file mkind.h.

#define SPC   ' '

Definition at line 211 of file mkind.h.

#define STDC   (__STDC__ || __cplusplus)

Definition at line 78 of file mkind.h.

#define STDC_PROTOTYPES   STDC

Definition at line 87 of file mkind.h.

#define strchr   index /* convert STDC form to old K&R form */

Definition at line 117 of file mkind.h.

#define STREQ (   A,
  B 
)    (strcmp(A, B) == 0)

Definition at line 253 of file mkind.h.

#define STRING_MAX   256 /* maximum length of host filename */

Definition at line 340 of file mkind.h.

#define STRNEQ (   A,
  B 
)    (strcmp(A, B) != 0)

Definition at line 254 of file mkind.h.

#define strrchr   rindex /* convert STDC form to old K&R form */

Definition at line 121 of file mkind.h.

#define STYLE_PATH   "INDEXSTYLE" /* environment variable defining search */

Definition at line 364 of file mkind.h.

#define SW_PREFIX   '-'

Definition at line 228 of file mkind.h.

#define SYMBOL   -1

Definition at line 381 of file mkind.h.

#define TAB   '\t'

Definition at line 209 of file mkind.h.

#define TOASCII (   i)    (char)((i) + 48)

Definition at line 239 of file mkind.h.

#define TOLOWER (   C)
Value:
(isupper((unsigned char)(C)) ? \
       (unsigned char)tolower((unsigned char)(C)) : (unsigned char)(C))

Definition at line 243 of file mkind.h.

#define TOUPPER (   C)
Value:
(isupper((unsigned char)(C)) ? \
       (unsigned char)(C) : (unsigned char)toupper((unsigned char)(C)))

Definition at line 245 of file mkind.h.

#define TRUE   1

Definition at line 198 of file mkind.h.

#define USAGE   "Usage: %s [-ilqrcg] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...]\n"

Definition at line 360 of file mkind.h.

#define VERSION   "version 2.14 [02-Oct-2002] (with Thai support)"

Definition at line 347 of file mkind.h.

#define VOID_ARG

Definition at line 546 of file mkind.h.

#define VOIDP   char*

Definition at line 545 of file mkind.h.


Typedef Documentation

typedef struct KFIELD FIELD
typedef struct KFIELD * FIELD_PTR
typedef struct KNODE NODE
typedef struct KNODE * NODE_PTR

Function Documentation

static int process_precedence ARGS ( (void )
static int scan_string ARGS ( (char *str)  )
int main ARGS ( (int argc, char **argv )
void qqsort ARGS ( (char *base, int n, int size, int(*compar) ARGS((char *, char *)))  )
int access ARGS ( (const char *, int )
char* getenv ARGS ( (const char *name )
char *strrchr ARGS ( (const char *s, int c )
VOIDP calloc ARGS ( (size_t nitems, size_t size )

Variable Documentation

Definition at line 33 of file mkind.c.

Definition at line 79 of file scanst.c.

Definition at line 78 of file scanst.c.

Definition at line 80 of file scanst.c.

Definition at line 81 of file scanst.c.

Definition at line 88 of file scanst.c.

Definition at line 87 of file scanst.c.

Definition at line 89 of file scanst.c.

Definition at line 36 of file mkind.c.

Definition at line 38 of file mkind.c.

Definition at line 55 of file scanst.c.

Definition at line 46 of file scanid.c.

Definition at line 59 of file scanst.c.

Definition at line 60 of file scanst.c.

Definition at line 58 of file scanst.c.

Definition at line 61 of file scanst.c.

Definition at line 62 of file scanst.c.

char idx_aclose

Definition at line 37 of file scanst.c.

char idx_actual

Definition at line 42 of file scanst.c.

char idx_aopen

Definition at line 36 of file scanst.c.

Definition at line 36 of file scanid.c.

Definition at line 42 of file mkind.c.

char idx_encap

Definition at line 43 of file scanst.c.

char idx_escape

Definition at line 44 of file scanst.c.

Definition at line 45 of file mkind.c.

char* idx_fn

Definition at line 57 of file mkind.c.

Definition at line 51 of file mkind.c.

Definition at line 46 of file mkind.c.

Definition at line 48 of file mkind.c.

Definition at line 35 of file scanst.c.

char idx_level

Definition at line 38 of file scanst.c.

char idx_quote

Definition at line 41 of file scanst.c.

char idx_rclose

Definition at line 40 of file scanst.c.

char idx_ropen

Definition at line 39 of file scanst.c.

Definition at line 44 of file mkind.c.

Definition at line 74 of file scanst.c.

Definition at line 75 of file scanst.c.

Definition at line 76 of file scanst.c.

char ilg[]

Definition at line 60 of file mkind.c.

char* ilg_fn

Definition at line 61 of file mkind.c.

Definition at line 53 of file mkind.c.

char ind[]

Definition at line 58 of file mkind.c.

char* ind_fn

Definition at line 59 of file mkind.c.

Definition at line 52 of file mkind.c.

Definition at line 93 of file scanst.c.

Definition at line 94 of file scanst.c.

Definition at line 35 of file mkind.c.

Definition at line 70 of file scanst.c.

Definition at line 71 of file scanst.c.

Definition at line 72 of file scanst.c.

Definition at line 32 of file mkind.c.

Definition at line 91 of file scanst.c.

Definition at line 40 of file mkind.c.

Definition at line 34 of file mkind.c.

Definition at line 68 of file scanst.c.

Definition at line 67 of file scanst.c.

Definition at line 96 of file scanst.c.

Definition at line 97 of file scanst.c.

char pageno[]

Definition at line 62 of file mkind.c.

char* pgm_fn

Definition at line 55 of file mkind.c.

Definition at line 47 of file scanst.c.

Definition at line 49 of file scanst.c.

Definition at line 46 of file scanst.c.

Definition at line 48 of file scanst.c.

Definition at line 52 of file scanst.c.

Definition at line 51 of file scanst.c.

Definition at line 53 of file scanst.c.

Definition at line 56 of file scanst.c.

char sty_fn[]

Definition at line 56 of file mkind.c.

Definition at line 50 of file mkind.c.

Definition at line 83 of file scanst.c.

Definition at line 84 of file scanst.c.

Definition at line 85 of file scanst.c.

Definition at line 65 of file scanst.c.

Definition at line 64 of file scanst.c.

Definition at line 47 of file scanid.c.

Definition at line 39 of file mkind.c.

Definition at line 37 of file mkind.c.