Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
unifdef.c File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  ops
 
struct  ops::op
 

Macros

#define MAXDEPTH   64 /* maximum #if nesting */
 
#define MAXLINE   4096 /* maximum length of line */
 
#define MAXSYMS   4096 /* maximum number of symbols */
 
#define EDITSLOP   10
 
#define TEMPLATE   "unifdef.XXXXXX"
 
#define endsym(c)   (!isalnum((unsigned char)c) && c != '_')
 

Typedefs

typedef void state_fn (void)
 
typedef Linetype eval_fn (const struct ops *, int *, const char **)
 

Enumerations

enum  Linetype {
  LT_TRUEI, LT_FALSEI, LT_IF, LT_TRUE,
  LT_FALSE, LT_ELIF, LT_ELTRUE, LT_ELFALSE,
  LT_ELSE, LT_ENDIF, LT_DODGY, LT_DODGY_LAST = LT_DODGY + LT_ENDIF,
  LT_PLAIN, LT_EOF, LT_ERROR, LT_COUNT
}
 
enum  Ifstate {
  IS_OUTSIDE, IS_FALSE_PREFIX, IS_TRUE_PREFIX, IS_PASS_MIDDLE,
  IS_FALSE_MIDDLE, IS_TRUE_MIDDLE, IS_PASS_ELSE, IS_FALSE_ELSE,
  IS_TRUE_ELSE, IS_FALSE_TRAILER, IS_COUNT
}
 
enum  Comment_state {
  NO_COMMENT = false, C_COMMENT, CXX_COMMENT, STARTING_COMMENT,
  FINISHING_COMMENT, CHAR_LITERAL, STRING_LITERAL
}
 
enum  Line_state { LS_START, LS_HASH, LS_DIRTY }
 

Functions

int main (int argc, char *argv[])
 

Variables

const char copyright []
 

Macro Definition Documentation

#define EDITSLOP   10

Definition at line 154 of file unifdef.c.

#define endsym (   c)    (!isalnum((unsigned char)c) && c != '_')

Definition at line 235 of file unifdef.c.

#define MAXDEPTH   64 /* maximum #if nesting */

Definition at line 146 of file unifdef.c.

#define MAXLINE   4096 /* maximum length of line */

Definition at line 147 of file unifdef.c.

#define MAXSYMS   4096 /* maximum number of symbols */

Definition at line 148 of file unifdef.c.

#define TEMPLATE   "unifdef.XXXXXX"

Definition at line 159 of file unifdef.c.

Typedef Documentation

typedef Linetype eval_fn(const struct ops *, int *, const char **)

Definition at line 791 of file unifdef.c.

typedef void state_fn(void)

Definition at line 415 of file unifdef.c.

Enumeration Type Documentation

Enumerator:
NO_COMMENT 
C_COMMENT 
CXX_COMMENT 
STARTING_COMMENT 
FINISHING_COMMENT 
CHAR_LITERAL 
STRING_LITERAL 

Definition at line 118 of file unifdef.c.

enum Ifstate
Enumerator:
IS_OUTSIDE 
IS_FALSE_PREFIX 
IS_TRUE_PREFIX 
IS_PASS_MIDDLE 
IS_FALSE_MIDDLE 
IS_TRUE_MIDDLE 
IS_PASS_ELSE 
IS_FALSE_ELSE 
IS_TRUE_ELSE 
IS_FALSE_TRAILER 
IS_COUNT 

Definition at line 96 of file unifdef.c.

enum Line_state
Enumerator:
LS_START 
LS_HASH 
LS_DIRTY 

Definition at line 133 of file unifdef.c.

enum Linetype
Enumerator:
LT_TRUEI 
LT_FALSEI 
LT_IF 
LT_TRUE 
LT_FALSE 
LT_ELIF 
LT_ELTRUE 
LT_ELFALSE 
LT_ELSE 
LT_ENDIF 
LT_DODGY 
LT_DODGY_LAST 
LT_PLAIN 
LT_EOF 
LT_ERROR 
LT_COUNT 

Definition at line 66 of file unifdef.c.

Function Documentation

int main ( int  argc,
char argv[] 
)

Definition at line 241 of file unifdef.c.

Variable Documentation

const char copyright[]
Initial value:
=
"@(#) $Version: unifdef-2.5 $\n"
"@(#) $Author: Tony Finch ([email protected]) $\n"
"@(#) $URL: http://dotat.at/prog/unifdef $\n"

Definition at line 59 of file unifdef.c.