This file is indexed.

/usr/include/snacc/c/asn-config.h is in libsnacc-dev 1.3bbn-11ubuntu2.

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
/*
 * asn_config.h - configures the ANSI/non ansi, defines
 *                decoder alloc routines and buffer routines
 *
 * MS 91
 * Copyright (C) 1992 Michael Sample and the University of British Columbia
 *
 * This library is free software; you can redistribute it and/or
 * modify it provided that this copyright/license information is retained
 * in original form.
 *
 * If you modify this file, you must clearly indicate your changes.
 *
 * This source code 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.
 *
 * $Header: /usr/app/odstb/CVS/snacc/c-lib/inc/asn-config.h,v 1.6 1997/03/13 09:15:16 wan Exp $
 * $Log: asn-config.h,v $
 * Revision 1.6  1997/03/13 09:15:16  wan
 * Improved dependency generation for stupid makedepends.
 * Corrected PeekTag to peek into buffer only as far as necessary.
 * Added installable error handler.
 * Fixed small glitch in idl-code generator (Markku Savela <msa@msa.tte.vtt.fi>).
 *
 * Revision 1.5  1995/07/24 21:01:11  rj
 * changed `_' to `-' in file names.
 *
 * Revision 1.4  1995/02/13  14:47:33  rj
 * settings for IEEE_REAL_FMT/IEEE_REAL_LIB moved from {c_lib,c++_lib}/inc/asn_config.h to acconfig.h.
 *
 * Revision 1.3  1994/10/08  04:46:20  rj
 * config.h -> snacc.h, which now is the toplevel config file.
 *
 * Revision 1.2  1994/08/31  23:53:05  rj
 * redundant code moved into ../../config.h.bot
 *
 * Revision 1.1  1994/08/28  09:21:25  rj
 * first check-in. for a list of changes to the snacc-1.1 distribution please refer to the ChangeLog.
 *
 */

#ifndef _asn_config_h_
#define _asn_config_h_

#include <stdio.h>
#include <setjmp.h> /* for jmp_buf type, setjmp and longjmp */

/* for pow() used in asn_real.c - must include to avoid casting err on pow */
#include <math.h>

#include "snacc.h"


/* used to test if optionals are present */
#define NOT_NULL( ptr)			((ptr) != NULL)


/*
 * Asn1Error (char *str) - configure error handler
 */
void Asn1Error PROTO ((char* str));


/*
 * Asn1Warning (char *str) - configure warning mechanism
 * (currently never called)
 */
void Asn1Warning PROTO ((char* str));

/*
 * Asn1ErrorHandler - procedure to call upon Asn1Warning (severity 0)
 * and Asn1Error (severity 1).
 */
typedef void (*Asn1ErrorHandler) PROTO ((char* str, int severity));

/*
 * Asn1InstallErrorHandler - installs new error handler, returns former one
 */
Asn1ErrorHandler Asn1InstallErrorHandler PROTO ((Asn1ErrorHandler handler));

/*
 * configure memory scheme used by decoder to allocate memory
 * for the decoded value.
 * The Asn1Free will be called in the optionally generated
 * hierachical free routines.
 *
 * nibble_alloc allocs from a single buffer and EVERYTHING
 * is freed by a single fcn call. Individual elmts cannot be freed
 */

#ifndef USE_NIBBLE_MEMORY
#define USE_NIBBLE_MEMORY		1
#endif

#if USE_NIBBLE_MEMORY

#include "nibble-alloc.h"

#define Asn1Alloc( size)		NibbleAlloc (size)
#define Asn1Free( ptr)			/* empty */
#define CheckAsn1Alloc( ptr, env)	\
	if ((ptr) == NULL)\
	  longjmp (env, -27)

#else /* !USE_NIBBLE_MEMORY */

#include "mem.h"

#define Asn1Alloc( size)		Malloc (size)
#define Asn1Free( ptr)			Free (ptr)
#define CheckAsn1Alloc( ptr, env)	\
	if ((ptr) == NULL)\
	  longjmp (env, -27)

#endif /* USE_NIBBLE_MEMORY */

#define ENV_TYPE jmp_buf

/*
 * configure buffer routines that the encoders (write)
 * and decoders (read) use.  This config technique kind
 * of bites but is allows efficient macro calls.  The
 * Generated code & lib routines  call/use the "Buf????"
 * version of the macro - you define their meaning here.
 */
#ifdef USE_EXP_BUF

#include "exp-buf.h"

#define BUF_TYPE			ExpBuf **
#define BufGetByte( b)			ExpBufGetByte (b)
#define BufGetSeg( b, lenPtr)		ExpBufGetSeg (b, lenPtr)
#define BufCopy( dst, b, len)		ExpBufCopy (dst, b, len)
#define BufSkip( b, len)		ExpBufSkip (b, len)
#define BufPeekByte( b)			ExpBufPeekByte (b)
#define BufPutByteRvs( b, byte)		ExpBufPutByteRvs (b, byte)
#define BufPutSegRvs( b, data, len)	ExpBufPutSegRvs (b, data, len)
#define BufReadError( b)		ExpBufReadError (b)
#define BufWriteError( b)		ExpBufWriteError (b)

#else /* !USE_EXP_BUF */

#ifdef USE_MIN_BUF

#include "min-buf.h"

#define BUF_TYPE			char **
#define BufGetByte( b)			MinBufGetByte (b)
#define BufGetSeg( b, lenPtr)		MinBufGetSeg (b, lenPtr)
#define BufCopy( dst, b, len)		MinBufCopy (dst, b, len)
#define BufSkip( b, len)		MinBufSkip (b, len)
#define BufPeekByte( b)			MinBufPeekByte (b)
#define BufPutByteRvs( b, byte)		MinBufPutByteRvs (b, byte)
#define BufPutSegRvs( b, data, len)	MinBufPutSegRvs (b, data, len)
#define BufReadError( b)		MinBufReadError (b)
#define BufWriteError( b)		MinBufWriteError (b)

#else /* !USE_EXP_BUF && !USE_MIN_BUF */

#ifdef USE_SBUF

#include "sbuf.h"

#define BUF_TYPE			SBuf *
#define BufGetByte( b)			SBufGetByte (b)
#define BufGetSeg( b, lenPtr)		SBufGetSeg (b, lenPtr)
#define BufCopy( dst, b, len)		SBufCopy (dst, b, len)
#define BufSkip( b, len)		SBufSkip (b, len)
#define BufPeekByte( b)			SBufPeekByte (b)
#define BufPutByteRvs( b, byte)		SBufPutByteRvs (b, byte)
#define BufPutSegRvs( b, data, len)	SBufPutSegRvs (b, data, len)
#define BufReadError( b)		SBufReadError (b)
#define BufWriteError( b)		SBufWriteError (b)

#else /* !USE_EXP_BUF && !USE_MIN_BUF && !USE_SBUF*/

#ifdef USE_GEN_BUF

/*
 * NOTE: for use with tables, I defined the (slower)
 *  GenBuf type that is more flexible (à la ISODE and XDR).
 *  This allows the encode/decode libs to support other
 *  buffer types dynamically instead of having different
 *  libs for each buffer type.
 *  The GenBufs are not provided for the compiled code
 *  (ie the c_lib directory) but could easily be added
 *  (I don't have time, tho).  Tables tools are
 *  around 4x slower than the compiled version so a
 *  the GenBufs aren't such a big performance hit for table stuff.
 *
 */
#include "gen-buf.h"

#define BUF_TYPE			GenBuf *
#define BufGetByte( b)			GenBufGetByte (b)
#define BufGetSeg( b, lenPtr)		GenBufGetSeg (b, lenPtr)
#define BufCopy( dst, b, len)		GenBufCopy (dst, b, len)
#define BufSkip( b, len)		GenBufSkip (b, len)
#define BufPeekByte( b)			GenBufPeekByte (b)
#define BufPeekSeg( b, lenPtr)		GenBufPeekSeg (b, lenPtr)
#define BufPeekCopy( dst, b, len)	GenBufPeekCopy (dst, b, len)
#define BufPutByteRvs( b, byte)		GenBufPutByteRvs (b, byte)
#define BufPutSegRvs( b, data, len)	GenBufPutSegRvs (b, data, len)
#define BufReadError( b)		GenBufReadError (b)
#define BufWriteError( b)		GenBufWriteError (b)

#else /* none?! */

#ifndef MAKEDEPEND
  #error "don't know what buffer type to use!"
#endif

#endif /* USE_GEN_BUF */
#endif /* USE_SBUF */
#endif /* USE_MIN_BUF */
#endif /* USE_EXP_BUF */

#include "print.h"  /* for printing set up */

#endif /* conditional include */