/[gcl]/gcl/gcl-tk/tkMain.c
ViewVC logotype

Diff of /gcl/gcl-tk/tkMain.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by camm, Sat Feb 15 00:38:27 2003 UTC revision 1.9 by camm, Fri Sep 26 13:50:22 2003 UTC
# Line 71  extern char *          strrchr _ANSI_ARGS_((CONS Line 71  extern char *          strrchr _ANSI_ARGS_((CONS
71   * Global variables used by the main program:   * Global variables used by the main program:
72   */   */
73    
74  static Tk_Window mainWindow;    /* The main window for the application.  If  /* static Tk_Window mainWindow;    The main window for the application.  If
75                                   * NULL then the application no longer                                   * NULL then the application no longer
76                                   * exists. */                                   * exists. */
77  static Tcl_Interp *interp;      /* Interpreter for this application. */  static Tcl_Interp *interp;      /* Interpreter for this application. */
# Line 190  TkX_Wish (argc, argv) Line 190  TkX_Wish (argc, argv)
190      int argc;                           /* Number of arguments. */      int argc;                           /* Number of arguments. */
191      char **argv;                        /* Array of argument strings. */      char **argv;                        /* Array of argument strings. */
192  {  {
193      char *args, *p, *msg;      char *args, *p;
194        const char *msg;
195      char buf[20];      char buf[20];
196      int code;      int code;
197    
# Line 203  TkX_Wish (argc, argv) Line 204  TkX_Wish (argc, argv)
204       * Parse command-line arguments.       * Parse command-line arguments.
205       */       */
206    
207      if (Tk_ParseArgv(interp, (Tk_Window) NULL, &argc, argv, argTable, 0)      if (Tk_ParseArgv(interp, (Tk_Window) NULL, &argc, (const char **)argv, argTable, 0)
208              != TCL_OK) {              != TCL_OK) {
209          fprintf(stderr, "%s\n", interp->result);          fprintf(stderr, "%s\n", interp->result);
210          exit(1);          exit(1);
# Line 236  TkX_Wish (argc, argv) Line 237  TkX_Wish (argc, argv)
237       * Initialize the Tk application.       * Initialize the Tk application.
238       */       */
239    
240      mainWindow = TkCreateMainWindow(interp, display, name/*  , "Tk" */);  /*     mainWindow = TkCreateMainWindow(interp, display, name/\*  , "Tk" *\/);  */
241      if (mainWindow == NULL) {  /*     if (mainWindow == NULL) { */
242          fprintf(stderr, "%s\n", interp->result);  /*      fprintf(stderr, "%s\n", interp->result); */
243          exit(1);  /*      exit(1); */
244      }  /*     } */
245  #ifndef __MINGW32__      /* #ifndef __MINGW32__     */
246      if (synchronize) {  /*     if (synchronize) { */
247          XSynchronize(Tk_Display(mainWindow), True);  /*      XSynchronize(Tk_Display(mainWindow), True); */
248      }  /*     } */
249  #endif      /* #endif     */
250      Tk_GeometryRequest(mainWindow, 200, 200);  /*     Tk_GeometryRequest(mainWindow, 200, 200); */
251      Tk_UnmapWindow(mainWindow);  /*     Tk_UnmapWindow(mainWindow); */
252    
253      /*      /*
254       * Make command-line arguments available in the Tcl variables "argc"       * Make command-line arguments available in the Tcl variables "argc"
# Line 255  TkX_Wish (argc, argv) Line 256  TkX_Wish (argc, argv)
256       * specified on the command line.       * specified on the command line.
257       */       */
258    
259      args = Tcl_Merge(argc-1, argv+1);      args = Tcl_Merge(argc-1, (const char **)argv+1);
260      Tcl_SetVar(interp, "argv", args, TCL_GLOBAL_ONLY);      Tcl_SetVar(interp, "argv", args, TCL_GLOBAL_ONLY);
261      ckfree(args);      ckfree(args);
262      sprintf(buf, "%d", argc-1);      sprintf(buf, "%d", argc-1);
# Line 279  TkX_Wish (argc, argv) Line 280  TkX_Wish (argc, argv)
280       * interpreter.       * interpreter.
281       */       */
282    
283  #ifdef SQUARE_DEMO  /* #ifdef SQUARE_DEMO */
284      Tcl_CreateCommand(interp, "square", SquareCmd, (ClientData) mainWindow,  /*     Tcl_CreateCommand(interp, "square", SquareCmd, (ClientData) mainWindow, */
285              (void (*)()) NULL);  /*          (void (*)()) NULL); */
286  #endif  /* #endif */
287    
288      /*      /*
289       * Invoke application-specific initialization.       * Invoke application-specific initialization.
# Line 396  tell_lisp_var_changed( Line 397  tell_lisp_var_changed(
397  {  {
398    
399    if (being_set_by_lisp == 0)    if (being_set_by_lisp == 0)
400      { char *val = Tcl_GetVar2(interp,name1,name2, TCL_GLOBAL_ONLY);      { const char *val = Tcl_GetVar2(interp,name1,name2, TCL_GLOBAL_ONLY);
401        char buf[3];        char buf[3];
402        STORE_3BYTES(buf,(long) clientData);        STORE_3BYTES(buf,(long) clientData);
403        if(sock_write_str2(dsfd,   m_set_lisp_loc, buf, 3 ,        if(sock_write_str2(dsfd,   m_set_lisp_loc, buf, 3 ,

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26