~ubuntu-branches/ubuntu/wily/gargoyle-free/wily-proposed

« back to all changes in this revision

Viewing changes to tads/tads2/msdos/os0tr.c

  • Committer: Bazaar Package Importer
  • Author(s): Sylvain Beucler
  • Date: 2009-09-11 20:09:43 UTC
  • Revision ID: james.westby@ubuntu.com-20090911200943-idgzoyupq6650zpn
Tags: upstream-2009-08-25
ImportĀ upstreamĀ versionĀ 2009-08-25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifdef RCSID
 
2
static char RCSid[] =
 
3
"$Header: d:/cvsroot/tads/TADS2/msdos/OS0TR.C,v 1.2 1999/05/17 02:52:18 MJRoberts Exp $";
 
4
#endif
 
5
 
 
6
/* 
 
7
 *   Copyright (c) 1992, 2002 Michael J. Roberts.  All Rights Reserved.
 
8
 *   
 
9
 *   Please see the accompanying license file, LICENSE.TXT, for information
 
10
 *   on using and copying this software.  
 
11
 */
 
12
/*
 
13
Name
 
14
  os0tr.c - os mainline for tads2 run-time
 
15
Function
 
16
  invokes runtime from operating system command line
 
17
Notes
 
18
  none
 
19
Modified
 
20
  04/04/92 MJRoberts     - creation
 
21
*/
 
22
 
 
23
#include "os.h"
 
24
#include "std.h"
 
25
#ifdef __DPMI16__
 
26
#include "ltk.h"
 
27
#endif
 
28
#include "trd.h"
 
29
 
 
30
int main(argc, argv)
 
31
int   argc;
 
32
char *argv[];
 
33
{
 
34
    int err;
 
35
    char *config_name;
 
36
 
 
37
    config_name = "config.tr";
 
38
#ifdef __DPMI16__
 
39
    ltkini(16384);
 
40
/*    config_name = "config16.tr"; */
 
41
#endif
 
42
 
 
43
    /* scan for a "-plain" option */
 
44
    {
 
45
        int i;
 
46
        for (i = 1 ; i < argc ; ++i)
 
47
        {
 
48
            if (!strcmp(argv[i], "-plain"))
 
49
                os_plain();
 
50
        }
 
51
    }
 
52
 
 
53
    /* run OS initialization */
 
54
    os_init(&argc, argv, (char *)0, (char *)0, 0);
 
55
 
 
56
    /* install the break handler */
 
57
    os_instbrk(1);
 
58
 
 
59
    /* call the main routine */
 
60
    err = os0main2(argc, argv, trdmain, "", config_name, 0);
 
61
 
 
62
    /* remove the break handler */
 
63
    os_instbrk(0);
 
64
 
 
65
    /* uninitialize the OS layer */
 
66
    os_uninit();
 
67
    
 
68
    return(err);
 
69
}
 
70