Jspice3
xeditor.c File Reference
#include <stdio.h>
#include <signal.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <pwd.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw/Paned.h>
#include <X11/Xaw/AsciiText.h>
#include <X11/Xaw/Label.h>
#include <X11/Xaw/Viewport.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Box.h>
#include <X11/Shell.h>
#include "x11util.h"
Include dependency graph for xeditor.c:

Go to the source code of this file.

Macros

#define HAVE_X11
 
#define XEDITOR
 

Enumerations

Functions

int xeditor ()
 
static char * nextarg ()
 
static int errorhandler ()
 
static void CRaction ()
 
static void QUaction ()
 
static void Quit ()
 
static void Save ()
 
static void SaveAs ()
 
static void Source ()
 
static void Load ()
 
static void Change ()
 
static void DoSaveAs ()
 
static Bool same ()
 
static void DoLoad ()
 
static void PopUpHelp ()
 
static void PopDownHelp ()
 
static void CRaction (Widget caller, XEvent *call_data, String *params, Cardinal *numparams)
 
static void QUaction (Widget caller, XEvent *call_data, String *params, Cardinal *numparams)
 
int xeditor (char *fname)
 
static void Quit (Widget caller, XtPointer client_data, XtPointer call_data)
 
static void Save (Widget caller, XtPointer client_data, XtPointer call_data)
 
static void SaveAs (Widget caller, XtPointer client_data, XtPointer call_data)
 
static void Source (Widget caller, XtPointer client_data, XtPointer call_data)
 
static void Load (Widget caller, XtPointer client_data, XtPointer call_data)
 
static void Change (Widget caller, XtPointer client_data, XtPointer call_data)
 
static void DoSaveAs (Widget caller, XtPointer client_data, XtPointer call_data)
 
static Bool same (char *s, char *t)
 
static void DoLoad (Widget caller, XtPointer client_data, XtPointer call_data)
 
static void PopUpHelp (Widget caller, XtPointer client_data, XtPointer call_data)
 
void com_xeditor (wordlist *wl)
 

Variables

Display * Xdisplay
 
static char * oneLineTranslations
 
static char * textTranslations = "<Key>Delete: delete-next-character()"
 
static char * butTranslations = "<Btn1Up>: notify() reset()"
 
static char * wmTranslations = "<Message>WM_PROTOCOLS: quit_action()"
 
static char * sens_list [] = {"save_as", "load", 0}
 

Macro Definition Documentation

#define HAVE_X11

Definition at line 14 of file xeditor.c.

#define XEDITOR

Definition at line 58 of file xeditor.c.

Enumeration Type Documentation

enum event_type
Enumerator
QUIT 
SAVE 
SAVEAS 
SOURCE 
LOAD 
TEXTMOD 

Definition at line 37 of file xeditor.c.

Definition: xeditor.c:37
Definition: xeditor.c:37
Definition: xeditor.c:37
Definition: xeditor.c:37
event_type
Definition: xeditor.c:37
Definition: xeditor.c:37

Function Documentation

static void Change ( )
static
static void Change ( Widget  caller,
XtPointer  client_data,
XtPointer  call_data 
)
static

Definition at line 558 of file xeditor.c.

562 {
563  widget_bag *w = (widget_bag*)client_data;
564 
565  w->Last = TEXTMOD;
566  w->TextChanged = True;
567  XtSetSensitive(XtNameToWidget(w->butbox, "save"), True);
568  XtRemoveCallback(caller, XtNcallback, Change, (XtPointer)w);
569 }
Widget butbox
Definition: x11util.h:15
Definition: cddefs.h:169
#define True
Definition: scedstub.c:16
static void Change()
void com_xeditor ( wordlist wl)

Definition at line 1237 of file xeditor.c.

1240 {
1241  if (wl)
1242  xeditor(wl->wl_word);
1243  else
1244  xeditor(NULL);
1245 }
#define NULL
Definition: spdefs.h:121
int xeditor()
char * wl_word
Definition: cpstd.h:22
static void CRaction ( )
static
static void CRaction ( Widget  caller,
XEvent *  call_data,
String *  params,
Cardinal *  numparams 
)
static

Definition at line 231 of file xeditor.c.

237 {
238  /* simulate a button press when CR entered in text of popup */
239  Widget action = XtNameToWidget(XtParent(caller), "action");
240 
241  if (action)
242  XtCallCallbacks(action, XtNcallback, NULL);
243 }
#define NULL
Definition: spdefs.h:121
static void DoLoad ( )
static
static void DoLoad ( Widget  caller,
XtPointer  client_data,
XtPointer  call_data 
)
static

Definition at line 666 of file xeditor.c.

670 {
671  String fname;
672  widget_bag *w = (widget_bag*)client_data;
673  check_type which;
674  char buf[256];
675 
676  XtVaGetValues(w->popup_text, XtNstring, &fname, NULL);
677  if (fname && *fname) {
678  strcpy(buf, fname);
679  cp_pathfix(buf);
680  fname = buf;
681  }
682  which = CheckFile(fname, R_OK, w);
683  if (which == NOGO)
684  return;
685  XtVaSetValues(w->text, XtNeditType, XawtextRead, NULL);
686  if (which == NO_EXIST)
687  XtVaSetValues(w->text, XtNstring, "/dev/null", NULL);
688  else
689  XtVaSetValues(w->text, XtNstring, fname, NULL);
690  XtVaSetValues(w->text, XtNeditType, XawtextEdit, NULL);
691 
692  /* ick! seems to be the only way to guarantee getting the
693  * right label size after a window resize
694  */
695  XtDestroyWidget(w->title);
696  w->title = XtVaCreateManagedWidget("titlelabel", labelWidgetClass,
697  w->form,
698  XtNborderWidth, 0,
699  XtNfromHoriz, w->butbox,
700  XtNvertDistance, 10,
701  XtNhorizDistance, 20,
702  XtNleft, XtChainLeft,
703  XtNright, XtChainLeft,
704  XtNbottom, XtChainTop,
705  XtNtop, XtChainTop,
706  XtNlabel, fname,
707  NULL);
708 
709  PopDownInput(caller, client_data, call_data);
710  if (w->TextChanged) {
711  w->TextChanged = False;
712  XtSetSensitive(XtNameToWidget(w->butbox, "save"), False);
713  XtAddCallback(XawTextGetSource(w->text), XtNcallback, Change,
714  (XtPointer)w);
715  }
716  if (w->saved_as) {
717  XtFree(w->saved_as);
718  w->saved_as = NULL;
719  }
720 }
void cp_pathfix(char *buf)
Definition: help.c:198
static char buf[MAXPROMPT]
Definition: arg.c:18
Widget butbox
Definition: x11util.h:15
char * strcpy()
Widget text
Definition: x11util.h:13
Definition: cddefs.h:169
Widget title
Definition: x11util.h:14
#define NULL
Definition: spdefs.h:121
check_type CheckFile()
Widget popup_text
Definition: x11util.h:17
check_type
Definition: x11util.h:7
Definition: x11util.h:7
Widget form
Definition: x11util.h:11
#define False
Definition: scedstub.c:15
static void Change()
void PopDownInput()
static void DoSaveAs ( )
static
static void DoSaveAs ( Widget  caller,
XtPointer  client_data,
XtPointer  call_data 
)
static

Definition at line 574 of file xeditor.c.

578 {
579  String fname, oldfname;
580  widget_bag *w = (widget_bag*)client_data;
581  XawTextPosition begin, end;
582  FILE *fp;
583  String s, string;
584  int len;
585  String mesg;
586  char buf[256];
587 
588  XtVaGetValues(w->popup_text, XtNstring, &fname, NULL);
589  if (fname && *fname) {
590  strcpy(buf, fname);
591  cp_pathfix(buf);
592  fname = buf;
593  }
594  if (CheckFile(fname, W_OK, w) == NOGO)
595  return;
596 
597  XawTextGetSelectionPos(w->text, &begin, &end);
598  if (begin == end) {
599  /* no selected text */
600  if (!XawAsciiSaveAsFile(XawTextGetSource(w->text), fname)) {
601  PopUpMessage("Unknown error, text not saved", w);
602  return;
603  }
604  XtVaGetValues(w->title, XtNlabel, &oldfname, NULL);
605  if (same(fname, oldfname)) {
606  if (!w->TextChanged) {
607  PopUpMessage("Text not modified", w);
608  return;
609  }
610  if (w->saved_as)
611  XtFree(w->saved_as), w->saved_as = NULL;
612  w->TextChanged = False;
613  XtSetSensitive(XtNameToWidget(w->butbox, "save"), False);
614  XtAddCallback(XawTextGetSource(w->text), XtNcallback, Change,
615  (XtPointer)w);
616  mesg = "Text saved";
617  }
618  else {
619  if (w->saved_as)
620  XtFree(w->saved_as);
621  w->saved_as = XtMalloc(strlen(fname) + 1);
622  strcpy(w->saved_as, fname);
623  if (w->TextChanged) {
624  w->TextChanged = False;
625  XtAddCallback(XawTextGetSource(w->text), XtNcallback, Change,
626  (XtPointer)w);
627  }
628  mesg = "Text saved under new name";
629  }
630  }
631  else {
632 
633  if ((fp = fopen(fname, "w")) == NULL) {
634  PopUpMessage("Unknown error, block not saved", w);
635  return;
636  }
637  string = XFetchBytes(Xdisplay, &len);
638  for (s = string; len; s++,len--)
639  putc(*s,fp);
640  fclose(fp);
641  XFree(string);
642  mesg = "Selected block saved";
643  }
644  PopDownInput(caller, client_data, call_data);
645  PopUpMessage(mesg, w);
646 }
void cp_pathfix(char *buf)
Definition: help.c:198
static char buf[MAXPROMPT]
Definition: arg.c:18
Definition: outitf.c:1049
Widget butbox
Definition: x11util.h:15
char * strcpy()
Widget text
Definition: x11util.h:13
Definition: cddefs.h:119
Definition: cddefs.h:169
static Bool same()
Widget title
Definition: x11util.h:14
#define NULL
Definition: spdefs.h:121
check_type CheckFile()
Widget popup_text
Definition: x11util.h:17
void PopUpMessage()
Definition: x11util.h:7
#define False
Definition: scedstub.c:15
static void Change()
void PopDownInput()
Display * Xdisplay
static int errorhandler ( )
static
static void Load ( )
static
static void Load ( Widget  caller,
XtPointer  client_data,
XtPointer  call_data 
)
static

Definition at line 534 of file xeditor.c.

538 {
539  widget_bag *w = (widget_bag*)client_data;
540  char *newfname = NULL;
541 
542  if (w->TextChanged && (w->Last != LOAD)) {
543  w->Last = LOAD;
544  PopUpMessage(
545  "Text has been modified. Hit Load again to load", w);
546  return;
547  }
548 #ifdef STAND_ALONE
549  newfname = nextarg();
550 #endif
551  PopUpInput(newfname ? newfname : "", "Load file", DoLoad,
552  (widget_bag*)client_data);
553 }
Definition: cddefs.h:169
#define NULL
Definition: spdefs.h:121
static void DoLoad()
static char * nextarg()
void PopUpMessage()
Definition: xeditor.c:37
void PopUpInput()
static char* nextarg ( )
static
static void PopDownHelp ( )
static
static void PopUpHelp ( )
static
static void PopUpHelp ( Widget  caller,
XtPointer  client_data,
XtPointer  call_data 
)
static

Definition at line 1223 of file xeditor.c.

1227 {
1228  wordlist wl;
1229 
1230  wl.wl_prev = wl.wl_next = NULL;
1231  wl.wl_word = (char*)client_data;
1232  com_ghelp(&wl);
1233 }
Definition: library.c:18
struct wordlist * wl_prev
Definition: cpstd.h:24
#define NULL
Definition: spdefs.h:121
Definition: cpstd.h:21
void com_ghelp()
struct wordlist * wl_next
Definition: cpstd.h:23
char * wl_word
Definition: cpstd.h:22
static void QUaction ( )
static
static void QUaction ( Widget  caller,
XEvent *  call_data,
String *  params,
Cardinal *  numparams 
)
static

Definition at line 247 of file xeditor.c.

253 {
254  /* simulate a Quit button press when DeleteWindow requested */
255  Widget quit;
256 
257  quit = XtNameToWidget(caller, "xeditor.buttonbox.quit");
258  if (!quit)
259  quit = XtNameToWidget(caller, "form.cancel");
260  if (!quit)
261  quit = XtNameToWidget(caller, "form_h.buttonbox.cancel_h");
262  if (!quit)
263  quit = XtNameToWidget(caller, "form_m.cancel_m");
264 
265  if (quit)
266  XtCallCallbacks(quit, XtNcallback, NULL);
267 }
#define NULL
Definition: spdefs.h:121
static void Quit ( )
static
static void Quit ( Widget  caller,
XtPointer  client_data,
XtPointer  call_data 
)
static

Definition at line 411 of file xeditor.c.

415 {
416  widget_bag *w = (widget_bag*)client_data;
417 
418  if (w->TextChanged && (w->Last != QUIT)) {
419  w->Last = QUIT;
420  PopUpMessage(
421  "Text has been modified. Hit Quit again to quit", w);
422  return;
423  }
424  XtDestroyWidget(w->shell);
425  XtFree((char*)w);
426 #ifdef STAND_ALONE
427  kill(0,SIGINT);
428 #endif
429 }
Definition: cddefs.h:169
void PopUpMessage()
Widget shell
Definition: x11util.h:10
Definition: xeditor.c:37
static Bool same ( )
static
static Bool same ( char *  s,
char *  t 
)
static

Definition at line 650 of file xeditor.c.

653 {
654  while (isspace(*s)) s++;
655  while (isspace(*t)) t++;
656  for (; *s && *t; s++, t++)
657  if (*s != *t) return (False);
658  if (*s && !isspace(*s)) return (False);
659  if (*t && !isspace(*t)) return (False);
660  return (True);
661 }
Definition: cddefs.h:119
#define True
Definition: scedstub.c:16
#define False
Definition: scedstub.c:15
Definition: cddefs.h:192
static void Save ( )
static

Definition at line 715 of file bascmd.c.

717 {
718  FILE *fp;
719 
720  ShowPrompt("Saving circuit. Please wait.");
721  if (CDUpdate(Parameters.kpCellDesc,(char *)NULL)) {
724  fp = POpen(Parameters.kpCellName,"a",(char **)NULL);
725  if (fp) {
726  DumpSpiceFile(fp);
727  fclose(fp);
728  }
729  }
731  MallocFailed();
732  ShowPrompt("Current circuit has been saved.");
733  }
734  else
735  ShowPrompt("Can't save circuit.");
736 }
int kpModified
Definition: sced.h:261
int CDUpdate()
#define Not
Definition: cdmacs.h:16
struct s * kpCellDesc
Definition: sced.h:207
char * kpCellName
Definition: sced.h:210
struct s * kpTopDesc
Definition: sced.h:213
void MallocFailed()
Definition: scedintr.c:857
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
void DumpSpiceFile()
int CDReflect()
#define False
Definition: scedstub.c:15
FILE * POpen()
void ShowPrompt(char *str)
Definition: scedstub.c:71
static void Save ( Widget  caller,
XtPointer  client_data,
XtPointer  call_data 
)
static

Definition at line 434 of file xeditor.c.

438 {
439  widget_bag *w = (widget_bag*)client_data;
440  Arg args[1];
441  String fname;
442 
443  w->Last = SAVE;
444  XtVaGetValues(w->title, XtNlabel, &fname, NULL);
445  if (CheckFile(fname, W_OK, w) == NOGO)
446  return;
447 
448  if (!XawAsciiSaveAsFile(XawTextGetSource(w->text), fname)) {
449  PopUpMessage("Unknown error, text not saved", w);
450  return;
451  }
452  PopUpMessage("Text saved", w);
453  /* This can be called with TextChanged false if we saved
454  * under a new name, and made no subsequent changes.
455  */
456  if (w->TextChanged) {
457  w->TextChanged = False;
458  XtAddCallback(XawTextGetSource(w->text), XtNcallback, Change,
459  (XtPointer)w);
460  }
461  XtSetSensitive(caller, False);
462  if (w->saved_as) {
463  XtFree(w->saved_as);
464  w->saved_as = NULL;
465  }
466 }
Widget text
Definition: x11util.h:13
Definition: xeditor.c:37
Definition: cddefs.h:169
Widget title
Definition: x11util.h:14
#define NULL
Definition: spdefs.h:121
check_type CheckFile()
void PopUpMessage()
Definition: x11util.h:7
#define False
Definition: scedstub.c:15
static void Change()
static void SaveAs ( )
static
static void SaveAs ( Widget  caller,
XtPointer  client_data,
XtPointer  call_data 
)
static

Definition at line 471 of file xeditor.c.

475 {
476  widget_bag *w = (widget_bag*)client_data;
477  String fname;
478  XawTextPosition begin, end;
479 
480  w->Last = SAVEAS;
481  XawTextGetSelectionPos(w->text, &begin, &end);
482  if (begin == end) {
483  XtVaGetValues(w->title, XtNlabel, &fname, NULL);
484  PopUpInput(fname, "Save File", DoSaveAs, (widget_bag*)client_data);
485  }
486  else
487  PopUpInput("", "Save Block", DoSaveAs, (widget_bag*)client_data);
488 }
static void DoSaveAs()
Widget text
Definition: x11util.h:13
Definition: cddefs.h:169
Widget title
Definition: x11util.h:14
#define NULL
Definition: spdefs.h:121
Definition: xeditor.c:37
void PopUpInput()
static void Source ( )
static
static void Source ( Widget  caller,
XtPointer  client_data,
XtPointer  call_data 
)
static

Definition at line 494 of file xeditor.c.

498 {
499  widget_bag *w = (widget_bag*)client_data;
500  char *fname;
501  FILE *fp;
502 
503  w->Last = SOURCE;
504  if (w->TextChanged) {
505  fname = smktemp("sp");
506  if ((fp = inp_pathopen(fname, "w")) == NULL) {
507  PopUpMessage("Unknown error, can't create temp file", w);
508  return;
509  }
510  fclose(fp);
511  if (!XawAsciiSaveAsFile(XawTextGetSource(w->text), fname)) {
512  PopUpMessage("Unknown error, can't write temp file", w);
513  return;
514  }
515  inp_srcedit(fname, False, False);
516  PopUpMessage("Text sourced (temporary file)", w);
517  }
518  else {
519  if (w->saved_as)
520  fname = w->saved_as;
521  else {
522  XtVaGetValues(w->title, XtNlabel, &fname, NULL);
523  }
524  fname = copy(fname);
525  inp_srcedit(fname, True, False);
526  PopUpMessage("Text sourced (permanent file)", w);
527  }
528 }
Widget text
Definition: x11util.h:13
Definition: cddefs.h:169
char * copy()
Widget title
Definition: x11util.h:14
#define NULL
Definition: spdefs.h:121
FILE * inp_pathopen()
void inp_srcedit()
#define True
Definition: scedstub.c:16
char * smktemp()
void PopUpMessage()
Definition: xeditor.c:37
#define False
Definition: scedstub.c:15
int xeditor ( )
int xeditor ( char *  fname)

Definition at line 271 of file xeditor.c.

275 {
276  Widget button;
277  widget_bag *w;
278  check_type which;
279  char buf[256];
280  static char tmpl[] = "/tmp/xeXXXXXX";
281 
282  /* Assume Xt toolkit is initialized! */
283  w = (widget_bag*) XtMalloc(sizeof(widget_bag));
284 
285  w->shell = XtAppCreateShell(NULL, "Jspice3",
286  applicationShellWidgetClass, Xdisplay, NULL, 0);
287  XtOverrideTranslations(w->shell, XtParseTranslationTable(wmTranslations));
288  w->form = XtVaCreateManagedWidget("xeditor", formWidgetClass,
289  w->shell, NULL);
290 
291  w->butbox = XtVaCreateManagedWidget("buttonbox", boxWidgetClass,
292  w->form,
293  XtNwidth, 650,
294  XtNleft, XtChainLeft,
295  XtNright, XtChainLeft,
296  XtNbottom, XtChainTop,
297  XtNtop, XtChainTop,
298  NULL);
299 
300  w->title = XtVaCreateManagedWidget("titlelabel", labelWidgetClass,
301  w->form,
302  XtNborderWidth, 0,
303  XtNfromHoriz, w->butbox,
304  XtNvertDistance, 10,
305  XtNhorizDistance, 20,
306  XtNleft, XtChainLeft,
307  XtNright, XtChainLeft,
308  XtNbottom, XtChainTop,
309  XtNtop, XtChainTop,
310  XtNresizable, True,
311  NULL);
312 
313  button = XtVaCreateManagedWidget("quit", commandWidgetClass,
314  w->butbox,
315  XtNlabel, "Quit",
316  NULL);
317  XtAddCallback(button, XtNcallback, Quit, (XtPointer)w);
318  XtOverrideTranslations(button, XtParseTranslationTable(butTranslations));
319 
320  button = XtVaCreateManagedWidget("save", commandWidgetClass,
321  w->butbox,
322  XtNlabel, "Save",
323  NULL);
324  XtAddCallback(button, XtNcallback, Save, (XtPointer)w);
325  XtSetSensitive(button, False);
326 
327  button = XtVaCreateManagedWidget("save_as", commandWidgetClass,
328  w->butbox,
329  XtNlabel, "Save as",
330  NULL);
331  XtAddCallback(button, XtNcallback, SaveAs, (XtPointer)w);
332  XtOverrideTranslations(button, XtParseTranslationTable(butTranslations));
333 
334 #ifndef STAND_ALONE
335  button = XtVaCreateManagedWidget("source", commandWidgetClass,
336  w->butbox,
337  XtNlabel, "Source",
338  NULL);
339  XtAddCallback(button, XtNcallback, Source, (XtPointer)w);
340  XtOverrideTranslations(button, XtParseTranslationTable(butTranslations));
341 #endif
342 
343  button = XtVaCreateManagedWidget("load", commandWidgetClass,
344  w->butbox,
345  XtNlabel, "Load",
346  NULL);
347  XtAddCallback(button, XtNcallback, Load, (XtPointer)w);
348  XtOverrideTranslations(button, XtParseTranslationTable(butTranslations));
349 
350  button = XtVaCreateManagedWidget("help", commandWidgetClass,
351  w->butbox,
352  XtNlabel, "Help",
353  NULL);
354 #ifdef STAND_ALONE
355  XtAddCallback(button, XtNcallback, PopUpHelp, (XtPointer)w);
356  XtOverrideTranslations(button, XtParseTranslationTable(butTranslations));
357 #else
358  XtAddCallback(button, XtNcallback, PopUpHelp, (XtPointer)"xeditor");
359 #endif
360 
361  w->text = XtVaCreateManagedWidget("main_text", asciiTextWidgetClass,
362  w->form,
363  XtNtype, XawAsciiFile,
364  XtNeditType, XawtextRead,
365  XtNallowResize, True,
366  XtNscrollHorizontal, XawtextScrollWhenNeeded,
367  XtNscrollVertical, XawtextScrollWhenNeeded,
368  XtNfromVert, w->butbox,
369  XtNwidth, 660,
370  XtNheight, 350,
371  XtNstring, "/dev/null",
372  XtNtop, XtChainTop,
373  NULL);
374  XtAddCallback(XawTextGetSource(w->text), XtNcallback, Change,
375  (XtPointer)w);
376  XtOverrideTranslations(w->text, XtParseTranslationTable(textTranslations));
377 
378  XtRealizeWidget(w->shell);
379  w->wm_delete = XInternAtom(Xdisplay, "WM_DELETE_WINDOW", False);
380  XSetWMProtocols(Xdisplay, XtWindow(w->shell), &w->wm_delete, 1);
381 
382  if (fname && *fname) {
383  strcpy(buf, fname);
384  cp_pathfix(buf);
385  fname = buf;
386  }
387  which = CheckFile(fname, R_OK, w);
388  if (which == NOGO) {
389  fname = (char*)mktemp(tmpl);
390  }
391  else if (which == READ_OK) {
392  XtVaSetValues(w->text, XtNstring, fname, NULL);
393  /* switch to edit mode, file may be read only in which
394  * case the load will fail if in edit mode
395  */
396  XtVaSetValues(w->text, XtNeditType, XawtextEdit, NULL);
397  }
398  XtVaSetValues(w->title, XtNlabel, fname, NULL);
399  w->TextChanged = False;
400  w->popup = NULL;
401  w->saved_as = NULL;
402  w->Last = LOAD;
404 
405  return (0);
406 }
void cp_pathfix(char *buf)
Definition: help.c:198
static char buf[MAXPROMPT]
Definition: arg.c:18
static char * sens_list[]
Definition: xeditor.c:135
Widget butbox
Definition: x11util.h:15
static void Source()
static char * butTranslations
Definition: xeditor.c:133
char * strcpy()
Widget text
Definition: x11util.h:13
static void Quit()
Definition: cddefs.h:169
static void Save()
Definition: bascmd.c:715
Definition: x11util.h:7
Widget title
Definition: x11util.h:14
#define NULL
Definition: spdefs.h:121
check_type CheckFile()
#define True
Definition: scedstub.c:16
String * popup_sens_list
Definition: x11util.h:20
static char * textTranslations
Definition: xeditor.c:132
check_type
Definition: x11util.h:7
Definition: xeditor.c:37
Widget shell
Definition: x11util.h:10
Definition: x11util.h:7
static void PopUpHelp()
Widget popup
Definition: x11util.h:16
static void SaveAs()
Widget form
Definition: x11util.h:11
static char * wmTranslations
Definition: xeditor.c:134
#define False
Definition: scedstub.c:15
static void Change()
Atom wm_delete
Definition: x11util.h:19
Display * Xdisplay
static void Load()

Variable Documentation

char* butTranslations = "<Btn1Up>: notify() reset()"
static

Definition at line 133 of file xeditor.c.

char* oneLineTranslations
static
Initial value:
=
"<Key>Return: cr_action()\n<Key>Delete: delete-next-character()"

Definition at line 130 of file xeditor.c.

char* sens_list[] = {"save_as", "load", 0}
static

Definition at line 135 of file xeditor.c.

char* textTranslations = "<Key>Delete: delete-next-character()"
static

Definition at line 132 of file xeditor.c.

char* wmTranslations = "<Message>WM_PROTOCOLS: quit_action()"
static

Definition at line 134 of file xeditor.c.

Display* Xdisplay