File: icmun.c

package info (click to toggle)
icmake 6.30-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,360 kB
  • ctags: 1,415
  • sloc: ansic: 7,727; makefile: 1,465; sh: 244; asm: 126; cpp: 39
file content (43 lines) | stat: -rw-r--r-- 955 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

#ifdef MSDOS
#pragma comment (lib, "icmun")
#pragma comment (lib, "../rss/icrss")
#endif

#include "icmun.h"

int main (argc, argv)
int argc;
char **argv;
{
    register char
        *progname,
        *infname;
    static char
        bimext [] = ".bim";

    copyright ("ICMAKE Binary Make File Unassembler", version, release, 1);

    if (argc != 2)
    {
        progname = program_name (argv [0]);
        printf ("Usage: %s bimfile\n"
                "where: bimfile - binary makefile (default extension: %s)\n\n"
            , progname, bimext);
        return 2;
    }

    infname = xstrdup(change_ext (argv [1], bimext));

    if (! (infile = fopen (infname, READBINARY)) )
        error ("cannot open %s for reading", infname);

    headerp = readheader (infile, version [0]);

    if ((INT16)(nvar = getvar (infile, headerp, &var)) == -1 )
        error ("invalid macro file, cannot read variable section");

    process ();

    return 0;
}