Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 452820
Collapse All | Expand All

(-)insight-6.8-1/gdb/gdbtk/generic/gdbtk.c (-6 / +6 lines)
Lines 493-509 gdbtk_init (void) Link Here
493
  make_final_cleanup (gdbtk_cleanup, NULL);
493
  make_final_cleanup (gdbtk_cleanup, NULL);
494
494
495
  if (Tcl_Init (gdbtk_interp) != TCL_OK)
495
  if (Tcl_Init (gdbtk_interp) != TCL_OK)
496
    error ("Tcl_Init failed: %s", gdbtk_interp->result);
496
    error ("Tcl_Init failed: %s", Tcl_GetStringResult (gdbtk_interp));
497
497
498
  /* Initialize the Paths variable.  */
498
  /* Initialize the Paths variable.  */
499
  if (ide_initialize_paths (gdbtk_interp, "") != TCL_OK)
499
  if (ide_initialize_paths (gdbtk_interp, "") != TCL_OK)
500
    error ("ide_initialize_paths failed: %s", gdbtk_interp->result);
500
    error ("ide_initialize_paths failed: %s", Tcl_GetStringResult (gdbtk_interp));
501
501
502
  if (Tk_Init (gdbtk_interp) != TCL_OK)
502
  if (Tk_Init (gdbtk_interp) != TCL_OK)
503
    error ("Tk_Init failed: %s", gdbtk_interp->result);
503
    error ("Tk_Init failed: %s", Tcl_GetStringResult (gdbtk_interp));
504
504
505
  if (Tktable_Init (gdbtk_interp) != TCL_OK)
505
  if (Tktable_Init (gdbtk_interp) != TCL_OK)
506
    error ("Tktable_Init failed: %s", gdbtk_interp->result);
506
    error ("Tktable_Init failed: %s", Tcl_GetStringResult (gdbtk_interp));
507
507
508
  Tcl_StaticPackage (gdbtk_interp, "Tktable", Tktable_Init,
508
  Tcl_StaticPackage (gdbtk_interp, "Tktable", Tktable_Init,
509
		     (Tcl_PackageInitProc *) NULL);
509
		     (Tcl_PackageInitProc *) NULL);
Lines 559-565 gdbtk_init (void) Link Here
559
559
560
  if (Gdbtk_Init (gdbtk_interp) != TCL_OK)
560
  if (Gdbtk_Init (gdbtk_interp) != TCL_OK)
561
    {
561
    {
562
      error ("Gdbtk_Init failed: %s", gdbtk_interp->result);
562
      error ("Gdbtk_Init failed: %s", Tcl_GetStringResult (gdbtk_interp));
563
    }
563
    }
564
564
565
  Tcl_StaticPackage (gdbtk_interp, "Insight", Gdbtk_Init, NULL);
565
  Tcl_StaticPackage (gdbtk_interp, "Insight", Gdbtk_Init, NULL);
Lines 739-745 tk_command (char *cmd, int from_tty) Link Here
739
739
740
  retval = Tcl_Eval (gdbtk_interp, cmd);
740
  retval = Tcl_Eval (gdbtk_interp, cmd);
741
741
742
  result = xstrdup (gdbtk_interp->result);
742
  result = xstrdup (Tcl_GetStringResult (gdbtk_interp));
743
743
744
  old_chain = make_cleanup (free, result);
744
  old_chain = make_cleanup (free, result);
745
745
(-)insight-6.8-1/gdb/gdbtk/generic/gdbtk-hooks.c (-10 / +13 lines)
Lines 255-267 gdbtk_read (struct ui_file *stream, char Link Here
255
	  actual_len = 0;
255
	  actual_len = 0;
256
	}
256
	}
257
      else
257
      else
258
        actual_len = strlen (gdbtk_interp->result);
258
        {
259
259
	  const char *tclResult = Tcl_GetStringResult (gdbtk_interp);
260
      /* Truncate the string if it is too big for the caller's buffer.  */
260
	  actual_len = strlen (tclResult);
261
      if (actual_len >= sizeof_buf)
261
262
	actual_len = sizeof_buf - 1;
262
	  /* Truncate the string if it is too big for the caller's buffer.  */
263
	  if (actual_len >= sizeof_buf)
264
	    actual_len = sizeof_buf - 1;
263
      
265
      
264
      memcpy (buf, gdbtk_interp->result, actual_len);
266
	  memcpy (buf, tclResult, actual_len);
267
	}
265
      buf[actual_len] = '\0';
268
      buf[actual_len] = '\0';
266
      return actual_len;
269
      return actual_len;
267
    }
270
    }
Lines 506-516 gdbtk_readline (char *prompt) Link Here
506
509
507
  if (result == TCL_OK)
510
  if (result == TCL_OK)
508
    {
511
    {
509
      return (xstrdup (gdbtk_interp->result));
512
      return (xstrdup (Tcl_GetStringResult (gdbtk_interp)));
510
    }
513
    }
511
  else
514
  else
512
    {
515
    {
513
      gdbtk_fputs (gdbtk_interp->result, gdb_stdout);
516
      gdbtk_fputs (Tcl_GetStringResult (gdbtk_interp), gdb_stdout);
514
      gdbtk_fputs ("\n", gdb_stdout);
517
      gdbtk_fputs ("\n", gdb_stdout);
515
      return (NULL);
518
      return (NULL);
516
    }
519
    }
Lines 634-640 gdbtk_load_hash (const char *section, un Link Here
634
    report_error ();
637
    report_error ();
635
  free(buf);
638
  free(buf);
636
639
637
  return atoi (gdbtk_interp->result);
640
  return atoi (Tcl_GetStringResult (gdbtk_interp));
638
}
641
}
639
642
640
643
Lines 687-693 gdbtk_query (const char *query, va_list Link Here
687
  gdbtk_two_elem_cmd ("gdbtk_tcl_query", buf);
690
  gdbtk_two_elem_cmd ("gdbtk_tcl_query", buf);
688
  free(buf);
691
  free(buf);
689
692
690
  val = atol (gdbtk_interp->result);
693
  val = atol (Tcl_GetStringResult (gdbtk_interp));
691
  return val;
694
  return val;
692
}
695
}
693
696
(-)insight-6.8-1/gdb/gdbtk/plugins/rhabout/rhabout.c (-1 / +1 lines)
Lines 22-28 extra_text (ClientData clientData, Link Here
22
                Tcl_Interp *interp,
22
                Tcl_Interp *interp,
23
                int objc, Tcl_Obj *CONST objv[])
23
                int objc, Tcl_Obj *CONST objv[])
24
{
24
{
25
  interp->result = "\nThis is a sample plug-in\n";
25
  Tcl_SetResult (interp, "\nThis is a sample plug-in\n", TCL_STATIC);
26
  return TCL_OK;
26
  return TCL_OK;
27
}
27
}
28
28

Return to bug 452820