~ubuntu-branches/ubuntu/raring/cups-filters/raring-proposed

« back to all changes in this revision

Viewing changes to pdftopdf/parseargs.h

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2012-07-22 18:57:32 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20120722185732-26kkte5p1lth3rt5
Tags: 1.0.20-0bzr1
* New upstream release
   - pdftops: Added another workaround for Kyocera printers: Some
     models get very slow on images which request interpolation,
     so now we remove the image interpolation requests by additional
     PostScript code only inserted for Kyocera printers (LP: #1026974).
   - Made the Poppler-based filters pdftopdf and pdftoopvp build with
     both Poppler 0.18.x and 0.20.x (Upstream bug #1055).
   - Fixes according to Coverity scan results (Upstream bug #1054).
   - Switched build system to autotools. This especially fixes several
     build problems in Gentoo. Also build-tested with CUPS 1.6.0b1.
   - Fixes for compatibility with clang/gcc-4.7.
   - textonly: Filter did not work as a pipe with copies=1 (Upstream bug
     #1032).
   - texttopdf: Avoid trimming the results of FcFontSort(), as this may
     miss some reasonable candidates under certain circumstances. BTW,
     fix passing a non-pointer as a pointer to "result" (Closes: #670055).
   - Corrected documentation. The option for the maximum image rendering
     resolution in pdftops is "pdftops-max-image-resolution", not
     "pdftops-max-image-resolution-default".
* debian/patches/fcfontsort-no-trim.patch: Removed, fixed upstream.
* debian/rules: Updated options for ./configure and make for the new autotools
  build system.
* debian/watch: Switched to bz2 upstream packages.
* debian/rules, debian/copyright, debian/cups-filters.docs: Updated for
  renamed documentation files.
* debian/control, debian/libfontembed1.install,
  debian/libfontembed-dev.install: Added new binary packages for libfontembed.
* debian/copyright: Updated for recent file additions, and rearrangement of
  directories.

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
 
/*========================================================================
10
 
 
11
 
 Modified under the Poppler project - http://poppler.freedesktop.org
12
 
 
13
 
 All changes made under the Poppler project to this file are licensed
14
 
 under GPL version 2 or later
15
 
 
16
 
 Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
17
 
 
18
 
 To see a description of the changes please see the Changelog file that
19
 
 came with your tarball or type make ChangeLog if you are building from git
20
 
 
21
 
========================================================================*/
22
 
 
23
 
#ifndef PARSEARGS_H
24
 
#define PARSEARGS_H
25
 
 
26
 
#ifdef __cplusplus
27
 
extern "C" {
28
 
#endif
29
 
 
30
 
#include "goo/gtypes.h"
31
 
 
32
 
/*
33
 
 * Argument kinds.
34
 
 */
35
 
typedef enum {
36
 
  argFlag,                      /* flag (present / not-present) */
37
 
                                /*   [val: GBool *]             */
38
 
  argInt,                       /* integer arg    */
39
 
                                /*   [val: int *] */
40
 
  argFP,                        /* floating point arg */
41
 
                                /*   [val: double *]  */
42
 
  argString,                    /* string arg      */
43
 
                                /*   [val: char *] */
44
 
  /* dummy entries -- these show up in the usage listing only; */
45
 
  /* useful for X args, for example                            */
46
 
  argFlagDummy,
47
 
  argIntDummy,
48
 
  argFPDummy,
49
 
  argStringDummy
50
 
} ArgKind;
51
 
 
52
 
/*
53
 
 * Argument descriptor.
54
 
 */
55
 
typedef struct {
56
 
  char *arg;                    /* the command line switch */
57
 
  ArgKind kind;                 /* kind of arg */
58
 
  void *val;                    /* place to store value */
59
 
  int size;                     /* for argString: size of string */
60
 
  char *usage;                  /* usage string */
61
 
} ArgDesc;
62
 
 
63
 
/*
64
 
 * Parse command line.  Removes all args which are found in the arg
65
 
 * descriptor list <args>.  Stops parsing if "--" is found (and removes
66
 
 * it).  Returns gFalse if there was an error.
67
 
 */
68
 
extern GBool parseArgs(const ArgDesc *args, int *argc, char *argv[]);
69
 
 
70
 
/*
71
 
 * Print usage message, based on arg descriptor list.
72
 
 */
73
 
extern void printUsage(char *program, char *otherArgs, const ArgDesc *args);
74
 
 
75
 
/*
76
 
 * Check if a string is a valid integer or floating point number.
77
 
 */
78
 
extern GBool isInt(char *s);
79
 
extern GBool isFP(char *s);
80
 
 
81
 
#ifdef __cplusplus
82
 
}
83
 
#endif
84
 
 
85
 
#endif