File: view_progs.h

package info (click to toggle)
moxftp 2.2-18.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,160 kB
  • ctags: 3,837
  • sloc: ansic: 43,420; makefile: 353; perl: 262; sh: 192
file content (65 lines) | stat: -rw-r--r-- 1,401 bytes parent folder | download | duplicates (4)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * Copyright (c) 1993 Rob Kooper (kooper@cc.gatech.edu)
 * All rights reserved.
 */

/*
 * This file will contain all recognized file formats.
 */

/*
 * What programs should I use to view the files.
 * These should be changed to point to a correct program!
 */
#if defined(OLD)
#define PICTURE_PROG	"xv"
#define TAR_PROG	"tar -tvf"
#define TEXT_PROG	"builtin"
#define PS_PROG		"xpsview"
#define AUDIO_PROG	"sfplay"
#else
#define PICTURE_PROG	"xv"
#define TAR_PROG	"tar -tvf"
#define TEXT_PROG	"builtin"
#define PS_PROG		"ghostview"
#define AUDIO_PROG	"showaudio"
#endif

/*
 * What numbers can I return.
 */
#define NONE		0
#define TEXT		1
#define PICTURE		2
#define PS		3
#define AUDIO		4
#define TAR		5

/*
 * Following defines a structure with all recognized formats. This structure
 * has the following fields:
 *  extension	    - This is the usual extension.
 *  offset	    - offset for the magic number.
 *  magic string    - The first couple of bytes could either form a string
 *  magic number    -  or they could form a magic number.
 *  return number   - What program should be used to view.
 */
struct _file_format {
    char *extension;
    long  offset;
    char *magic_string;
    int   magic_number;
    int   return_type;
};

struct _viewers {
    int	    type;
    char    *command;
};


extern struct _viewers viewers[];
/*
 * And we need a prototype offcourse.
 */
void view();