File: main.cxx

package info (click to toggle)
rasterview 1.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,120 kB
  • sloc: cpp: 5,677; ansic: 2,211; makefile: 93; python: 13
file content (48 lines) | stat: -rw-r--r-- 818 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
44
45
46
47
48
//
// Raster file viewer for CUPS.
//
// Copyright 1997-2018 by Michael R Sweet.
//
// Licensed under Apache License v2.0.  See the file "LICENSE" for more
// information.
//

//
// Include necessary headers...
//

#include "RasterView.h"
#include <FL/Fl.H>
#include <string.h>


//
// 'main()' - Main entry and processing...
//

int					// O - Exit status
main(int  argc,				// I - Number of command-line arguments
     char *argv[])			// I - Command-line arguments
{
  int		i;			// Looping var
  RasterView	*view;			// View window


  Fl::scheme("gtk+");

  for (i = 1, view = 0; i < argc; i ++)
    if (!strncmp(argv[i], "-psn", 4))
      break;
    else
      view = RasterView::open_file(argv[i]);

  if (!view)
  {
    view = new RasterView(600, 800);
    view->show(1, argv);
  }

  Fl::run();

  return (0);
}