home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
x
/
volume4
/
xgen
/
part03
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-06-29
|
1KB
|
73 lines
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
#include "application.h"
Widget top_level;
extern void get_env();
extern void help();
XtTranslations input_text_translations;
main(argc, argv)
int argc;
char **argv;
{
static XtActionsRec actionlist[] =
{
{"Help", help},
};
struct shell *help_board;
struct shell *error_board;
struct shell *get_shell();
XtTranslations parse_spreadsheet_transl();
/* Initialize the Toolkit and the resource manager */
top_level = XtInitialize("", "", NULL ,NULL, &argc, argv);
XtAddActions( actionlist, 1);
/*parse translations at initialization time */
input_text_translations = parse_spreadsheet_transl();
/*parse application script*/
parse_app( argv[1] );
/*create help shell*/
help_board = get_shell("help");
if( help_board == NULL )
{
fprintf(stderr, " Error: description of msgboard \"help\" is not provided\n");
exit(-1);
}
create_msgboard(help_board);
error_board = get_shell("error");
if( error_board == NULL )
{
fprintf(stderr, " Error: description of msgboard \"error\" is not provided\n");
exit(-1);
}
create_msgboard(error_board);
/*bring to the screen the environment called top level */
get_env( top_level, "top level" );
XtMainLoop();
}