From c46b7cb50041897e2f6d617bdf23582d9462d4e5 Mon Sep 17 00:00:00 2001 From: Lev Walkin Date: Fri, 18 Aug 2006 02:27:55 +0000 Subject: *** empty log message *** --- libasn1parser/asn1p_class.c | 6 +++--- libasn1parser/asn1p_class.h | 2 +- libasn1parser/asn1p_y.c | 6 +++--- libasn1parser/asn1p_y.h | 2 +- libasn1parser/asn1p_y.y | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'libasn1parser') diff --git a/libasn1parser/asn1p_class.c b/libasn1parser/asn1p_class.c index 585ec93c..c6e6c3d7 100644 --- a/libasn1parser/asn1p_class.c +++ b/libasn1parser/asn1p_class.c @@ -154,19 +154,19 @@ asn1p_wsyntx_clone(asn1p_wsyntx_t *wx) { } asn1p_wsyntx_chunk_t * -asn1p_wsyntx_chunk_frombuf(char *buf, int len, int do_copy) { +asn1p_wsyntx_chunk_fromstring(char *token, int do_copy) { asn1p_wsyntx_chunk_t *wc; if(do_copy) { static asn1p_wsyntx_chunk_t tmp; tmp.type = WC_LITERAL; - tmp.content.token = buf; + tmp.content.token = token; wc = asn1p_wsyntx_chunk_clone(&tmp); } else { wc = asn1p_wsyntx_chunk_new(); if(wc) { wc->type = WC_LITERAL; - wc->content.token = buf; + wc->content.token = token; } } diff --git a/libasn1parser/asn1p_class.h b/libasn1parser/asn1p_class.h index 5d55a73b..571be617 100644 --- a/libasn1parser/asn1p_class.h +++ b/libasn1parser/asn1p_class.h @@ -69,7 +69,7 @@ asn1p_wsyntx_t *asn1p_wsyntx_clone(asn1p_wsyntx_t *); * 0: Component has been added * -1: Failure to add component (refer to errno) */ -asn1p_wsyntx_chunk_t *asn1p_wsyntx_chunk_frombuf(char *buf, int len, int _copy); +asn1p_wsyntx_chunk_t *asn1p_wsyntx_chunk_fromstring(char *token, int _copy); asn1p_wsyntx_chunk_t *asn1p_wsyntx_chunk_fromsyntax(asn1p_wsyntx_t *syntax); diff --git a/libasn1parser/asn1p_y.c b/libasn1parser/asn1p_y.c index 138f9769..f99d215f 100644 --- a/libasn1parser/asn1p_y.c +++ b/libasn1parser/asn1p_y.c @@ -2785,7 +2785,7 @@ yyreduce: case 109: #line 1125 "asn1p_y.y" { - yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0); + yyval.a_wchunk = asn1p_wsyntx_chunk_fromstring(yyvsp[0].tv_opaque.buf, 0); yyval.a_wchunk->type = WC_WHITESPACE; } break; @@ -2793,14 +2793,14 @@ yyreduce: case 110: #line 1129 "asn1p_y.y" { - yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_str, strlen(yyvsp[0].tv_str), 0); + yyval.a_wchunk = asn1p_wsyntx_chunk_fromstring(yyvsp[0].tv_str, 0); } break; case 111: #line 1132 "asn1p_y.y" { - yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].a_refcomp.name, strlen(yyvsp[0].a_refcomp.name), 0); + yyval.a_wchunk = asn1p_wsyntx_chunk_fromstring(yyvsp[0].a_refcomp.name, 0); yyval.a_wchunk->type = WC_FIELD; } break; diff --git a/libasn1parser/asn1p_y.h b/libasn1parser/asn1p_y.h index 14bc7b6f..b7b7f1a1 100644 --- a/libasn1parser/asn1p_y.h +++ b/libasn1parser/asn1p_y.h @@ -278,7 +278,7 @@ typedef union { } tv_nametag; } yystype; /* Line 1281 of /usr/local/share/bison/yacc.c. */ -#line 282 "y.tab.h" +#line 282 "asn1p_y.h" # define YYSTYPE yystype #endif diff --git a/libasn1parser/asn1p_y.y b/libasn1parser/asn1p_y.y index ce34cac6..3589a8e3 100644 --- a/libasn1parser/asn1p_y.y +++ b/libasn1parser/asn1p_y.y @@ -1123,14 +1123,14 @@ WithSyntaxList: WithSyntaxToken: TOK_whitespace { - $$ = asn1p_wsyntx_chunk_frombuf($1.buf, $1.len, 0); + $$ = asn1p_wsyntx_chunk_fromstring($1.buf, 0); $$->type = WC_WHITESPACE; } | TOK_Literal { - $$ = asn1p_wsyntx_chunk_frombuf($1, strlen($1), 0); + $$ = asn1p_wsyntx_chunk_fromstring($1, 0); } | PrimitiveFieldReference { - $$ = asn1p_wsyntx_chunk_frombuf($1.name, strlen($1.name), 0); + $$ = asn1p_wsyntx_chunk_fromstring($1.name, 0); $$->type = WC_FIELD; } | '[' WithSyntaxList ']' { -- cgit v1.2.3