~ubuntu-branches/ubuntu/jaunty/cups/jaunty-proposed

« back to all changes in this revision

Viewing changes to debian/local/filters/pdf-filters/pdftopdf/parseargs.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, Till Kamppeter, Martin Pitt
  • Date: 2009-02-15 18:39:03 UTC
  • mfrom: (6.1.30 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090215183903-i0nhvqyqj4vyn52a
Tags: 1.3.9-13
[ Till Kamppeter ]
* debian/local/filters/pdf-filters/filter/imagetopdf.c: Added support for
  the new "fit-to-page" option (new, more intuitive name for "fitplot").
* debian/filters/pstopdf: Only apply paper size if the "fitplot" or the
  "fit-to-page" option is set.
* debian/local/filters/cpdftocps: Only the last digit of the number of
  copies was used (LP: #309314).
* debian/local/filters/pdf-filters/pdftopdf/pdftopdf.cxx: Do not preceed the
  PDF output with a newline (LP: #303691). Only impose the page size from
  the PPD file to all pages if the "fitplot" or the "fit-to-page" option is 
  set. This prevented from automatic paper tray switching to the correct paper
  sizes when a multiple-page-size document is printed (partial fix for
  LP: #310575).
* debian/patches/pdftops-cups-1.4.dpatch: Updated from CUPS 1.4 SVN. Contains
  fixes for multiple-page-size document printing (partial fix for
  LP: #310575).
* debian/patches/pdftops-dont_fail_on_cancel.dpatch: Removed, should be
  fixed in the new upstream version of pdftops.

[ Martin Pitt ]
* debian/patches/pdftops-cups-1.4.dpatch: Add definition of
  HAVE_PDFTOPS and CUPS_PDFTOPS, so that the filter actually gets
  again built with pdftops support. (Fixes Till's change from above).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * parseargs.h
 
3
 *
 
4
 * Command line argument parser.
 
5
 *
 
6
 * Copyright 1996-2003 Glyph & Cog, LLC
 
7
 */
 
8
 
 
9
#ifndef PARSEARGS_H
 
10
#define PARSEARGS_H
 
11
 
 
12
#ifdef __cplusplus
 
13
extern "C" {
 
14
#endif
 
15
 
 
16
#include "goo/gtypes.h"
 
17
 
 
18
/*
 
19
 * Argument kinds.
 
20
 */
 
21
typedef enum {
 
22
  argFlag,                      /* flag (present / not-present) */
 
23
                                /*   [val: GBool *]             */
 
24
  argInt,                       /* integer arg    */
 
25
                                /*   [val: int *] */
 
26
  argFP,                        /* floating point arg */
 
27
                                /*   [val: double *]  */
 
28
  argString,                    /* string arg      */
 
29
                                /*   [val: char *] */
 
30
  /* dummy entries -- these show up in the usage listing only; */
 
31
  /* useful for X args, for example                            */
 
32
  argFlagDummy,
 
33
  argIntDummy,
 
34
  argFPDummy,
 
35
  argStringDummy
 
36
} ArgKind;
 
37
 
 
38
/*
 
39
 * Argument descriptor.
 
40
 */
 
41
typedef struct {
 
42
  char *arg;                    /* the command line switch */
 
43
  ArgKind kind;                 /* kind of arg */
 
44
  void *val;                    /* place to store value */
 
45
  int size;                     /* for argString: size of string */
 
46
  char *usage;                  /* usage string */
 
47
} ArgDesc;
 
48
 
 
49
/*
 
50
 * Parse command line.  Removes all args which are found in the arg
 
51
 * descriptor list <args>.  Stops parsing if "--" is found (and removes
 
52
 * it).  Returns gFalse if there was an error.
 
53
 */
 
54
extern GBool parseArgs(ArgDesc *args, int *argc, char *argv[]);
 
55
 
 
56
/*
 
57
 * Print usage message, based on arg descriptor list.
 
58
 */
 
59
extern void printUsage(char *program, char *otherArgs, ArgDesc *args);
 
60
 
 
61
/*
 
62
 * Check if a string is a valid integer or floating point number.
 
63
 */
 
64
extern GBool isInt(char *s);
 
65
extern GBool isFP(char *s);
 
66
 
 
67
#ifdef __cplusplus
 
68
}
 
69
#endif
 
70
 
 
71
#endif