File: grconvert.c

package info (click to toggle)
grace6 5.99.1%2Bdev4-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 10,492 kB
  • ctags: 13,269
  • sloc: ansic: 103,384; sh: 5,021; yacc: 617; makefile: 574; lex: 253; fortran: 56
file content (35 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (21)
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
/*
 * Utility to convert xmgr project files saved in old binary format
 */
#include <config.h>

#include <stdio.h>

#define MAIN

#include "grconvert.h"

static void usage(FILE *stream, char *progname);

int main(int argc, char *argv[])
{

    /* initialize plots, strings, graphs */
    set_program_defaults();

    if (argc != 3) {
        usage(stderr, argv[0]);
        return (1);
    }	
    if(!getbinary(cg, argv[1], 0)) {
	do_writesets(maxgraph, -1, 1, argv[2], sformat);
	return (0);
    } else {
        return (1);
    }
}

static void usage(FILE *stream, char *progname)
{
    fprintf(stream, "Usage: %s <infile> <outfile>\n", progname);
}