~ubuntu-branches/ubuntu/precise/netatalk/precise

« back to all changes in this revision

Viewing changes to bin/psorder/psorder.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2004-01-19 12:43:49 UTC
  • Revision ID: james.westby@ubuntu.com-20040119124349-es563jbp0hk0ae51
Tags: upstream-1.6.4
ImportĀ upstreamĀ versionĀ 1.6.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: psorder.h,v 1.2 2001/06/29 14:14:46 rufustfirefly Exp $
 
3
 *
 
4
 * Copyright (c) 1990,1991 Regents of The University of Michigan.
 
5
 * All Rights Reserved.
 
6
 *
 
7
 * Permission to use, copy, modify, and distribute this software and
 
8
 * its documentation for any purpose and without fee is hereby granted,
 
9
 * provided that the above copyright notice appears in all copies and
 
10
 * that both that copyright notice and this permission notice appear
 
11
 * in supporting documentation, and that the name of The University
 
12
 * of Michigan not be used in advertising or publicity pertaining to
 
13
 * distribution of the software without specific, written prior
 
14
 * permission. This software is supplied as is without expressed or
 
15
 * implied warranties of any kind.
 
16
 *
 
17
 *      Research Systems Unix Group
 
18
 *      The University of Michigan
 
19
 *      c/o Mike Clark
 
20
 *      535 W. William Street
 
21
 *      Ann Arbor, Michigan
 
22
 *      +1-313-763-0525
 
23
 *      netatalk@itd.umich.edu
 
24
 */
 
25
 
 
26
#ifndef STDIN
 
27
#       define  STDIN   "-"
 
28
#endif /* ! STDIN */
 
29
#ifndef FALSE
 
30
#       define  FALSE   0
 
31
#       define  TRUE    1
 
32
#endif /* ! FALSE */
 
33
 
 
34
#define REVCHAR         'd'
 
35
#define FORWCHAR        'u'
 
36
#define FORCECHAR       'f'
 
37
#define OPTSTR          "duf"
 
38
 
 
39
#define WHITESPACE      " \t"
 
40
#define ATEND           "(atend)"
 
41
#define PPSADOBE        "%!PS-Adobe-"
 
42
#define PPAGE           "%%Page:"
 
43
#define PPAGES          "%%Pages:"
 
44
#define PTRAILER        "%%Trailer"
 
45
#define PBEGINDOC       "%%BeginDocument:"
 
46
#define PENDDOC         "%%EndDocument"
 
47
#define PBEGINBIN       "%%BeginBinary:"
 
48
#define PENDBIN         "%%EndBinary"
 
49
 
 
50
#define REWIND          0L
 
51
#define REVERSE         1
 
52
#define FORWARD         2
 
53
 
 
54
#define LABELLEN        32
 
55
#define ORDLEN          4
 
56
struct pspage_st {
 
57
    struct pspage_st    *nextpage;
 
58
    struct pspage_st    *prevpage;
 
59
    off_t               offset;
 
60
    char                lable[ LABELLEN ];
 
61
    char                ord[ ORDLEN ];
 
62
};
 
63
 
 
64
#define NUMLEN          10
 
65
#define ORDERLEN        3
 
66
struct pages_st {
 
67
    off_t               offset;
 
68
    off_t               end;
 
69
    char                num[ NUMLEN ];
 
70
    char                order[ ORDERLEN ];
 
71
};
 
72
 
 
73
struct psinfo_st {
 
74
    struct pspage_st    *firstpage;
 
75
    struct pspage_st    *lastpage;
 
76
    off_t               trailer;
 
77
    struct pages_st     pages;
 
78
};
 
79
 
 
80
int
 
81
psorder();
 
82
 
 
83
void
 
84
filesetup();
 
85
 
 
86
void
 
87
readps();
 
88
 
 
89
int
 
90
handletok();
 
91
 
 
92
void
 
93
writeps();
 
94
 
 
95
void
 
96
writelable();
 
97
 
 
98
void
 
99
temp2out();
 
100
 
 
101
struct pspage_st
 
102
*getpspage();
 
103
 
 
104
void
 
105
filecleanup();