different type name for the big integer

This commit is contained in:
Lev Walkin 2004-09-29 13:18:09 +00:00
parent b8108ec5ad
commit d21c5058fc
10 changed files with 15 additions and 15 deletions

View File

@ -447,9 +447,9 @@ distclean-generic:
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
-rm -f asn1p_y.h
-rm -f asn1p_l.c -rm -f asn1p_l.c
-rm -f asn1p_y.c -rm -f asn1p_y.c
-rm -f asn1p_y.h
clean: clean-am clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \

View File

@ -170,7 +170,7 @@ typedef struct asn1p_expr_s {
TM_IMPLICIT, TM_IMPLICIT,
TM_EXPLICIT, TM_EXPLICIT,
} tag_mode; } tag_mode;
asn1_integer_t tag_value; asn1c_integer_t tag_value;
} tag; } tag;
struct asn1p_expr_marker_s { struct asn1p_expr_marker_s {

View File

@ -1808,7 +1808,7 @@ int asn1p_lexer_pedantic_1990 = 0;
int asn1p_lexer_types_year = 0; int asn1p_lexer_types_year = 0;
int asn1p_lexer_constructs_year = 0; int asn1p_lexer_constructs_year = 0;
static int _check_dashes(char *ptr); static int _check_dashes(char *ptr);
static asn1_integer_t asn1p_atoi(char *ptr); /* errno is either 0 or ERANGE */ static asn1c_integer_t asn1p_atoi(char *ptr); /* errno is either 0 or ERANGE */
/* /*
* Check that the type is defined in the year of the standard choosen. * Check that the type is defined in the year of the standard choosen.
@ -3957,9 +3957,9 @@ _check_dashes(char *ptr) {
return 0; return 0;
} }
static asn1_integer_t static asn1c_integer_t
asn1p_atoi(char *ptr) { asn1p_atoi(char *ptr) {
asn1_integer_t value; asn1c_integer_t value;
errno = 0; /* Clear the error code */ errno = 0; /* Clear the error code */
if(sizeof(value) <= sizeof(int)) { if(sizeof(value) <= sizeof(int)) {

View File

@ -39,7 +39,7 @@ asn1p_oid_free(asn1p_oid_t *oid) {
} }
asn1p_oid_arc_t * asn1p_oid_arc_t *
asn1p_oid_arc_new(const char *optName, asn1_integer_t optNumber /* = -1 */) { asn1p_oid_arc_new(const char *optName, asn1c_integer_t optNumber /* = -1 */) {
asn1p_oid_arc_t *arc; asn1p_oid_arc_t *arc;
arc = calloc(1, sizeof *arc); arc = calloc(1, sizeof *arc);
@ -66,7 +66,7 @@ asn1p_oid_compare(asn1p_oid_t *a, asn1p_oid_t *b) {
int i; int i;
for(i = 0; ; i++) { for(i = 0; ; i++) {
asn1_integer_t cmp; asn1c_integer_t cmp;
if(b->arcs_count > i) { if(b->arcs_count > i) {
if(a->arcs_count <= i) if(a->arcs_count <= i)

View File

@ -12,7 +12,7 @@
* Object identifier arc (one number in the hierarchy). * Object identifier arc (one number in the hierarchy).
*/ */
typedef struct asn1p_oid_arc_s { typedef struct asn1p_oid_arc_s {
asn1_integer_t number; /* -1 if not yet defined */ asn1c_integer_t number; /* -1 if not yet defined */
char *name; /* 0 if not defined */ char *name; /* 0 if not defined */
} asn1p_oid_arc_t; } asn1p_oid_arc_t;
@ -21,7 +21,7 @@ typedef struct asn1p_oid_arc_s {
* Arc constructor. * Arc constructor.
*/ */
asn1p_oid_arc_t *asn1p_oid_arc_new( asn1p_oid_arc_t *asn1p_oid_arc_new(
const char *optName, asn1_integer_t optNumber /* = -1 */); const char *optName, asn1c_integer_t optNumber /* = -1 */);
/* /*
* Arc destructor. * Arc destructor.
*/ */

View File

@ -99,7 +99,7 @@ asn1p_value_fromdouble(double d) {
} }
asn1p_value_t * asn1p_value_t *
asn1p_value_fromint(asn1_integer_t i) { asn1p_value_fromint(asn1c_integer_t i) {
asn1p_value_t *v = calloc(1, sizeof *v); asn1p_value_t *v = calloc(1, sizeof *v);
if(v) { if(v) {
v->value.v_integer = i; v->value.v_integer = i;

View File

@ -29,7 +29,7 @@ typedef struct asn1p_value_s {
union { union {
asn1p_ref_t *reference; asn1p_ref_t *reference;
asn1_integer_t v_integer; asn1c_integer_t v_integer;
double v_double; double v_double;
/* /*
* Binary bits vector. * Binary bits vector.
@ -59,7 +59,7 @@ asn1p_value_t *asn1p_value_fromref(asn1p_ref_t *ref, int do_copy);
asn1p_value_t *asn1p_value_frombits(uint8_t *bits, int size_in_bits, int dc); asn1p_value_t *asn1p_value_frombits(uint8_t *bits, int size_in_bits, int dc);
asn1p_value_t *asn1p_value_frombuf(char *buffer, int size, int do_copy); asn1p_value_t *asn1p_value_frombuf(char *buffer, int size, int do_copy);
asn1p_value_t *asn1p_value_fromdouble(double); asn1p_value_t *asn1p_value_fromdouble(double);
asn1p_value_t *asn1p_value_fromint(asn1_integer_t); asn1p_value_t *asn1p_value_fromint(asn1c_integer_t);
asn1p_value_t *asn1p_value_clone(asn1p_value_t *); asn1p_value_t *asn1p_value_clone(asn1p_value_t *);
void asn1p_value_free(asn1p_value_t *); void asn1p_value_free(asn1p_value_t *);

View File

@ -184,7 +184,7 @@ typedef union {
asn1p_paramlist_t *a_plist; /* A pargs list */ asn1p_paramlist_t *a_plist; /* A pargs list */
struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */ struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */ enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
asn1_integer_t a_int; asn1c_integer_t a_int;
char *tv_str; char *tv_str;
struct { struct {
char *buf; char *buf;

View File

@ -19,7 +19,7 @@ typedef union {
asn1p_paramlist_t *a_plist; /* A pargs list */ asn1p_paramlist_t *a_plist; /* A pargs list */
struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */ struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */ enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
asn1_integer_t a_int; asn1c_integer_t a_int;
char *tv_str; char *tv_str;
struct { struct {
char *buf; char *buf;

View File

@ -29,7 +29,7 @@
* type is used by the compiler itself to handle large integer values * type is used by the compiler itself to handle large integer values
* specified inside ASN.1 grammar. * specified inside ASN.1 grammar.
*/ */
typedef intmax_t asn1_integer_t; typedef intmax_t asn1c_integer_t;
#ifdef PRIdMAX #ifdef PRIdMAX
#define PRIdASN PRIdMAX #define PRIdASN PRIdMAX
#define PRIuASN PRIuMAX #define PRIuASN PRIuMAX