2003-08-28 Stefan Jones <stefan.jones@multigig.com>

* src/frontend/aspice.c:
	Add ifdef for SOLARIS

	* src/frontend/terminal.[ch] src/tclspice.c:
	Fix output redirection with tclspice

	* src/tclspice.c:
	Add quick support for plotting complex vectors

	* src/xspice/ipc/ipc.c:
	Remove linux specific includes which are not needed
This commit is contained in:
stefanjones 2003-08-28 12:51:36 +00:00
parent 6cd27b2273
commit 19536856bb
7 changed files with 47 additions and 43 deletions

View File

@ -1,3 +1,20 @@
2003-08-28 Stefan Jones <stefan.jones@multigig.com>
* src/spicelib/parser/inpgtok.c:
Fix reading in ')' tokens at the end of a node list
* src/xspice/ipc/ipc.c:
Remove linux specific includes which are not needed
* src/tclspice.c:
Add quick support for plotting complex vectors
* src/frontend/aspice.c:
Add ifdef for SOLARIS
* src/frontend/terminal.[ch] src/tclspice.c:
Fix output redirection with tclspice
2003-08-21 Stefan Jones <stefan.jones@multigig.com>
* src/frontend/define.c:

View File

@ -213,7 +213,7 @@ install-tclspice: ${TCL_FILES}
tclspice.o: tclspice.c
$(COMPILE) -c -fpic tclspice.c -DTCLSPICE_version="\"$(TCLSPICE_VERSION)\""
libspice.so: $(ngspice_OBJECTS) $(LIBSPICE_OBJS) $(ngspice_DEPENDENCIES)
libspice.so: $(ngspice_OBJECTS) $(LIBSPICE_OBJS) $(ngspice_LDADD)
$(LINK) $(ngspice_LDFLAGS) $(ngspice_OBJECTS) $(ngspice_LDADD) $(LIBS) $(LIBSPICE_OBJS) -shared -Wl,--version-script=tclspice.map
if test -f .libs/$@ ; then \
mv .libs/$@ ./ ;\

View File

@ -176,7 +176,7 @@ sigchild(void)
* whether the exit was normal or not.
*/
#if defined(__NetBSD__)
#if defined(__NetBSD__) || defined(SOLARIS)
pid_t status;
#else
union wait status;

View File

@ -342,12 +342,12 @@ void term_home(void) {}
void term_cleol(void) {}
void tcap_init(void) {}
void out_send(char *string) {tcl_printf(string);}
void out_send(char *string) {fprintf(cp_out,string);}
void
out_printf(char *fmt, char *s1, char *s2, char *s3, char *s4, char *s5,
char *s6, char *s7, char *s8, char *s9, char *s10) {
tcl_printf(fmt, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10);
fprintf(cp_out,fmt, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10);
}
#endif /* TCL_MODULE */

View File

@ -3,8 +3,6 @@
extern bool out_isatty;
#ifndef TCL_MODULE
void out_init(void);
void outbufputc(void);
void promptreturn(void);
@ -17,28 +15,4 @@ void term_home(void);
void term_cleol(void);
void tcap_init(void);
#else
extern int tcl_printf(const char *format, ...);
inline extern void out_init(void) {}
inline extern void outbufputc(void) {}
inline extern void promptreturn(void) {}
inline extern void term_clear(void) {}
inline extern void term_home(void) {}
inline extern void term_cleol(void) {}
inline extern void tcap_init(void) {}
inline extern void out_send(char *string) {tcl_printf(string);}
inline extern void
out_printf(char *fmt, char *s1, char *s2, char *s3, char *s4, char *s5, char *s6, char *s7, char *s8, char *s9, char *s10) {
tcl_printf(fmt, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10);
}
#endif
#endif

View File

@ -1075,6 +1075,28 @@ int sp_Tk_Update(void) {
/* The Blt method for plotting */
/********************************************************/
static void dvecToBlt(Blt_Vector *Data, struct dvec *x) {
if(x->v_flags & VF_REAL) {
Blt_ResetVector (Data, x->v_realdata ,x->v_length,
x->v_length, TCL_VOLATILE);
} else {
double *data;
int i;
data = tmalloc(x->v_length * sizeof(double));
for(i=0;i<x->v_length;i++) {
data[i] = realpart(&x->v_compdata[i]);
}
Blt_ResetVector (Data, data, x->v_length, x->v_length, TCL_VOLATILE);
tfree(data);
}
return;
}
int blt_plot(struct dvec *y,struct dvec *x){
Blt_Vector *X_Data=NULL, *Y_Data=NULL;
char buf[1024];
@ -1091,16 +1113,9 @@ int blt_plot(struct dvec *y,struct dvec *x){
return 1;
}
Blt_ResetVector (Y_Data, y->v_realdata ,y->v_length, y->v_length, TCL_VOLATILE);
if (x) {
Blt_ResetVector (X_Data, x->v_realdata, x->v_length, x->v_length, TCL_VOLATILE);
} else {
x = y;
/*TODO: handle complex data properly */
Blt_ResetVector (X_Data, y->v_realdata, y->v_length, y->v_length, TCL_VOLATILE);
}
dvecToBlt(X_Data,x);
dvecToBlt(Y_Data,y);
sprintf(buf,"spice_gr_Plot %s %s %s %s %s %s",
x->v_name, ft_typenames(x->v_type), ft_typabbrev(x->v_type),
y->v_name, ft_typenames(y->v_type), ft_typabbrev(y->v_type));
@ -1588,7 +1603,7 @@ int tcl_vfprintf(FILE *f, const char *fmt, va_list args_in)
char *outptr, *bigstr = NULL, *finalstr = NULL;
int i, nchars, result, escapes = 0;
if((f != stdout && f != stderr)
if((fileno(f) != STDOUT_FILENO && fileno(f) != STDERR_FILENO)
#ifdef HAVE_LIBPTHREAD
|| ( fl_running && bgtid == pthread_self())
#endif

View File

@ -71,9 +71,7 @@ SUMMARY
#ifndef NDEBUG
#include <stdio.h>
#endif
#include <sys/file.h> /* Specific to BSD - Use sys/fcntl.h for sys5 */
#include <fcntl.h>
#include <sys/io.h>
#include <unistd.h>
#include <assert.h>