~ubuntu-branches/ubuntu/trusty/spim/trusty-proposed

« back to all changes in this revision

Viewing changes to xspim.c

  • Committer: Bazaar Package Importer
  • Author(s): Fernando Sanchez
  • Date: 2003-01-24 21:23:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20030124212348-6qv2jw2h0pn9o4o1
Tags: 6.5-1
* New upstream release (Closes: Bug#178264)
* Added libxaw7-dev instead of libxaw-dev to build-depends. It already
  depended on xutils so there is no need to add it (Closes: Bug#102515)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
   PURPOSE. */
22
22
 
23
23
 
24
 
/* $Header: /Software/SPIM/src/xspim.c 7     12/24/00 1:37p Larus $
 
24
/* $Header: /Software/SPIM/src/xspim.c 10    1/01/03 9:34p Larus $
25
25
 */
26
26
 
27
27
#include <stdio.h>
111
111
int cycle_level;                /* Non-zero => cycle level mode */
112
112
 
113
113
XtAppContext app_con;
114
 
Widget message, console;
 
114
Widget message, console = NULL;
115
115
XtAppContext app_context;
116
116
XFontStruct *text_font;
117
117
Dimension button_width;
125
125
#ifdef __STDC__
126
126
static void center_text_at_PC (void);
127
127
static char *check_buf_limit (char *, int *, int *);
 
128
static void create_console_display (void);
128
129
static void display_data_seg (void);
129
130
static char *display_values (mem_addr from, mem_addr to, char *buf, int *limit,
130
131
                             int *n);
140
141
#else
141
142
static void center_text_at_PC ();
142
143
static char *check_buf_limit ();
 
144
static void create_console_display ();
143
145
static void display_data_seg ();
144
146
static char *display_values ();
145
147
static char *display_insts ();
239
241
  {"-nopseudo", "pseudo", XrmoptionNoArg, "False"},
240
242
  {"-trap",   "trap", XrmoptionNoArg, "True"},
241
243
  {"-notrap", "trap", XrmoptionNoArg, "False"},
242
 
  {"-trap_file", "trap_file", XrmoptionNoArg, NULL},
 
244
  {"-trap_file", "trap_file", XrmoptionSepArg, NULL},
243
245
  {"-quiet",  "quiet", XrmoptionNoArg, "True"},
244
246
  {"-noquiet","quiet", XrmoptionNoArg, "False"},
245
247
  {"-mapped_io",  "mapped_io", XrmoptionNoArg, "True"},
295
297
static Widget shell1;
296
298
static int spim_is_running = 0;
297
299
static Widget toplevel;
 
300
static Widget pane1;
298
301
 
299
302
 
300
303
 
396
399
 
397
400
 
398
401
#ifdef __STDC__
 
402
static void
 
403
create_console_display (void)
 
404
#else
 
405
static void
 
406
create_console_display ()
 
407
#endif
 
408
{
 
409
  Arg args[10];
 
410
  Cardinal n;
 
411
 
 
412
  n = 0;
 
413
  XtSetArg (args[n], XtNeditType, XawtextAppend); n++;
 
414
  XtSetArg (args[n], XtNscrollVertical, XawtextScrollWhenNeeded); n++;
 
415
  XtSetArg (args[n], XtNpreferredPaneSize, TEXTHEIGHT * 24); n++;
 
416
  XtSetArg (args[n], XtNwidth, TEXTWIDTH * 80); n++;
 
417
  console = XtCreateManagedWidget ("console", asciiTextWidgetClass, pane1,
 
418
                                   args, n);
 
419
  XawTextEnableRedisplay (console);
 
420
  console_out.f = (FILE*) console;
 
421
}
 
422
 
 
423
#ifdef __STDC__
 
424
void
 
425
clear_console_display (void)
 
426
#else
 
427
void
 
428
clear_console_display ()
 
429
#endif
 
430
{
 
431
  Arg args[10];
 
432
  Cardinal n;
 
433
 
 
434
  XtSetArg (args[0], XtNstring, "");
 
435
  XtSetValues(console, args, 1);
 
436
}
 
437
 
 
438
 
 
439
#ifdef __STDC__
399
440
int
400
441
main (int argc, char **argv)
401
442
#else
405
446
     char **argv;
406
447
#endif
407
448
{
408
 
  Widget toplevel2, pane1;
 
449
  Widget toplevel2;
409
450
  AppResources app_res;
410
451
  Display *display;
411
 
  Arg args[10];
412
 
  Cardinal n;
413
452
 
414
453
  toplevel = XtAppInitialize (&app_context, "Xspim", options,
415
454
                              XtNumber (options), &argc, argv,
440
479
                               toplevel, NULL, ZERO);
441
480
  pane1 = XtCreateManagedWidget ("pane1", panedWidgetClass, shell1,
442
481
                                 NULL, ZERO);
443
 
  n = 0;
444
 
  XtSetArg (args[n], XtNeditType, XawtextAppend); n++;
445
 
  XtSetArg (args[n], XtNscrollVertical, XawtextScrollWhenNeeded); n++;
446
 
  XtSetArg (args[n], XtNpreferredPaneSize, TEXTHEIGHT * 24); n++;
447
 
  XtSetArg (args[n], XtNwidth, TEXTWIDTH * 80); n++;
448
 
  console = XtCreateManagedWidget ("console", asciiTextWidgetClass, pane1,
449
 
                                   args, n);
450
 
  XawTextEnableRedisplay (console);
451
 
  console_out.f = (FILE*) console;
 
482
  create_console_display ();
452
483
 
453
484
  create_sub_windows (toplevel, app_width, reg_min_height, reg_max_height,
454
485
                      command_height, command_hspace, command_vspace,