Back to index

tetex-bin  3.0
Classes | Defines | Functions
str-list.h File Reference
#include <kpathsea/c-proto.h>
#include <kpathsea/types.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  str_list_type

Defines

#define STR_LIST_LENGTH(l)   ((l).length)
#define STR_LIST(l)   ((l).list)
#define STR_LIST_ELT(l, n)   STR_LIST (l)[n]
#define STR_LIST_LAST_ELT(l)   STR_LIST_ELT (l, STR_LIST_LENGTH (l) - 1)

Functions

str_list_type str_list_init P1H (void)
void str_list_add P2H (str_list_type *l, string s)
void str_list_concat P2H (str_list_type *target, str_list_type more)
void str_list_free P1H (str_list_type *l)

Class Documentation

struct str_list_type

Definition at line 28 of file str-list.h.

Class Members
unsigned length
string * list

Define Documentation

#define STR_LIST (   l)    ((l).list)

Definition at line 35 of file str-list.h.

#define STR_LIST_ELT (   l,
  n 
)    STR_LIST (l)[n]

Definition at line 36 of file str-list.h.

#define STR_LIST_LAST_ELT (   l)    STR_LIST_ELT (l, STR_LIST_LENGTH (l) - 1)

Definition at line 37 of file str-list.h.

#define STR_LIST_LENGTH (   l)    ((l).length)

Definition at line 34 of file str-list.h.


Function Documentation

str_list_type str_list_init P1H ( void  ) [read]

Definition at line 260 of file afm2tfm.c.

                  {
   register char *p ;
   register int c ;

   param = buffer ;
   for (p=buffer; (c=getc(afmin)) != EOF;) {
      if (p - buffer >= INBUFSIZE)
         error("! input line too long; perhaps input file is malformed?") ;
      *p++ = c ;
      if (c == '\r') {
         c = getc(afmin) ;
         if (c != EOF) {
            if (c == '\n') {
               *p++ = c ;
            } else {
               ungetc(c, afmin) ;
            }
         }
         break ;
      } else if (c == '\n') {
         break ;
      }
   }
   *p = 0 ;
   (void)strcpy(obuffer, buffer) ;
   if (p == buffer && c == EOF)
      return(0) ;
   else
      return(1) ;
}
void str_list_free P1H ( str_list_type l)
void str_list_add P2H ( str_list_type l,
string  s 
)
void str_list_concat_elements P2H ( str_list_type target,
str_list_type  more 
)