File: liba2ps.h

package info (click to toggle)
a2ps 1%3A4.15.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,716 kB
  • sloc: ansic: 44,830; sh: 11,625; lex: 1,851; perl: 708; yacc: 698; makefile: 494; lisp: 396; ada: 263; objc: 189; f90: 109; ml: 85; sql: 74; pascal: 57; modula3: 33; haskell: 32; sed: 30; java: 29; python: 24
file content (119 lines) | stat: -rw-r--r-- 3,116 bytes parent folder | download | duplicates (2)
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
/* -*- C -*-
 * liba2ps.h
 *
 * shared header with the whole package
 * Copyright (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
 * Copyright (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
 * $Id: liba2ps.h.in,v 1.1.1.1.2.1 2007/12/29 01:58:19 mhatta Exp $
 */

/*
 * This file is part of a2ps.
 *
 * This program 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 3, or (at your option)
 * any later version.
 *
 * This program 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 program; see the file COPYING.  If not, write to
 * the Free Software Foundation, 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef LIBA2PS_H_
#define LIBA2PS_H_

#undef __BEGIN_DECLS
#undef __END_DECLS
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
#else
# define __BEGIN_DECLS /* empty */
# define __END_DECLS /* empty */
#endif

__BEGIN_DECLS

/*
 * A structure which records any global information liba2ps needs
 */
struct a2ps_job;

/* File liba2ps.h.extract */
/* From faces.h */
/*
 * Available faces.  No_face should never be given to liba2ps.
 */
enum face_e {
  No_face = -1,
  First_face = 0,
  Plain = 0,
  Keyword = 1,
  Keyword_strong = 2,
  Label = 3,
  Label_strong = 4,
  String = 5,
  Symbol = 6,
  Error = 7,
  Comment = 8,
  Comment_strong = 9,
  Last_face = 9
};

/* From gen.h */
/* Print a single char C in FACE */
void a2ps_print_char (struct a2ps_job * job,
			    char c,
			    enum face_e face);
/* Print a C string (nul terminated) in FACE */
void a2ps_print_string (struct a2ps_job * job,
			      const char * string,
			      enum face_e face); 
/* Print the N chars contained in BUFFER, in FACE */
void a2ps_print_buffer (struct a2ps_job * job,
			      const char * buffer,
			      size_t start, size_t end,
			      enum face_e face);
/* Open/close the outer structure */
void a2ps_open_output_session (struct a2ps_job * job);
void a2ps_close_output_session (struct a2ps_job * job);

/* Open/Close the section structure */
void a2ps_open_input_session (struct a2ps_job * job, const char * name);
void a2ps_close_input_session (struct a2ps_job * job);


/* From jobs.h */
/* Return a newly allocated output session storage */
struct a2ps_job * a2ps_job_new (void);

/* Finalize it */
void a2ps_job_finalize (struct a2ps_job * job);

/* Free the memory used by JOB */
void a2ps_job_free (struct a2ps_job * job);

/* From confg.h */
/*
 * Read the configuration file
 */
int a2_read_config (struct a2ps_job * job,
			 const char *path, const char *file);

/*
 * Read the system's configuration file
 * (i.e., a2_read_config  (job, etc, a2ps.cfg))
 */
void a2_read_sys_config (struct a2ps_job * job);


__END_DECLS

#endif /* !defined(LIBA2PS_H_) */