Quantcast
Channel: Icepack-linux and Neck Pads » linux scripts code
Browsing all 8 articles
Browse latest View live

linux kernel code scripts unifdef.c 1

/* * Copyright (c) 2002 – 2011 Tony Finch <dot@dotat.at> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following...

View Article


linux kernel code scripts unifdef.c 2

/* * The main program. */ int main(int argc, char *argv[]) { int opt; while ((opt = getopt(argc, argv, “i:D:U:I:o:bBcdeKklnsStV”)) != -1) switch (opt) { case ‘i’: /* treat stuff controlled by these...

View Article


linux kernel code scripts unifdef.c 3

static void version(void) { const char *c = copyright; for (;;) { while (*++c != ‘$’) if (*c == ‘\0′) exit(0); while (*++c != ‘$’) putc(*c, stderr); putc(‘\n’, stderr); } } static void usage(void) {...

View Article

linux kernel code scripts unifdef.c 4

/* * State machine utility functions */ static void ignoreoff(void) { if (depth == 0) abort(); /* bug */ ignoring[depth] = ignoring[depth-1]; } static void ignoreon(void) { ignoring[depth] = true; }...

View Article

linux kernel code scripts unifdef.c 5

/* * Parse a line and determine its type. We keep the preprocessor line * parser state between calls in the global variable linestate, with * help from skipcomment(). */ static Linetype parseline(void)...

View Article


linux kernel code scripts unifdef.c 6

/* * An evaluation function takes three arguments, as follows: (1) a pointer to * an element of the precedence table which lists the operators at the current * level of precedence; (2) a pointer to an...

View Article

linux kernel code scripts unifdef.c 7

/* * Table-driven evaluation of binary operators. */ static Linetype eval_table(const struct ops *ops, int *valp, const char **cpp) { const struct op *op; const char *cp; int val; Linetype lt, rt;...

View Article

linux kernel code scripts unifdef.c 8

/* * Skip macro arguments. */ static const char * skipargs(const char *cp) { const char *ocp = cp; int level = 0; cp = skipcomment(cp); if (*cp != ‘(‘) return (cp); do { if (*cp == ‘(‘) level++; if...

View Article

Browsing all 8 articles
Browse latest View live