skip-ws, #2/6, introduce "ngspice/stringskip.h"

with some temporary macros to skip whitespace
This commit is contained in:
rlar 2016-03-21 17:42:25 +01:00
parent 1ad65120d5
commit 6d1171ad6f
15 changed files with 22 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#include "ngspice/ngspice.h"
#include "ngspice/fteext.h"
#include "ngspice/cpextern.h"
#include "ngspice/stringskip.h"
#include "com_let.h"
#include "com_display.h"

View File

@ -8,6 +8,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "ngspice/ftedefs.h"
#include "ngspice/dvec.h"
#include "ngspice/fteparse.h"
#include "ngspice/stringskip.h"
#include "cpitf.h"
#include "com_let.h"
#include "com_set.h"

View File

@ -10,6 +10,7 @@ Author: 1992 David A. Gates, U. C. Berkeley CAD Group
#include "ngspice/ngspice.h"
#include "ngspice/dvec.h" /* For MAXDIMS */
#include "dimens.h"
#include "ngspice/stringskip.h"
/*

View File

@ -15,6 +15,7 @@ Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "ngspice/cpdefs.h"
#include "ngspice/hlpdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/stringskip.h"
static topic *curtop;
static bool quitflag;

View File

@ -39,6 +39,7 @@ Author: 1985 Wayne A. Christopher
#endif
#include "numparam/numpaif.h"
#include "ngspice/stringskip.h"
#define line_free(line, flag) \

View File

@ -11,6 +11,7 @@ Copyright 1992 Regents of the University of California. All rights reserved.
#include "ngspice/ftedefs.h"
#include "ngspice/fteparse.h"
#include "ngspice/dvec.h"
#include "ngspice/stringskip.h"
#include "newcoms.h"
#include "quote.h"

View File

@ -27,6 +27,7 @@ Todo:
#include "numparam.h"
#include "ngspice/fteext.h"
#include "ngspice/stringskip.h"
#ifdef SHARED_MODULE
extern ATTRIBUTE_NORETURN void shared_exit(int status);

View File

@ -12,6 +12,7 @@ Author: 1985 Wayne A. Christopher
#include "ngspice/ftedefs.h"
#include "ngspice/dvec.h"
#include "ngspice/fteinp.h"
#include "ngspice/stringskip.h"
#include "nutinp.h"
#include "variable.h"
#include "../misc/mktemp.h"

View File

@ -29,6 +29,7 @@ Author: 1988 Jeffrey M. Hsu
#include "../breakp2.h"
#include "../display.h"
#include "../runcoms.h"
#include "ngspice/stringskip.h"
static void gr_start_internal(struct dvec *dv, bool copyvec);

View File

@ -59,6 +59,7 @@ Modified: 2000 AlansFixes
#include "ngspice/cpdefs.h"
#include "ngspice/ftedefs.h"
#include "ngspice/fteinp.h"
#include "ngspice/stringskip.h"
#include <stdarg.h>

View File

@ -12,6 +12,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "ngspice/ftedefs.h"
#include "ngspice/dvec.h"
#include "ngspice/sim.h"
#include "ngspice/stringskip.h"
#include "circuits.h"
#include "completion.h"

View File

@ -0,0 +1,8 @@
#ifndef ngspice_STRINGSKIP_H
#define ngspice_STRINGSKIP_H
#define TEMPORARY_SKIP_NON_WS_X0(s) do { while (*(s) && !isspace_c(*(s))) (s)++; } while(0)
#define TEMPORARY_SKIP_WS_X0(s) do { while (*(s) && isspace_c(*(s))) (s)++; } while(0)
#define TEMPORARY_SKIP_WS_X1(s) do { while ( isspace_c(*(s))) (s)++; } while(0)
#endif

View File

@ -8,6 +8,7 @@ Copyright 1990 Regents of the University of California. All rights reserved.
#include "ngspice/ngspice.h"
#include "ngspice/stringutil.h"
#include "ngspice/stringskip.h"
#include "ngspice/dstring.h"
#include <stdarg.h>

View File

@ -5,6 +5,7 @@ Modified: 2002 R. Oktas, <roktas@omu.edu.tr>
#include "ngspice/ngspice.h"
#include "tilde.h"
#include "ngspice/stringskip.h"
#ifdef HAVE_PWD_H
#include <pwd.h>

View File

@ -13,6 +13,7 @@ Remarks: This code is based on a version written by Serban Popescu which
#include "ngspice/inpmacs.h"
#include "ngspice/fteext.h"
#include "inpxx.h"
#include "ngspice/stringskip.h"
/* undefine to add tracing to this file */
/* #define TRACE */