#include <stdlib.h>
#include <tcl.h>
#include <tk.h>
-
+#if TCL_MAJOR_VERSION >= 9
+#include <wordexp.h>
+#endif
#if (TK_MINOR_VERSION==0 && TK_MAJOR_VERSION==4)
* file out of the Tk source directory to make their own modified versions).
*/
-/* extern void exit _ANSI_ARGS_((int status)); */
+/* extern void exit _ANSI_ARGS_((int status));
extern int isatty _ANSI_ARGS_((int fd));
-/*
extern int read _ANSI_ARGS_((int fd, char *buf, size_t size));
-*/
extern char * strrchr _ANSI_ARGS_((CONST char *string, int c));
+*/
+extern int Tcl_AppInit(Tcl_Interp *interp);
/*
* Global variables used by the main program:
*/
if (tcl_RcFileName != NULL) {
- Tcl_DString buffer;
char *fullName;
FILE *f;
+#if TCL_MAJOR_VERSION >= 9
+ wordexp_t exp_result;
+ wordexp(tcl_RcFileName, &exp_result, WRDE_NOCMD);
+ fullName = exp_result.we_wordv[0];
+#else
+ Tcl_DString buffer;
fullName = Tcl_TildeSubst(interp, tcl_RcFileName, &buffer);
+#endif
if (fullName == NULL) {
fprintf(stderr, "%s\n", INTERP_RESULT(interp));
} else {
fclose(f);
}
}
+#if TCL_MAJOR_VERSION >= 9
+ wordfree(&exp_result);
+#else
Tcl_DStringFree(&buffer);
+#endif
}
dfprintf(stderr, "guis : Creating file handler for %d\n", dsfd->fd);
#ifndef __MINGW32__
- Tk_CreateFileHandler(dsfd->fd, TK_READABLE, StdinProc, (ClientData) 0);
+ Tcl_CreateFileHandler(dsfd->fd, TCL_READABLE, StdinProc, (ClientData) 0);
#endif
}
fflush(stdout);
*/
dfprintf(stderr, "\nguis : Disabling file handler for %d\n", dsfd->fd);
-/* Tk_CreateFileHandler(dsfd->fd, 0, StdinProc, (ClientData) 0); */
+/* Tcl_CreateFileHandler(dsfd->fd, 0, StdinProc, (ClientData) 0); */
do
{
/*dfprintf(stderr, "Yoo !!! Empty command\n"); */
if (debug)perror("zero message");
#ifndef __MINGW32__
- Tk_CreateFileHandler(dsfd->fd, TK_READABLE, StdinProc, (ClientData) 0);
+ Tcl_CreateFileHandler(dsfd->fd, TCL_READABLE, StdinProc, (ClientData) 0);
#endif
return;
}
} while (fNotDone > 0);
- /* Tk_CreateFileHandler(dsfd->fd, TK_READABLE, StdinProc, (ClientData) 0); */
+ /* Tcl_CreateFileHandler(dsfd->fd, TCL_READABLE, StdinProc, (ClientData) 0); */
if ((void *)msg != (void *) buf)
free ((void *) msg);
}
$(HDIR)mcompdefs.h: $(HDIR)compdefs.h $(HDIR)new_decl.h
cat $< |\
$(AWK) 'BEGIN {print "#include \"include.h\"";print "#include \"cmponly.h\"";print "---"} {a=$$1;gsub("\\.\\.\\.","",a);print "\"#define " $$1 "\" " a}' |\
- $(CC) -E -P -I./$(HDIR) - |\
+ $(CC) $(CFLAGS) -E -P -I./$(HDIR) - |\
$(AWK) '/^\-\-\-$$/ {i=1;next} {if (!i) next} {gsub("\"","");print}' >$@
$(HDIR)cmpinclude.h: $(HDIR)mcompdefs.h $(CMPINCLUDE_FILES) $(HDIR)config.h
cp $< $(@F)
- cat $(CMPINCLUDE_FILES) | $(CC) -E -I./$(HDIR) - | $(AWK) '/^# |^$$|^#pragma/ {next}{print}' >> $(@F)
+ cat $(CMPINCLUDE_FILES) | $(CC) $(CFLAGS) -E -I./$(HDIR) - | $(AWK) '/^# |^$$|^#pragma/ {next}{print}' >> $(@F)
./xbin/move-if-changed mv $(@F) $@
./xbin/move-if-changed cp $@ o/$(@F)
write_decimal(exp);
}
+static object circle_table=Cnil;
+
static void
call_structure_print_function(x, level)
object x;
goto L;
}
+ if (PRINTcircle) circle_table=PRINTvs_top[0];
+
ifuncall3(S_DATA(x->str.str_def)->print_function,
x, PRINTstream, vs_head);
vs_popp;
eflag = FALSE;
L:
+ circle_table=Cnil;
frs_pop();
bds_unwind(old_bds_top);
object *vp=vs_top,*v=vp,h;
fixnum j;
+ if (circle_table!=Cnil) {
+ vs_push(circle_table);
+ return;
+ }
+
travel(x,dogensyms,PRINTarray);
h=vs_top>vp ? gcl_make_hash_table(sLeq) : Cnil;