This file is indexed.

/usr/include/ppd.h is in libppd-dev 2:0.10-7.1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/*
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 *
 * See the AUTHORS file for a list of people who have hacked on 
 * this code. 
 * See the ChangeLog file for a list of changes.
 *
 * Contents:
 *
 *   ppd_file_free()       - Free all memory used by the PPD file.
 *   ppd_file_new()             - Initialize the PpdFile struct.  
 *   ppd_file_new_from_filep() - Initialize the PpdFile struct, 
 *                               use a FILE* reference to the ppd
 *   ppd_file_new_from_fd() - Initialize the PpdFile struct, use 
 *                            a file descriptor to the ppd
 *   ppd_free_group()  - Free a single UI group.
 *   ppd_free_option() - Free a single option.
 *   ppd_free_choice() - Free a single choice <mfasheh@valinux.com>
 *
 */

#ifndef __PPD_H_
#define __PPD_H_

#include <stdio.h>
#include <unistd.h>
#include <glib.h>

#ifndef DEBUG
//#define DEBUG
#endif

#include "ppdenums.h"
#include "ppdmacros.h"

// C++ magic...
#ifdef __cplusplus
extern "C" {
#endif				// __cplusplus
// PPD version.../* Kept in sync with Adobe version number */
#define PPD_VERSION	4.3
/* This is a virtual class.  It should never be instantiated. */ typedef struct {
    guint8 id;
  } PpdObject;

  // Types and structures... version numbererivatives) is governed
  typedef struct {		// *** Options ***
    guint8 id;			// Object id

    gboolean conflicted;	// 0 if no conflicts exist, 1 otherwise 
    gboolean emitted;		// 1 already emitted 0 otherwise

    GString *keyword;		// Option keyword name ("PageSize", etc.) 
    GString *defchoice;		// Default option choice 
    GString *text;		// Human-readable text

    PpdUIType ui;		// Type of UI option 
    PpdSectionOrder section;	// Section for command 
    float order;		// Order number
    GSList *choices;		// should be a GSList of PpdChoice objects
  } PpdOption;			/* was ppd_option_t */

  typedef struct {		// *** Option choices ***
    guint8 id;			// Object id

    gboolean marked;		// 0 if not selected, 1 otherwise
    GString *choice;		// Computer-readable option name: 41 chars 
    GString *text;		// Human-readable option name: 81 chars
    char *code;			// Code to send for this option 
    PpdOption *option;		// Pointer to parent option structure 
  } PpdChoice;			/* was ppd_choice_t */


  /* hrm..  this whole struct should be a GSList... */
  typedef struct {		// *** Groups ***
    guint8 id;			// Object id

    GString *text;		// Human-readable group name
    GSList *options;		/* should be a GSList of PpdOption objects */
    GSList *subgroups;		// GSList of PpdGroups (subgroups)
  } PpdGroup;			/* was ppd_group_t */

  typedef struct {		// *** Constraints ***
    guint8 id;			// Object id

    GString *option1;		// First keyword 
    GString *choice1;		// First option/choice (blank for all) 
    GString *option2;		// Second keyword 
    GString *choice2;		// Second option/choice (blank for all) 
  } PpdConstraint;		/* was ppd_const_t */

  typedef struct {		// *** Page Sizes ***
    guint8 id;			// Object id

    gboolean marked;		// Page size selected?
    GString *name;		// Media size option 
    float width;		// Width of media in points 
    float length;		// Length of media in points 
    float left;			// Left printable margin in points 
    float bottom;		// Bottom printable margin in points 
    float right;		// Right printable margin in points 
    float top;			// Top printable margin in points 
  } PpdSize;			/* ppd_size_t; */

  typedef struct {		// *** Emulators ***
    guint8 id;			// Object id

    GString *name;		// Emulator name 
    char *start;		// Code to switch to this emulation 
    char *stop;			// Code to stop this emulation 
  } PpdEmulator;		/* was ppd_emul_t */

  typedef struct {		// *** sRGB Color Profiles ***
    guint8 id;			// Object id

    GString *resolution;	// Resolution or "-" 
    GString *media_type;	// Media type of "-"
    float density;		// Ink density to use 
    float gamma;		// Gamma correction to use 
    float matrix[3][3];		// Transform matrix 
  } PpdProfile;			/* was ppd_profile_t */

  typedef struct {		// *** Files ***
    guint8 id;			// Object id

    int language_level;		// Language level of device 
    gboolean color_device;	// 1 = color device, 0 = grayscale 
    gboolean variable_sizes;	// 1 = supports variable sizes,0 = doesn't 
    gboolean accurate_screens;	// 1 = supports accurate screens, 0 = not 
    gboolean contone_only;	// 1 = continuous tone only, 0 = not 
    int landscape;		// -90 or 90 
    int model_number;		// Device-specific model number 
    gboolean manual_copies;	// 1 = Copies done manually, 0 = hardware 
    PpdCSType colorspace;	// Default colorspace 
    GSList *patches;		// GSList of char*'s Patch commands to be sent
    // to printer 
    GSList *emulations;		// GSList of PpdEmulator's; Emulations and the
    // code to invoke them 
    GString *jcl_begin;		// Start JCL commands 
    GString *jcl_ps;		// Enter PostScript interpreter 
    GString *jcl_end;		// End JCL commands 
    GString *lang_encoding;	// Language encoding 
    GString *lang_version;	// Language version (English, Spanish, etc.) 
    GString *modelname;		// Model name (general) 
    GString *ttrasterizer;	// Truetype rasterizer 
    GString *manufacturer;	// Manufacturer name 
    GString *product;		// Product name (from PS RIP/interpreter) 
    GString *nickname;		// Nickname (specific) 
    GString *shortnickname;	// Short version of nickname

    GSList *groups;		// GSList of PpdGroup objects
    GSList *sizes;		// GSList of PpdSize objects      

    float custom_min[2];	// Minimum variable page size 
    float custom_max[2];	// Maximum variable page size 
    float custom_margins[4];	// Margins around page

    GSList *consts;		// GSList of PpdConstraints
    GSList *fonts;		// GSList of char* 's      
    GSList *profiles;		// GSList of PpdProfiles
    GSList *filters;		// GSList of char*'s
  } PpdFile;			/* used to be: ppd_file_t */



  /* new file prototypes (should we call these constructors?) */
  PpdFile *ppd_file_new(const char *filename);
  PpdFile *ppd_file_new_from_filep(FILE * fp);
  PpdFile *ppd_file_new_from_fd(int fd);


  /* new destructor prototype */
  void ppd_file_free(PpdFile * ppd);

  gboolean ppd_emit_to_file(PpdFile * ppd, FILE * fp, PpdSectionOrder section);
  gboolean ppd_emit_to_fd(PpdFile * ppd, int fd, PpdSectionOrder section);

  int ppd_get_num_conflicts(PpdFile * ppd);

  gboolean ppd_check_option_is_marked(PpdFile * ppd, const char *keyword,
				      const char *option);
  void ppd_mark_defaults(PpdFile * ppd);
  gint ppd_mark_option(PpdFile * ppd, const char *keyword, const char *option);

  PpdChoice *ppd_find_choice(PpdOption * o, const char *option);
  PpdChoice *ppd_find_marked_choice(PpdFile * ppd, const char *keyword);

  PpdOption *ppd_find_option_by_keyword(PpdFile * ppd, const char *keyword);

  float ppd_get_page_length(PpdFile * ppd, const char *name);
  PpdSize *ppd_get_page_size(PpdFile * ppd, const char *name);
  float ppd_get_page_width(PpdFile * ppd, const char *name);

  void ppd_debug_dump_ppd(PpdFile * ppd);

  /* Constructors for the various classes */
  PpdChoice *ppd_choice_new(PpdOption * option, const char *choice,
			    const char *text);
  PpdOption *ppd_option_new(PpdGroup * group, const char *name);
  PpdGroup *ppd_group_new(void);
  PpdConstraint *ppd_constraint_new(void);
  PpdSize *ppd_size_new(const char *name);
  PpdEmulator *ppd_emulator_new(void);
  PpdProfile *ppd_profile_new(void);

// C++ magic...
#ifdef __cplusplus
}
#endif				// __cplusplus
#endif				// !__PPD_H__
// End of ppd.h