[Redbutton-devel] SF.net SVN: redbutton: [443] redbutton-author/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-10-17 16:07:34
|
Revision: 443
http://redbutton.svn.sourceforge.net/redbutton/?rev=443&view=rev
Author: skilvington
Date: 2007-10-17 09:07:23 -0700 (Wed, 17 Oct 2007)
Log Message:
-----------
don't think we are going to need this
Modified Paths:
--------------
redbutton-author/trunk/asn1decode.c.header
redbutton-author/trunk/ccc.y
Modified: redbutton-author/trunk/asn1decode.c.header
===================================================================
--- redbutton-author/trunk/asn1decode.c.header 2007-10-16 16:12:48 UTC (rev 442)
+++ redbutton-author/trunk/asn1decode.c.header 2007-10-17 16:07:23 UTC (rev 443)
@@ -1,3 +1,6 @@
+#include <stdio.h>
+#include <stdbool.h>
+
#include "asn1decode.h"
#include "der_decode.h"
#include "asn1tag.h"
@@ -4,6 +7,17 @@
void verbose(char *, ...);
+bool keep_tag(unsigned int tagclass)
+{
+/* TODO: is this function needed? */
+return true;
+ if(ASN1TAGCLASS_GroupIdentifier == ASN1TAG_SYNTHETIC
+ || ASN1TAGCLASS_GroupIdentifier == ASN1TAGCLASS_ENUMERATED)
+ return true;
+ else
+ return false;
+}
+
int asn1decode_BOOLEAN(FILE *der, FILE *out, int length)
{
int left = length;
Modified: redbutton-author/trunk/ccc.y
===================================================================
--- redbutton-author/trunk/ccc.y 2007-10-16 16:12:48 UTC (rev 442)
+++ redbutton-author/trunk/ccc.y 2007-10-17 16:07:23 UTC (rev 443)
@@ -825,8 +825,7 @@
buf_append(&state.decode_fns, "\tleft -= sublen;\n\n");
buf_append(&state.decode_fns, "\tif(is_%s(tag.class, tag.number))\n\t{\n", item->name);
/* if it is a synthetic or ENUMERATED type, we still need the current tag */
- buf_append(&state.decode_fns, "\t\tif(ASN1TAGCLASS_%s == ASN1TAG_SYNTHETIC\n", item->name);
- buf_append(&state.decode_fns, "\t\t|| ASN1TAGCLASS_%s == ASN1TAGCLASS_ENUMERATED)\n", item->name);
+ buf_append(&state.decode_fns, "\t\tif(keep_tag(ASN1TAGCLASS_%s))\n", item->name);
buf_append(&state.decode_fns, "\t\t{\n");
buf_append(&state.decode_fns, "\t\t\tfseek(der, pretag, SEEK_SET);\n");
buf_append(&state.decode_fns, "\t\t\tasn1decode_%s(der, out, sublen + tag.length);\n", item->name);
@@ -882,8 +881,7 @@
/* is it what we expect */
buf_append(&state.decode_fns, "\tif(is_%s(tag.class, tag.number))\n\t{\n", item->name);
/* if it is a synthetic or ENUMERATED type, we still need the current tag */
- buf_append(&state.decode_fns, "\t\tif(ASN1TAGCLASS_%s == ASN1TAG_SYNTHETIC\n", item->name);
- buf_append(&state.decode_fns, "\t\t|| ASN1TAGCLASS_%s == ASN1TAGCLASS_ENUMERATED)\n", item->name);
+ buf_append(&state.decode_fns, "\t\tif(keep_tag(ASN1TAGCLASS_%s))\n", item->name);
buf_append(&state.decode_fns, "\t\t{\n");
buf_append(&state.decode_fns, "\t\t\tfseek(der, pretag, SEEK_SET);\n");
buf_append(&state.decode_fns, "\t\t\tasn1decode_%s(der, out, sublen + tag.length);\n", item->name);
@@ -932,8 +930,7 @@
first = false;
buf_append(&state.decode_fns, "if(is_%s(tag.class, tag.number))\n\t\t{\n", item->name);
/* if it is a synthetic or ENUMERATED type, we still need the current tag */
- buf_append(&state.decode_fns, "\t\t\tif(ASN1TAGCLASS_%s == ASN1TAG_SYNTHETIC\n", item->name);
- buf_append(&state.decode_fns, "\t\t\t|| ASN1TAGCLASS_%s == ASN1TAGCLASS_ENUMERATED)\n", item->name);
+ buf_append(&state.decode_fns, "\t\t\tif(keep_tag(ASN1TAGCLASS_%s))\n", item->name);
buf_append(&state.decode_fns, "\t\t\t{\n");
buf_append(&state.decode_fns, "\t\t\t\tfseek(der, pretag, SEEK_SET);\n");
buf_append(&state.decode_fns, "\t\t\t\tasn1decode_%s(der, out, sublen + tag.length);\n", item->name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|