1 XCircuit as a front-end GUI to ng-spice
2 ------------------------------------------------------
3 XCircuit can work as an ng-spice front-end. However,
4 there is the problem that ng-spice can't handle being
5 used interactively through a read-write pipe. The
6 problem is that ngspice auto-detects whether standard
7 input is a tty, and if standard input is not (such as
8 when it is an I/O pipe), ngspice switches to batch
9 mode. I submitted the patch below to the ngspice
10 project at SourceForge. Hopefully it will get into
13 To test whether ngspice is patched, run XCircuit, and
14 type this command into the console: "spice start".
15 If you get a delay followed by an error message:
17 ngspice: invalid option -- p
19 then your version of ngspice is not patched, and you
20 need to apply the patch file below to the ngspice
23 File pipemode.patch: Put in directory ng-spice-rework-17 and
24 apply with the command "patch -p1 < pipemode.patch".
26 -------------------cut here----------------------------------------------------------
27 --- ng-spice-rework-17.orig/src/main.c 2006-04-05 10:52:26.060853760 -0700
28 +++ ng-spice-rework-17/src/main.c 2006-04-05 11:02:53.581165821 -0700
30 " -i, --interactive run in interactive mode\n"
31 " -n, --no-spiceinit don't load the local or user's config file\n"
32 " -o, --output=FILE set the outputfile\n"
33 + " -p, --pipe run in I/O pipe mode\n"
34 " -q, --completion activate command completion\n"
35 " -r, --rawfile=FILE set the rawfile output\n"
36 " -s, --server run spice as a server process\n"
38 {"interactive", 0, 0, 'i'},
39 {"no-spiceinit", 0, 0, 'n'},
40 {"output", 0, 0, 'o'},
41 + {"pipe", 0, 0, 'p'},
42 {"completion", 0, 0, 'q'},
43 {"rawfile", 1, 0, 'r'},
44 {"server", 0, 0, 's'},
49 - c = getopt_long (argc, argv, "hvbc:ihno:qr:st:",
50 + c = getopt_long (argc, argv, "hvbc:ihno:pqr:st:",
51 long_options, &option_index);