rlar
d9e7ab2759
input.c, simplify #ifdef for the broken visual studio _read()
If we have _MSC_VER so we have either CONSOLE HAS_WINGUI or SHARED_MODULE
If we have SHARED_MODULE, then we most certainly don't need
the unbuffered read(), which isn't unbuffered on _MSC_VER anyway.
Thus _MSC_VER is sufficient.
9 years ago
rlar
1475df2aa4
input.c, try to work around microsofts broken _read()
concerning the visual sudio variant of the "console" build.
Their _read() returns 0 when a linfeed is read.
Ironically the linefeed seems to be stored into the buffer nontheless.
Because the filehandle is in linebuffered mode anyway,
(the read won't return up until the terminating newline is entered)
we can just as well use getc(), which doesn't seem to suffer
from the same problem in their implementation.
9 years ago
rlar
2bafe98f17
winmain.c, etc, cleanup
9 years ago
rlar
90a205d36d
winmain.c, etc, whitespace cleanup
9 years ago
rlar
3a9ace82bb
winmain.c, etc, cleanup, rewrite obfuscated symbols
substitute in the whole source code:
"__stream" --> "stream"
"__pos" --> "pos"
"__s" --> "s"
"__n" --> "n"
"__c" --> "c"
"__format" --> "format"
"__ptr" --> "ptr"
"__size" --> "size"
"__path" --> "path"
"__mode" --> "mode"
"__offset" --> "offset"
"__whence" --> "whence"
"__arglist" --> "arglist"
"__buf" --> "buf"
"__fp" --> "fp"
"f_c_l_o_s_e" --> "win_x_fclose"
"f_e_o_f" --> "win_x_feof"
"f_e_r_r_o_r" --> "win_x_ferror"
"f_f_l_u_s_h" --> "win_x_fflush"
"fg_e_t_c" --> "win_x_fgetc"
"f_g_e_t_p_o_s" --> "win_x_fgetpos"
"fg_e_t_s" --> "win_x_fgets"
"fp_r_i_n_t_f" --> "win_x_fprintf"
"fp_u_t_c" --> "win_x_fputc"
"fp_u_t_char" --> "win_x_fputchar"
"fp_u_t_s" --> "win_x_fputs"
"f_r_e_a_d" --> "win_x_fread"
"f_r_e_o_p_e_n" --> "win_x_freopen"
"fs_c_a_n_f" --> "win_x_fscanf"
"f_s_e_e_k" --> "win_x_fseek"
"f_s_e_t_p_o_s" --> "win_x_fsetpos"
"f_t_e_l_l" --> "win_x_ftell"
"f_w_r_i_t_e" --> "win_x_fwrite"
"g_e_t_c" --> "win_x_getc"
"g_e_t_char" --> "win_x_getchar"
"g_e_t_s" --> "win_x_gets"
"p_e_r_r_o_r" --> "win_x_perror"
"p_r_i_n_t_f" --> "win_x_printf"
"p_u_t_c" --> "win_x_putc"
"p_u_t_char" --> "win_x_putchar"
"p_u_t_s" --> "win_x_puts"
"r_e_a_d" --> "win_x_read"
"s_c_a_n_f" --> "win_x_scanf"
"ung_e_t_c" --> "win_x_ungetc"
"vfp_r_i_n_t_f" --> "win_x_vfprintf"
"vfs_c_a_n_f" --> "win_x_vfscanf"
"vp_r_i_n_t_f" --> "win_x_vprintf"
"vs_c_a_n_f" --> "win_x_vscanf"
9 years ago
rlar
93d040703d
winmain.c, drop artefact "fgetchar", cleanup/emphasise disabled "freopen"
9 years ago
rlar
69537a7899
winmain.c, fs_c_a_n_f(), bug fix, and cleanup "minimise"
9 years ago
rlar
b5ccfca24b
implement option 'indverbosity' to control check of inductive systems
default is 2, maximum verbosity
option indverbosity=1
can be used to prevent check for
"incomplete set of couplings"
option indverbosity=0
can be used to avoid the check altogether
set indverbosity=INTEGER
or
.option indverbosity=INTEGER
works as well
9 years ago
rlar
05ee2e0182
check for missing and duplicate K instances
9 years ago
Francesco Lannutti
bf542f64d8
check for viable mutual inductor coefficients
9 years ago
rlar
fc32837b44
muttemp.c, allow negative inductance
9 years ago
rlar
681903492b
devices/ind/*, whitespace
9 years ago
rlar
24aee8bf2a
devices/ind/*, cleanup
9 years ago
Francesco Lannutti
0c5196e773
signal_handler.c, ft_sigintr(), exit after three SIGINT requests
11 years ago
rlar
4778b48592
inpcom.c, inp_fix_inst_calls_for_numparam(), drop redundant condition `num_subckt_params == 0'
found_mult_param() can already cope with that
10 years ago
dwarning
24dbbc393d
remove the ancient nobjthack option to fake 3-terminal bjt's
10 years ago
dwarning
6827495a75
correct the comment for 5-terminal bjt's in get_number_terminals
10 years ago
dwarning
1e880deff4
allow 5-terminal bjt's in subckt expansion
10 years ago
rlar
52a1a58e14
wlist.c, wl_find(), avoid crash when `string' argument is NULL
10 years ago
h_vogt
e4e24f74e6
breakp2.c, copynode(), prevent segfault if missing ')'
invoking 'save' with an erronous node, for example
save v(thing
This can happen unexpectedly for long 'save' lines,
which will silently be truncated.
10 years ago
rlar
7fc6609821
breakp2.c, settrace(), cleanup #2/2
10 years ago
rlar
004e49aabf
breakp2.c, settrace(), cleanup #1/2
"save" command,
reduce complexity from O(2) to O(1)
10 years ago
rlar
939555115d
variables, cp_vprint, fix a memory leak
10 years ago
rlar
bc325b17c5
variables, lift plot_cur->pl_env up to the invoker of cp_usrvars()
10 years ago
rlar
e0db4aa665
variables, cp_vprint(), reorder for similarity
10 years ago
rlar
a33876ff59
variables, variables, cp_getvar, rewrite
10 years ago
rlar
97c5e1567f
variables, cp_getvar(), beware of retval == NULL
10 years ago
rlar
20b666e2d5
variables, clean up
10 years ago
rlar
b2fb4e20bf
variables, drop 'found', use identity found == (*p != NULL)
10 years ago
rlar
0784f76e51
variables, cleanup the for loops
10 years ago
rlar
e39119c1c8
variables, use identity v == *p (and u == *p)
10 years ago
rlar
d14ee053d7
variables, use a pointer to the anchor of the variable instead of 'lv'
10 years ago
rlar
b13125ac84
variables, explicit processing of ft_curckt->ci_vars, drop uv2
10 years ago
rlar
7483ff9d8c
variables, cp_remvar(), cleanup
10 years ago
rlar
485fba7548
variables, add some comments, add explicit case US_NOSIMVAR
10 years ago
rlar
97cdaae19f
variables, cp_usrvars(), be more explicit
lift uv2 return value up to the invoker of cp_usrvars()
10 years ago
rlar
596599492e
variables, drop redundant tfree(v->va_name), rely on free_struct_variable()
10 years ago
h_vogt
fe24b3e6dd
variable.c, remove memory leaks
10 years ago
rlar
ac336c9920
options.c, cleanup inp_getoptsc()
10 years ago
h_vogt
6a0a6071a0
gettok_nc(&line): like gettok(), move pointer beyond next token in line, but without returning a string, without TMALLOC. Replaces constructs like tfree(gettok(&line)).
10 years ago
h_vogt
c198f878d3
inpcom.c, bug fix in inp_chk_for_multi_in_vcvs()
10 years ago
rlar
e89a5dd5b4
cktop.c, #14/14, cleanup
10 years ago
rlar
b3a0f15c09
cktop.c, #13/14, cleanup
10 years ago
rlar
65596ce76c
cktop.c, #12/14, cleanup
10 years ago
rlar
8d843ecec5
cktop.c, #11/14, cleanup
10 years ago
rlar
64fadb90cc
cktop.c, #10/14, whitespace
10 years ago
rlar
3041936663
cktop.c, #9/14, shortcut
10 years ago
rlar
a446d1e145
cktop.c, #8/14, early leave
10 years ago
rlar
0482f57bb7
cktop.c, #7/14, invert a trailing "if"
10 years ago
rlar
761e556ac2
cktop.c, #6/14, simplify loop termination
10 years ago