Select Git revision
Forked from
Nettle / nettle
Source project has a limited visibility.
-
Niels Möller authored
Rev: src/symmetric/desTest.c:1.7
Niels Möller authoredRev: src/symmetric/desTest.c:1.7
cpp.c 40.53 KiB
/*\
||| This file a part of Pike, and is copyright by Fredrik Hubinette
||| Pike is distributed as GPL (General Public License)
||| See the files COPYING and DISCLAIMER for more information.
\*/
#include "global.h"
#include "dynamic_buffer.h"
#include "lex.h"
#include "language.h"
#include "stralloc.h"
#include "module_support.h"
#include "interpret.h"
#include "svalue.h"
#include "pike_macros.h"
#include "hashtable.h"
#include "program.h"
#include "object.h"
#include "error.h"
#include "array.h"
#include "mapping.h"
#include "builtin_functions.h"
#include "operators.h"
#include "opcodes.h"
#include "constants.h"
#include "time.h"
#include "stuff.h"
#include <ctype.h>
#define CPP_NO_OUTPUT 1
#define CPP_EXPECT_ELSE 2
#define CPP_EXPECT_ENDIF 4
#define CPP_REALLY_NO_OUTPUT 8
#define CPP_END_AT_NEWLINE 16
#define CPP_DO_IF 32
#define CPP_NO_EXPAND 64
#define OUTP() (!(flags & (CPP_NO_OUTPUT | CPP_REALLY_NO_OUTPUT)))
#define PUTNL() low_my_putchar('\n', &this->buf)
#define GOBBLE(X) (data[pos]==(X)?++pos,1:0)
#define PUTC(C) do { \
int c_=(C); if(OUTP() || c_=='\n') low_my_putchar(c_, &this->buf); }while(0)
#define STRCAT(STR,LEN) do { \
INT32 x_,len_=(LEN); \
char *str_=(STR); \
if(OUTP()) \
low_my_binary_strcat(str_,len_, &this->buf); \
else \
for(x_=0;x_<len_;x_++) \
if(str_[x_]=='\n') \
low_my_putchar('\n',&this->buf); \
}while(0)
#define CHECKWORD(X) \
(!strncmp(X,data+pos,strlen(X)) && !isidchar(data[pos+strlen(X)]))
#define WGOBBLE(X) (CHECKWORD(X) ? (pos+=strlen(X)),1 : 0)
#define GOBBLEOP(X) \
((!strncmp(X,data+pos,strlen(X))) ? (pos+=strlen(X)),1 : 0)
#define MAX_ARGS 255
#define DEF_ARG_STRINGIFY 0x100000
#define DEF_ARG_NOPRESPACE 0x200000
#define DEF_ARG_NOPOSTSPACE 0x400000
#define DEF_ARG_MASK 0x0fffff
struct pike_predef_s
{
struct pike_predef_s *next;
char *name;