📄 parser.h
字号:
/* TradeClient <http://tradeclient.sourceforge.net> * $Id: parser.h,v 1.4 2001/03/20 20:12:35 ttabner Exp $ * * Copyright (C) 1999-2000 Bynari Inc. * Copyright (C) 2001 Project TradeClient * * LGPL * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library * General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <string.h>#ifndef _PARSER_H_#define _PARSER_H_#ifndef TRUE# define TRUE 1==1#endif#ifndef FALSE# define FALSE 0==1#endif#define FERR -2typedef struct pfile{ FILE *fs; char *name; int T_EOF; int T_BOF; int lineno; char *buff; unsigned long bboff; unsigned long bff; //buffer finishes file unsigned long bpos; unsigned long blpos; char *btp;} pfile;typedef struct keyword{ char *kword; char *vtype; void *var; void (*funct) (void *);} keyword;keyword *set_option(const struct keyword);pfile *new_pfile ();void delete_pfile( pfile *pf ) ;char getch (pfile *);void ungetch (pfile *);void skipspaces (pfile *);void gteol (pfile *);char *getline (pfile *);void getline_ (pfile *, char *);void ungetline (pfile *);char *getword(pfile *);void ungetword (pfile *);void substitute (char *, const char *, const char *);void env_srch_rep(char *);void parsekword (pfile *, keyword **, int);void get_token (pfile *, keyword **, int);int parse (char *, keyword **, int);#endif /* _PARSER_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -