2011-12-27 12:33:01 +01:00
|
|
|
#include "ngspice/config.h"
|
2011-12-11 19:05:00 +01:00
|
|
|
#include "ngspice/ngspice.h"
|
* frontend/Makefile.am: Updates for new files.
* frontend/breakp2.c, frontend/newcoms.c, frontend/postcoms.c,
frontend/resource.c, frontend/terminal.h, frontend/variable.c,
frontend/variable.h, frontend/com_compose.c,
frontend/com_display.c, frontend/com_setscale.c,
frontend/com_strcmp.c: Include files update.
* parser/var2.c, parser/var2.h: Empty files, removed.
* parser/Makefile.am: Updates for removed files.
* parser/lexical.c: Small adjustments
* parser/input.c, parser/input.h: Input, output and error streams
handled in the frontend. Moved to the frontend directory.
* frontend/streams.c: Its new home.
2000-07-07 16:09:06 +02:00
|
|
|
|
2011-12-11 19:05:00 +01:00
|
|
|
#include "ngspice/bool.h"
|
|
|
|
|
#include "ngspice/wordlist.h"
|
2000-06-27 18:15:43 +02:00
|
|
|
|
|
|
|
|
#include "com_strcmp.h"
|
* frontend/Makefile.am: Updates for new files.
* frontend/breakp2.c, frontend/newcoms.c, frontend/postcoms.c,
frontend/resource.c, frontend/terminal.h, frontend/variable.c,
frontend/variable.h, frontend/com_compose.c,
frontend/com_display.c, frontend/com_setscale.c,
frontend/com_strcmp.c: Include files update.
* parser/var2.c, parser/var2.h: Empty files, removed.
* parser/Makefile.am: Updates for removed files.
* parser/lexical.c: Small adjustments
* parser/input.c, parser/input.h: Input, output and error streams
handled in the frontend. Moved to the frontend directory.
* frontend/streams.c: Its new home.
2000-07-07 16:09:06 +02:00
|
|
|
#include "quote.h"
|
2000-06-27 18:15:43 +02:00
|
|
|
#include "variable.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* This is a truly evil thing */
|
|
|
|
|
void
|
|
|
|
|
com_strcmp(wordlist *wl)
|
|
|
|
|
{
|
|
|
|
|
char *var, *s1, *s2;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
var = wl->wl_word;
|
|
|
|
|
s1 = cp_unquote(wl->wl_next->wl_word);
|
|
|
|
|
s2 = cp_unquote(wl->wl_next->wl_next->wl_word);
|
|
|
|
|
|
|
|
|
|
i = strcmp(s1, s2);
|
2000-10-26 19:02:12 +02:00
|
|
|
tfree(s1);/*DG cp_unquote memory leak*/
|
|
|
|
|
tfree(s2);
|
2010-07-20 21:19:51 +02:00
|
|
|
cp_vset(var, CP_NUM, &i);
|
2000-06-27 18:15:43 +02:00
|
|
|
return;
|
|
|
|
|
}
|