rpms/snacc/EL-5 import.log, NONE, 1.1 snacc-bts-442873.patch, NONE, 1.1 snacc-configure.patch, NONE, 1.1 snacc-examples.patch, NONE, 1.1 snacc-gcc.patch, NONE, 1.1 snacc-ttab-tex-UTF8-fix.patch, NONE, 1.1 snacc.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Shakthi Kannan
shakthimaan at fedoraproject.org
Wed Sep 30 03:47:02 UTC 2009
- Previous message (by thread): rpms/etckeeper/devel etckeeper.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/snacc/F-10 import.log, NONE, 1.1 snacc-bts-442873.patch, NONE, 1.1 snacc-configure.patch, NONE, 1.1 snacc-examples.patch, NONE, 1.1 snacc-gcc.patch, NONE, 1.1 snacc-ttab-tex-UTF8-fix.patch, NONE, 1.1 snacc.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: shakthimaan
Update of /cvs/pkgs/rpms/snacc/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31714/EL-5
Modified Files:
.cvsignore sources
Added Files:
import.log snacc-bts-442873.patch snacc-configure.patch
snacc-examples.patch snacc-gcc.patch
snacc-ttab-tex-UTF8-fix.patch snacc.spec
Log Message:
First snacc package.
--- NEW FILE import.log ---
snacc-1_3-4_fc11:EL-5:snacc-1.3-4.fc11.src.rpm:1254282754
snacc-bts-442873.patch:
snacc-config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE snacc-bts-442873.patch ---
diff -uraN snacc-1.3bbn.orig/snacc-config.in snacc-1.3bbn/snacc-config.in
--- snacc-1.3bbn.orig/snacc-config.in 2001-01-27 02:02:40.000000000 +0100
+++ snacc-1.3bbn/snacc-config.in 2008-04-16 01:19:43.153755670 +0200
@@ -95,7 +95,7 @@
if test $exec_prefix != /usr; then echo -n "-L${exec_prefix}/lib "; fi
case "$language" in
C) echo -n "-lasn1c${buffertype} " ;;
- C++) echo -n "-Iasn1c++ " ;;
+ C++) echo -n "-lasn1c++ " ;;
*) ;;
esac
else
snacc-configure.patch:
configure.ac | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.in | 305 ---------------------------------------------------------
2 files changed, 313 insertions(+), 305 deletions(-)
--- NEW FILE snacc-configure.patch ---
diff -uraN snacc-1.3bbn/configure.ac snacc-1.3bbn-debian/configure.ac
--- snacc-1.3bbn/configure.ac 1970-01-01 00:00:00.000000000 +0000
+++ snacc-1.3bbn-debian/configure.ac 2005-07-30 17:20:35.043753552 +0000
@@ -0,0 +1,313 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl ---
+dnl $Log: configure.ac,v $
+dnl Revision 1.3 2002/11/19 20:28:12 debacle
+dnl libtool changes.
+dnl
+dnl Revision 1.2 2002/11/19 19:37:38 debacle
+dnl Auto-tools stuff.
+dnl
+dnl Revision 1.1 2002/11/19 19:18:04 debacle
+dnl New autoconf.
+dnl
+dnl Revision 1.13 1997/09/04 13:54:04 wan
+dnl A little more portability
+dnl
+dnl Revision 1.12 1997/02/28 13:39:35 wan
+dnl Modifications collected for new version 1.3: Bug fixes, tk4.2.
+dnl
+dnl Revision 1.11 1997/02/16 16:50:27 rj
+dnl made return *this after calling abort()'' a compile time option.
+dnl
+dnl Revision 1.10 1997/02/15 20:06:27 rj
+dnl adjust to changed AC_TRY_COMPILE macro
+dnl
+dnl Revision 1.9 1997/02/15 20:01:38 rj
+dnl check whether the compiler supports volatile functions (and whether abort() is volatile).
+dnl
+dnl Revision 1.8 1997/01/01 19:57:01 rj
+dnl changes for autoconf version 2.12
+dnl
+dnl Revision 1.7 1995/09/07 18:36:47 rj
+dnl psbook and psnup are looked for (used by .../doc/makefile)
+dnl
+dnl Revision 1.6 1995/07/24 14:44:47 rj
+dnl don't use gcc/g++ with -pipe, compiling some files may exceed virtual memory.
+dnl
+dnl look for tclsh(1). tcl-lib uses it to construct the tclIndex file. don't look for Tcl/Tk if the tclsh is absent.
+dnl
+dnl look for patch(1). the c-lib uses it to patch tbl.h.
+dnl
+dnl search for tree-3.6's libtktree.a and set TREELIBS in .../makehead accordingly.
+dnl
+dnl check for memset(3), memcpy(3) and memcmp(3). .../snacc.h reverts to bzero(3), bcopy(3) and bcmp(3) if necessary.
+dnl
+dnl Revision 1.5 1995/02/20 11:18:41 rj
+dnl cpp switch HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS added.
+dnl check for isinf(3) and finite(3) added.
+dnl
+dnl Revision 1.4 1995/02/17 15:15:44 rj
+dnl hack to let makedepend find .h files the way gcc does.
+dnl
+dnl Revision 1.3 1995/02/17 14:26:40 rj
+dnl adjustments for autoconf 2.x
+dnl
+dnl Revision 1.2 1994/10/08 04:29:37 rj
+dnl search for Tcl/Tk
+dnl
+dnl Revision 1.1 1994/09/01 00:51:22 rj
+dnl first check-in (new file).
+dnl
+AC_INIT( compiler/core/snacc.c)
+AC_REVISION($Revision: 1.3 $)
+AM_INIT_AUTOMAKE(snacc, 1.3)
+AM_CONFIG_HEADER( config.h)
+dnl --- alternative programs:
+AC_PROG_MAKE_SET
+AC_PROG_CC
+AC_ISC_POSIX
+dnl if CDPATH is set, the configure script might fail
+unset CDPATH
+dnl if test -n "$GCC"; then
+dnl saveCC="$CC"
+dnl CC="$CC -pipe"
+dnl AC_MSG_CHECKING( whether $saveCC takes -pipe)
+dnl AC_TRY_LINK( , , [AC_MSG_RESULT( yes)], [AC_MSG_RESULT( no); CC="$saveCC"])
+dnl fi
+AC_PROG_GCC_TRADITIONAL
+AC_MSG_CHECKING( whether ANSI or K&R style C)
+AC_TRY_COMPILE([ ], [void *p; p = "test";], [
+AC_MSG_RESULT(ANSI)
+AC_DEFINE( __USE_ANSI_C__)
+], [
+AC_MSG_RESULT(K&R)
+])
+AC_PROG_CXX
+AC_LANG_CPLUSPLUS
+dnl if test -n "$GCC"; then
+dnl saveCXX="$CXX"
+dnl CXX="$CXX -pipe"
+dnl AC_MSG_CHECKING( whether $saveCXX takes -pipe)
+dnl AC_TRY_LINK( , , [AC_MSG_RESULT( yes)], [AC_MSG_RESULT( no);CC="$saveCC"])
+dnl fi
+AC_MSG_CHECKING( for bool built-in)
+AC_TRY_COMPILE( , bool b = false;, [AC_DEFINE( BOOL_BUILTIN) AC_MSG_RESULT( yes)], AC_MSG_RESULT( no))
+AC_MSG_CHECKING( for variable sized automatic arrays)
+AC_TRY_COMPILE( , changequote(<,>)int i = 42; char a[++i]; *a = i;changequote([,]), [AC_DEFINE( HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS) AC_MSG_RESULT( yes)], AC_MSG_RESULT( no))
+AC_MSG_CHECKING( for volatile functions)
+AC_TRY_COMPILE( , changequote(<,>)abort();changequote([,]), [AC_MSG_RESULT( yes)], [AC_DEFINE( COMPILER_WITHOUT_VOLATILE_FUNCTIONS) SNACC_NOVOLAT=-novolat; AC_SUBST( SNACC_NOVOLAT) AC_MSG_RESULT( no)])
+AC_LANG_C
+AM_PROG_LEX
+case "$LEX" in
+ lex)
+ LFLAGS="-Nc10000"
+ ;;
+ flex)
+ CFLAGS="$CFLAGS -DFLEX_IN_USE"
+esac
+AC_SUBST( LFLAGS)
+AC_SUBST( CFLAGS)
+# the boot strapping code in .../c-lib/ needs patch:
+AC_CHECK_PROGS( PATCH, patch, false)
+AC_PROG_YACC
+AC_PROG_LN_S
+AC_PROG_INSTALL
+dnl --- header files:
+AC_HEADER_TIME
+AC_HEADER_DIRENT
+AC_TYPE_SIZE_T
+AC_TYPE_UID_T
+AC_HEADER_STDC
+AC_CHECK_HEADERS( unistd.h memory.h string.h malloc.h fcntl.h)
+AC_FUNC_VPRINTF
+dnl --- system and compiler characteristics:
+AC_C_CONST
+AC_C_BIGENDIAN
+AC_CHECK_SIZEOF(short, 2)
+AC_CHECK_SIZEOF(int, 4)
+AC_CHECK_SIZEOF(long, 4)
+AC_CHECK_SIZEOF(double, 8)
+AC_CHECK_LIB( m, sin)
+AC_CHECK_FUNCS( isinf finite)
+AC_CHECK_FUNCS( memset memcpy memcmp)
+dnl ---
+AC_PATH_X
+AC_PATH_XTRA
+AC_CHECK_PROGS( TCLSH, tclsh, false)
+if test "$TCLSH" != false && test "x$no_x" != "xyes"; then
+ AC_CHECK_HEADER(
+ tcl.h,
+ [AC_CHECK_LIB( ld, ldopen, TCLOTHERLIBS=-lld)
+ AC_CHECK_LIB(
+ tcl,
+ Tcl_CreateInterp,
+ [saveCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ AC_CHECK_LIB(
+ tk,
+ Tk_CreateWindow,
+ [AC_DEFINE( HAVE_TCL)
+ TCLLIBS="-ltk -ltcl $TCLOTHERLIBS"
+ CXXTCLDIR="tcl"
+ TCLDIRS="tcl-lib tcl-asn tcl-example"
+ AC_LANG_CPLUSPLUS
+ AC_CHECK_LIB(
+ TkTree,
+ Tree_Init,
+ [TREELIBS="-lTkTree"],
+ [AC_MSG_RESULT( [tcl/tk libs found, but tree widget is missing])],
+ -lTkTree -ltk -ltcl $TCLOTHERLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
+ AC_LANG_C],
+ [AC_MSG_RESULT( [tcl lib found, but tk lib is missing])],
+ -ltcl $TCLOTHERLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
+ CFLAGS="$saveCFLAGS"],
+ [AC_MSG_RESULT( [tcl library not found])],
+ $TCLOTHERLIBS -lm)])
+fi
+AC_SUBST( CXXTCLDIR)
+AC_SUBST( TCLDIRS)
+AC_SUBST( TCLLIBS)
+AC_SUBST( TREELIBS)
+dnl ---
+AC_CHECK_PROGS( LATEX, latex, false)
+AC_CHECK_PROGS( BIBTEX, bibtex, false)
+AC_CHECK_PROGS( DVIPS, dvips, false)
+AC_CHECK_PROGS( DETEX, detex2 detex, false)
+AC_CHECK_PROGS( PSPREVIEW, ghostview gs, true)
+AC_CHECK_PROGS( PSBOOK, psbook, false)
+AC_CHECK_PROGS( PSNUP, psnup, false)
+AC_CHECK_PROGS( SPELL, ispell spell, spell)
+dnl ---
+
+dnl Configure for libtool.
+AC_PROG_LIBTOOL
+
+dnl Generate the C library build directories.
+linked_files=`cd c-lib/src && ls *.c`
+for dir in Cebuf ebuf mbuf sbuf tbl; do
+ if test -d c-lib/$dir; then :; else
+ echo creating c-lib/$dir
+ mkdir c-lib/$dir
+ fi
+ (cd c-lib/$dir && touch Makefile.am && rm -f Makefile.in $linked_files && $LN_S ../src/*.c . )
+ sed_code="-e s/libasn1cbuf/libasn1c$dir/g"
+ case $dir in
+ Cebuf)
+ (cd c-lib/$dir && rm -f asn-useful.c asn-useful.h tbl.c tbl.h && $LN_S ../boot/asn* ../boot/tbl* .)
+ sed_code="$sed_code -e s/^.*asn-useful\.c:/neverA:/ -e s/^.*tbl\.c:/neverB:/"
+ BUFFLAGS="-DCOMPILER -DUSE_NIBBLE_MEMORY=0 -DUSE_EXP_BUF -I\$(top_srcdir)/compiler/core"
+ ;;
+ ebuf) BUFFLAGS="-DUSE_EXP_BUF" ;;
+ mbuf) BUFFLAGS="-DUSE_MIN_BUF" ;;
+ sbuf) BUFFLAGS="-DUSE_SBUF" ;;
+ tbl) BUFFLAGS="-DUSE_GEN_BUF -DTTBL" ;;
+ esac
+ echo "BUFFLAGS = $BUFFLAGS" >> c-lib/$dir/Makefile.in
+ eval sed $sed_code < c-lib/src/Makefile.in >> c-lib/$dir/Makefile.in
+done
+
+dnl Generate the C++ and Tcl library build directories.
+linked_files=`cd c++-lib/src && ls *.c *.C`
+for dir in c++ tcl; do
+ if test -d c++-lib/$dir; then :; else
+ echo creating c++-lib/$dir
+ mkdir c++-lib/$dir
+ fi
+ (cd c++-lib/$dir && touch Makefile.am && rm -f Makefile.in $linked_files && $LN_S ../src/*.c ../src/*.C .)
+ sed_code="-e s/libasn1cxxtcl/libasn1$dir/g"
+ case $dir in
+ c++) BUFFLAGS="-DMETA=0" sed_code="$sed_code -e s/noinst/lib/g";;
+ tcl) BUFFLAGS="-DTCL" sed_code="$sed_code -e s/noinst/lib/g";;
+ esac
+ echo "BUFFLAGS = $BUFFLAGS" >> c++-lib/$dir/Makefile.in
+ eval sed $sed_code < c++-lib/src/Makefile.in >> c++-lib/$dir/Makefile.in
+done
+
+dnl Generate snaccconfig.h. The whether-to-generate logic is cribbed
+dnl from glib-1.2.1's configure.in. See that file for an explanation.
+AC_OUTPUT_COMMANDS([
+
+## Generate `snaccconfig.h' in two
+## cases:
+## 1. `config.status' is run either explicitly, or via configure.
+## Esp. not when it is run in `Makefile' to generate makefiles and
+## config.h
+## 2. CONFIG_OTHER is set explicitly
+##
+## Case 1 is difficult. We know that `automake' sets one of
+## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
+## only when AM_CONFIG_HEADER is set, however.
+
+case "x$CONFIG_OTHER" in
+*snaccconfig.h) gen_snaccconfig_h=yes
+;;
+esac
+if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
+ # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
+ if test "x${CONFIG_OTHER}" = x; then
+ gen_snaccconfig_h=yes
+ fi
+fi
+
+## If we're generating snaccconfig.h:
+## FIXME - currently, snaccconfig.h is just the normal
+## config.h wrapped. this is because the user include
+## files use the normal config.h symbol names, and I
+## haven't changed those yet.
+if test "x$gen_snaccconfig_h" = xyes; then
+ outfile=snaccconfig.h
+ echo creating $outfile
+ cat <<SNACCEOF > ${outfile}-tmp
+/* snaccconfig.h
+ *
+ * This is an automatically generated file - please modify 'configure.in'.
+ */
+
+#ifndef _SNACCCONFIG_H
+#define _SNACCCONFIG_H
+
+SNACCEOF
+ egrep -v 'PACKAGE|VERSION' config.h >> ${outfile}-tmp
+ cat <<SNACCEOF >> ${outfile}-tmp
+
+#endif /* !_SNACCCONFIG_H */
+SNACCEOF
+ if cmp -s ${outfile}-tmp $outfile; then
+ echo $outfile is unchanged
+ rm -f ${outfile}-tmp
+ else
+ mv ${outfile}-tmp ${outfile}
+ fi
+fi
+])
+
+dnl Writes files.
+AC_OUTPUT(Makefile
+ compiler/Makefile
+ compiler/back-ends/c++-gen/Makefile
+ compiler/back-ends/c-gen/Makefile
+ compiler/back-ends/idl-gen/Makefile
+ compiler/back-ends/Makefile
+ compiler/core/Makefile
+ c-lib/Makefile
+ c-lib/inc/Makefile
+ c-lib/src/Makefile
+ c-lib/Cebuf/Makefile
+ c-lib/ebuf/Makefile
+ c-lib/mbuf/Makefile
+ c-lib/sbuf/Makefile
+ c-lib/tbl/Makefile
+ c++-lib/Makefile
+ c++-lib/inc/Makefile
+ c++-lib/src/Makefile
+ c++-lib/c++/Makefile
+ asn1specs/Makefile
+ tbl-tools/berdecode/Makefile
+ tbl-tools/mkchdr/Makefile
+ tbl-tools/ptbl/Makefile
+ tbl-tools/pval/Makefile
+ tbl-tools/Makefile
+ doc/Makefile
+ snacc-config,
+[if test -f snacc-config; then chmod +x snacc-config; fi])
+dnl --- finis
diff -uraN snacc-1.3bbn/configure.in snacc-1.3bbn-debian/configure.in
--- snacc-1.3bbn/configure.in 2005-07-30 20:06:02.703761472 +0000
+++ snacc-1.3bbn-debian/configure.in 1970-01-01 00:00:00.000000000 +0000
@@ -1,305 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-dnl ---
-dnl $Log: configure.in,v $
-dnl Revision 1.13 1997/09/04 13:54:04 wan
-dnl A little more portability
-dnl
-dnl Revision 1.12 1997/02/28 13:39:35 wan
-dnl Modifications collected for new version 1.3: Bug fixes, tk4.2.
-dnl
-dnl Revision 1.11 1997/02/16 16:50:27 rj
-dnl made return *this after calling abort()'' a compile time option.
-dnl
-dnl Revision 1.10 1997/02/15 20:06:27 rj
-dnl adjust to changed AC_TRY_COMPILE macro
-dnl
-dnl Revision 1.9 1997/02/15 20:01:38 rj
-dnl check whether the compiler supports volatile functions (and whether abort() is volatile).
-dnl
-dnl Revision 1.8 1997/01/01 19:57:01 rj
-dnl changes for autoconf version 2.12
-dnl
-dnl Revision 1.7 1995/09/07 18:36:47 rj
-dnl psbook and psnup are looked for (used by .../doc/makefile)
-dnl
-dnl Revision 1.6 1995/07/24 14:44:47 rj
-dnl don't use gcc/g++ with -pipe, compiling some files may exceed virtual memory.
-dnl
-dnl look for tclsh(1). tcl-lib uses it to construct the tclIndex file. don't look for Tcl/Tk if the tclsh is absent.
-dnl
-dnl look for patch(1). the c-lib uses it to patch tbl.h.
-dnl
-dnl search for tree-3.6's libtktree.a and set TREELIBS in .../makehead accordingly.
-dnl
-dnl check for memset(3), memcpy(3) and memcmp(3). .../snacc.h reverts to bzero(3), bcopy(3) and bcmp(3) if necessary.
-dnl
-dnl Revision 1.5 1995/02/20 11:18:41 rj
-dnl cpp switch HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS added.
-dnl check for isinf(3) and finite(3) added.
-dnl
-dnl Revision 1.4 1995/02/17 15:15:44 rj
-dnl hack to let makedepend find .h files the way gcc does.
-dnl
-dnl Revision 1.3 1995/02/17 14:26:40 rj
-dnl adjustments for autoconf 2.x
-dnl
-dnl Revision 1.2 1994/10/08 04:29:37 rj
-dnl search for Tcl/Tk
-dnl
-dnl Revision 1.1 1994/09/01 00:51:22 rj
-dnl first check-in (new file).
-dnl
-AC_INIT( compiler/core/snacc.c)
-AC_REVISION($Revision: 1.13 $)
-AM_INIT_AUTOMAKE(snacc, 1.3)
-AM_CONFIG_HEADER( config.h)
-dnl --- alternative programs:
-AC_PROG_MAKE_SET
-AC_PROG_CC
-AC_ISC_POSIX
-if test -n "$GCC"; then
-dnl saveCC="$CC"
-dnl CC="$CC -pipe"
-dnl AC_MSG_CHECKING( whether $saveCC takes -pipe)
-dnl AC_TRY_LINK( , , [AC_MSG_RESULT( yes)], [AC_MSG_RESULT( no); CC="$saveCC"])
-fi
-AC_PROG_GCC_TRADITIONAL
-AC_MSG_CHECKING( whether ANSI or K&R style C)
-AC_TRY_COMPILE([ ], [void *p; p = "test";], [
-AC_MSG_RESULT(ANSI)
-AC_DEFINE( __USE_ANSI_C__)
-], [
-AC_MSG_RESULT(K&R)
-])
-AC_PROG_CXX
-AC_LANG_CPLUSPLUS
-dnl if test -n "$GCC"; then
-dnl saveCXX="$CXX"
-dnl CXX="$CXX -pipe"
-dnl AC_MSG_CHECKING( whether $saveCXX takes -pipe)
-dnl AC_TRY_LINK( , , [AC_MSG_RESULT( yes)], [AC_MSG_RESULT( no);CC="$saveCC"])
-dnl fi
-AC_MSG_CHECKING( for bool built-in)
-AC_TRY_COMPILE( , bool b = false;, [AC_DEFINE( BOOL_BUILTIN) AC_MSG_RESULT( yes)], AC_MSG_RESULT( no))
-AC_MSG_CHECKING( for variable sized automatic arrays)
-AC_TRY_COMPILE( , changequote(<,>)int i = 42; char a[++i]; *a = i;changequote([,]), [AC_DEFINE( HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS) AC_MSG_RESULT( yes)], AC_MSG_RESULT( no))
-AC_MSG_CHECKING( for volatile functions)
-AC_TRY_COMPILE( , changequote(<,>)abort();changequote([,]), [AC_MSG_RESULT( yes)], [AC_DEFINE( COMPILER_WITHOUT_VOLATILE_FUNCTIONS) SNACC_NOVOLAT=-novolat; AC_SUBST( SNACC_NOVOLAT) AC_MSG_RESULT( no)])
-AC_LANG_C
-AM_PROG_LEX
-case "$LEX" in
- lex)
- LFLAGS="-Nc10000"
- ;;
- flex)
- CFLAGS="$CFLAGS -DFLEX_IN_USE"
-esac
-AC_SUBST( LFLAGS)
-AC_SUBST( CFLAGS)
-# the boot strapping code in .../c-lib/ needs patch:
-AC_CHECK_PROGS( PATCH, patch, false)
-AC_PROG_YACC
-AC_PROG_LN_S
-AC_PROG_INSTALL
-dnl --- header files:
-AC_HEADER_TIME
-AC_HEADER_DIRENT
-AC_TYPE_SIZE_T
-AC_TYPE_UID_T
-AC_HEADER_STDC
-AC_CHECK_HEADERS( unistd.h memory.h string.h malloc.h fcntl.h)
-AC_FUNC_VPRINTF
-dnl --- system and compiler characteristics:
-AC_C_CONST
-AC_C_BIGENDIAN
-AC_CHECK_SIZEOF(short, 2)
-AC_CHECK_SIZEOF(int, 4)
-AC_CHECK_SIZEOF(long, 4)
-AC_CHECK_SIZEOF(double, 8)
-AC_CHECK_LIB( m, sin)
-AC_CHECK_FUNCS( isinf finite)
-AC_CHECK_FUNCS( memset memcpy memcmp)
-dnl ---
-AC_PATH_X
-AC_PATH_XTRA
-AC_CHECK_PROGS( TCLSH, tclsh, false)
-if test "$TCLSH" != false && test "x$no_x" != "xyes"; then
- AC_CHECK_HEADER(
- tcl.h,
- [AC_CHECK_LIB( ld, ldopen, TCLOTHERLIBS=-lld)
- AC_CHECK_LIB(
- tcl,
- Tcl_CreateInterp,
- [saveCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $X_CFLAGS"
- AC_CHECK_LIB(
- tk,
- Tk_CreateWindow,
- [AC_DEFINE( HAVE_TCL)
- TCLLIBS="-ltk -ltcl $TCLOTHERLIBS"
- CXXTCLDIR="tcl"
- TCLDIRS="tcl-lib tcl-asn tcl-example"
- AC_LANG_CPLUSPLUS
- AC_CHECK_LIB(
- TkTree,
- Tree_Init,
- [TREELIBS="-lTkTree"],
- [AC_MSG_RESULT( [tcl/tk libs found, but tree widget is missing])],
- -lTkTree -ltk -ltcl $TCLOTHERLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
- AC_LANG_C],
- [AC_MSG_RESULT( [tcl lib found, but tk lib is missing])],
- -ltcl $TCLOTHERLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
- CFLAGS="$saveCFLAGS"],
- [AC_MSG_RESULT( [tcl library not found])],
- $TCLOTHERLIBS -lm)])
-fi
-AC_SUBST( CXXTCLDIR)
-AC_SUBST( TCLDIRS)
-AC_SUBST( TCLLIBS)
-AC_SUBST( TREELIBS)
-dnl ---
-AC_CHECK_PROGS( LATEX, latex, false)
-AC_CHECK_PROGS( BIBTEX, bibtex, false)
-AC_CHECK_PROGS( DVIPS, dvips, false)
-AC_CHECK_PROGS( DETEX, detex2 detex, false)
-AC_CHECK_PROGS( PSPREVIEW, ghostview gs, true)
-AC_CHECK_PROGS( PSBOOK, psbook, false)
-AC_CHECK_PROGS( PSNUP, psnup, false)
-AC_CHECK_PROGS( SPELL, ispell spell, spell)
-dnl ---
-
-dnl Configure for libtool.
-AM_PROG_LIBTOOL
-LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
-AC_SUBST(LTLIBOBJS)
-
-dnl Generate the C library build directories.
-linked_files=`cd c-lib/src && ls *.c`
-for dir in Cebuf ebuf mbuf sbuf tbl; do
- if test -d c-lib/$dir; then :; else
- echo creating c-lib/$dir
- mkdir c-lib/$dir
- fi
- (cd c-lib/$dir && touch Makefile.am && rm -f Makefile.in $linked_files && $LN_S ../src/*.c . )
- sed_code="-e s/libasn1cbuf/libasn1c$dir/g"
- case $dir in
- Cebuf)
- (cd c-lib/$dir && rm -f asn-useful.c asn-useful.h tbl.c tbl.h && $LN_S ../boot/asn* ../boot/tbl* .)
- sed_code="$sed_code -e s/^.*asn-useful\.c:/neverA:/ -e s/^.*tbl\.c:/neverB:/"
- BUFFLAGS="-DCOMPILER -DUSE_NIBBLE_MEMORY=0 -DUSE_EXP_BUF -I\$(top_srcdir)/compiler/core"
- ;;
- ebuf) BUFFLAGS="-DUSE_EXP_BUF" ;;
- mbuf) BUFFLAGS="-DUSE_MIN_BUF" ;;
- sbuf) BUFFLAGS="-DUSE_SBUF" ;;
- tbl) BUFFLAGS="-DUSE_GEN_BUF -DTTBL" ;;
- esac
- echo "BUFFLAGS = $BUFFLAGS" >> c-lib/$dir/Makefile.in
- eval sed $sed_code < c-lib/src/Makefile.in >> c-lib/$dir/Makefile.in
-done
-
-dnl Generate the C++ and Tcl library build directories.
-linked_files=`cd c++-lib/src && ls *.c *.C`
-for dir in c++ tcl; do
- if test -d c++-lib/$dir; then :; else
- echo creating c++-lib/$dir
- mkdir c++-lib/$dir
- fi
- (cd c++-lib/$dir && touch Makefile.am && rm -f Makefile.in $linked_files && $LN_S ../src/*.c ../src/*.C .)
- sed_code="-e s/libasn1cxxtcl/libasn1$dir/g"
- case $dir in
- c++) BUFFLAGS="-DMETA=0" sed_code="$sed_code -e s/noinst/lib/g";;
- tcl) BUFFLAGS="-DTCL" sed_code="$sed_code -e s/noinst/lib/g";;
- esac
- echo "BUFFLAGS = $BUFFLAGS" >> c++-lib/$dir/Makefile.in
- eval sed $sed_code < c++-lib/src/Makefile.in >> c++-lib/$dir/Makefile.in
-done
-
-dnl Generate snaccconfig.h. The whether-to-generate logic is cribbed
-dnl from glib-1.2.1's configure.in. See that file for an explanation.
-AC_OUTPUT_COMMANDS([
-
-## Generate `snaccconfig.h' in two
-## cases:
-## 1. `config.status' is run either explicitly, or via configure.
-## Esp. not when it is run in `Makefile' to generate makefiles and
-## config.h
-## 2. CONFIG_OTHER is set explicitly
-##
-## Case 1 is difficult. We know that `automake' sets one of
-## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
-## only when AM_CONFIG_HEADER is set, however.
-
-case "x$CONFIG_OTHER" in
-*snaccconfig.h) gen_snaccconfig_h=yes
-;;
-esac
-if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
- # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
- if test "x${CONFIG_OTHER}" = x; then
- gen_snaccconfig_h=yes
- fi
-fi
-
-## If we're generating snaccconfig.h:
-## FIXME - currently, snaccconfig.h is just the normal
-## config.h wrapped. this is because the user include
-## files use the normal config.h symbol names, and I
-## haven't changed those yet.
-if test "x$gen_snaccconfig_h" = xyes; then
- outfile=snaccconfig.h
- echo creating $outfile
- cat <<SNACCEOF > ${outfile}-tmp
-/* snaccconfig.h
- *
- * This is an automatically generated file - please modify 'configure.in'.
- */
-
-#ifndef _SNACCCONFIG_H
-#define _SNACCCONFIG_H
-
-SNACCEOF
- egrep -v 'PACKAGE|VERSION' config.h >> ${outfile}-tmp
- cat <<SNACCEOF >> ${outfile}-tmp
-
-#endif /* !_SNACCCONFIG_H */
-SNACCEOF
- if cmp -s ${outfile}-tmp $outfile; then
- echo $outfile is unchanged
- rm -f ${outfile}-tmp
- else
- mv ${outfile}-tmp ${outfile}
- fi
-fi
-])
-
-dnl Writes files.
-AC_OUTPUT(Makefile
- compiler/Makefile
- compiler/back-ends/c++-gen/Makefile
- compiler/back-ends/c-gen/Makefile
- compiler/back-ends/idl-gen/Makefile
- compiler/back-ends/Makefile
- compiler/core/Makefile
- c-lib/Makefile
- c-lib/inc/Makefile
- c-lib/src/Makefile
- c-lib/Cebuf/Makefile
- c-lib/ebuf/Makefile
- c-lib/mbuf/Makefile
- c-lib/sbuf/Makefile
- c-lib/tbl/Makefile
- c++-lib/Makefile
- c++-lib/inc/Makefile
- c++-lib/src/Makefile
- c++-lib/c++/Makefile
- c++-lib/tcl/Makefile
- asn1specs/Makefile
- tbl-tools/berdecode/Makefile
- tbl-tools/mkchdr/Makefile
- tbl-tools/ptbl/Makefile
- tbl-tools/pval/Makefile
- tbl-tools/Makefile
- doc/Makefile
- snacc-config,
-[if test -f snacc-config; then chmod +x snacc-config; fi])
-dnl --- finis
snacc-examples.patch:
c++-examples/any/README | 90 +++
c++-examples/any/example.C | 115 ++++
c++-examples/any/genber.C | 150 +++++
c++-examples/any/makefile | 154 ++++++
c++-examples/makefile | 34 +
c++-examples/simple/README | 105 ++++
c++-examples/simple/example.C | 115 ++++
c++-examples/simple/genber.C | 99 +++
c++-examples/simple/good-pr.ber.uu | 7
c++-examples/simple/makefile | 146 +++++
c++-examples/snmp/README | 126 ++++
c++-examples/snmp/makefile | 103 ++++
c++-examples/test-lib/README | 37 +
c++-examples/test-lib/makefile | 59 ++
c++-examples/test-lib/test-lib.C | 781 ++++++++++++++++++++++++++++++
c-examples/any/README | 107 ++++
c-examples/any/example.c | 161 ++++++
c-examples/any/genber.c | 164 ++++++
c-examples/any/makefile | 144 +++++
c-examples/makefile | 42 +
c-examples/simple/README | 128 +++++
c-examples/simple/expbuf-ex.c | 166 ++++++
c-examples/simple/genber.c | 154 ++++++
c-examples/simple/good-pr.ber.uu | 7
c-examples/simple/makefile | 198 +++++++
c-examples/simple/minbuf-ex.c | 162 ++++++
c-examples/simple/sbuf-ex.c | 154 ++++++
c-examples/snmp/README | 118 ++++
c-examples/snmp/makefile | 91 +++
c-examples/test-lib/README | 37 +
c-examples/test-lib/makefile | 50 +
c-examples/test-lib/test-lib.c | 935 +++++++++++++++++++++++++++++++++++++
tbl-example/README | 83 +++
tbl-example/example.c | 174 ++++++
tbl-example/makefile | 82 +++
tbl-example/p-rec.ber.uu | 7
36 files changed, 5285 insertions(+)
--- NEW FILE snacc-examples.patch ---
diff -uraN snacc-1.3bbn/c++-examples/any/README snacc-1.3b4/c++-examples/any/README
--- snacc-1.3bbn/c++-examples/any/README 1970-01-01 00:00:00.000000000 +0000
+++ snacc-1.3b4/c++-examples/any/README 1997-02-16 20:25:26.000000000 +0000
@@ -0,0 +1,90 @@
+(RCS control information is at the end of this file.)
+
+
+C++ ANY example README
+---------------------
+
+This example shows how the snacc compiler handles the ANY DEFINED BY
+type in C++. ANY types (not ANY DEFINED BY) require modifications
+to the generated code. Type "make" to build this example.
+
+This directory should have the following 4 files in it:
+
+ README
+ example.C
+ genber.C
+ makefile
+
+There are 3 programs generated by the makefile:
+
+ genber - builds a BER value of the AnyTestType and writes it
+ to a file called "att.ber"
+
+ def - takes file name of an AnyTestType BER value. Decodes the
+ file and re-encodes it to stdout. Uses definite
+ lengths for constructed values.
+
+ indef - takes file name of an AnyTestType BER value. Decodes the
+ file and re-encodes it to stdout. Uses indefinite
+ lengths for constructed values.
+
+
+These files use the code generated by snacc from the
+snacc/asn1specs/any.asn1 file. (see the makefile)
+
+Look at genber.C to see how values can be built and printed.
+
+Look at the generated code in any_test.C and any_test.h to see how the
+any hash table is built.
+
+
+try the following commands in your c-shell:
+
+%1 genber # generate the att.ber file
+%2 indef att.ber > tmp.ber # decode att.ber an re-encode into tmp.ber
+%3 def tmp.ber > tmp2.ber # decode tmp.ber an re-encode into tmp2.ber
+%4 diff att.ber tmp2.ber # compare .ber files (should be the same)
+
+When you are finished with the example type "make clean" to remove
+the binaries and generated code.
+
+
+
+Things To Note
+--------------
+
+Snacc ASN.1 comment commands
+
+In the snacc/asn1specs/any.asn1 file, the AnyTestType has a special
+"--snacc" ASN.1 comment after ::= to give snacc some extra information
+about the AnyTestType.
+
+AnyTestType ::= --snacc isPdu:"TRUE" -- SEQUENCE { ... etc. ... }
+
+The "isPdu" flag only affects the generated C code, not C++. Each
+C++ type gets PDU methods by default.
+
+
+SNMP OBJECT-TYPE Macro
+
+The SNMP OBJECT-TYPE macro is used to define the id value to type
+mapping for ANY DEFINED BY types. The macro has been modified to
+accept both INTEGERs and OBJECT IDENTIFIERs as id values (see
+snacc/asn1specs/any.asn1). This macro can be used with other
+protocols to define the id to type mapping.
+
+Two hash tables are used to hold the id to type mappings. One for
+INTEGER to type mappings and the other for OBJECT IDENTIFIER to type
+mappings. The hash tables are automatically initialized in each
+module that has OBJECT-TYPE macros. In C the hash table must be
+explicitly initialized.
+
+#-------------------------------------------------------------------------------
+# $Header: /usr/app/odstb/CVS/snacc/c++-examples/any/README,v 1.2 1997/02/16 20:25:26 rj Exp $
+# $Log: README,v $
+# Revision 1.2 1997/02/16 20:25:26 rj
+# check-in of a few cosmetic changes
+#
+# Revision 1.1 1994/08/31 08:47:59 rj
+# first check-in. for a list of changes to the snacc-1.1 distribution please refer to the ChangeLog.
+#
diff -uraN snacc-1.3bbn/c++-examples/any/example.C snacc-1.3b4/c++-examples/any/example.C
--- snacc-1.3bbn/c++-examples/any/example.C 1970-01-01 00:00:00.000000000 +0000
+++ snacc-1.3b4/c++-examples/any/example.C 1995-07-24 15:33:33.000000000 +0000
@@ -0,0 +1,115 @@
+// c++_examples/any/example.C - an example of how to use C++ ASN.1-BER
+// for ANY Types
+//
+// AUTHOR: Mike Sample
+// DATE: 92
+//
+// $Header: /usr/app/odstb/CVS/snacc/c++-examples/any/example.C,v 1.5 1995/07/24 15:33:33 rj Exp $
+// $Log: example.C,v $
+// Revision 1.5 1995/07/24 15:33:33 rj
+// changed `_' to `-' in file names.
+//
+// any-test.[hC] becomes any.[hC] due to to snacc's new file name generation scheme.
+//
+// check return value of new.
+//
+// Revision 1.4 1995/02/18 13:53:07 rj
+// added #define HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS since not every C++ compiler provides them.
+//
+// Revision 1.3 1994/10/08 01:26:21 rj
+// several \size_t'
+//
+// Revision 1.2 1994/08/31 08:56:29 rj
+// first check-in. for a list of changes to the snacc-1.1 distribution please refer to the ChangeLog.
+//
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <fstream.h>
+
+#include "asn-incl.h"
+#include "any.h"
+
+main (int argc, char *argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "Usage: " << argv[0] << " <BER data file name>" << endl;
+ cerr << " Decodes the given AnyTestType BER data file" << endl;
+ cerr << " and re-encodes it to stdout" << endl;
+ exit (1);
+ }
+
+ ifstream dataFile;
+ // open the data file
+ dataFile.open (argv[1]);
+
+ if (!dataFile)
+ {
+ perror ("ifstream::open");
+ exit (1);
+ }
+
+ // get size of the data file file
+ dataFile.seekg (0, ios::end);
+ int dataSize = dataFile.tellg();
+ dataFile.seekg (0);
+
+ // read data from file into contiguous block for a buffer
+#if HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS
+ char data[dataSize];
+#else
+ char *data = new char[dataSize];
+ if (!data)
+ return 1;
+#endif /* HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS */
+ dataFile.read (data, dataSize);
+ dataFile.close();
+
+ //
+ // put the BER data read from the file
+ // into buffer format, ready for reading from the
+ // beginning
+ //
+ AsnBuf inputBuf;
+ inputBuf.InstallData ((char*)data, dataSize);
+
+ size_t decodedLen;
+ AnyTestType att;
+
+ if (!att.BDecPdu (inputBuf, decodedLen))
+ {
+ cerr << "ERROR - Decode routines failed, exiting..." << endl;
+ exit (1);
+ }
+
+ cerr << "decodedValue AnyTestType ::= " << att << endl << endl;
+
+ //
+ // allocate a new buffer and set up for writing to
+ //
+ AsnBuf outputBuf;
+#if HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS
+ char outputData[dataSize + 512];
+#else
+ char *outputData = new char[dataSize + 512];
+ if (!outputData)
+ return 1;
+#endif /* HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS */
+ outputBuf.Init (outputData, dataSize+512);
+ outputBuf.ResetInWriteRvsMode();
[...5030 lines suppressed...]
+
+ if (argc != 3)
+ {
+ Usage (argv[0]);
+ return 1;
+ }
+
+ tblFileName = argv[1];
+ berFileName = argv[2];
+
+ /* init mem pool to hold decoded val */
+ InitNibbleMem (1024, 1024);
+
+ /* read in and decode the type table */
+ tbl = LoadTblFile (tblFileName);
+ if (tbl == NULL)
+ return 1;
+
+ fileData = LoadFile (berFileName, &fsize);
+ if (fileData == NULL)
+ return 1;
+
+ SBufInstallData (&sb, fileData, fsize);
+ PutSBufInGenBuf (&sb, &gb);
+
+ fprintf (stdout, "\n\n-- decoded contents of BER PersonnelRecord file: \"%s\"--\n", berFileName);
+
+ val = TblDecode (tbl, NULL, "PersonnelRecord", &gb, &bytesDecoded);
+
+ if (val == NULL)
+ fprintf (stdout, "-- Decoding error occured somewhere -- \n");
+ else
+ TblPrintValue (tbl, NULL, "PersonnelRecord", stdout, val);
+
+ fprintf (stdout, "\n\n -- decoded %d bytes for the above value --\n\n", bytesDecoded, berFileName);
+
+ free (fileData); /* was malloc'd in LoadFile */
+
+ /*
+ * process value here
+ * (This is where the header file generated by mkchdr is
+ * useful - you can access the decoded value in a standard
+ * /easier way).
+ *
+ * Ok, well, the names "field0" etc aren't that nice
+ * but what did you expect - they aren't named in the ASN.1
+ * spec so mkchdr just makes them up. To fix this, just
+ * add field names to you ASN.1 spec - it will not change the
+ * way the values are encoded - so you're not making it
+ * incompatible with the original. (not including value notation)
+ */
+ printf ("The following printout is an example of using the\n");
+ printf ("hdr file generated by mkchdr to access the data\n");
+ printf ("returned from the table decoder. Look in \"example.c\"\n\n");
+
+
+ printf ("***** JQ GUMBY & CO Database *****************************************\n");
+ printf ("Employee Name: %s %s %s\n", val->field0->givenName->octs, val->field0->initial->octs, val->field0->familyName->octs);
+ printf ("Title: %s\n", val->title->octs);
+ printf ("Employee Number: %d\n", *val->field1);
+ printf ("Date of Hire: %s\n", val->dateOfHire->octs);
+ printf ("Name of Spouse: %s %s %s\n", val->nameOfSpouse->givenName->octs, val->nameOfSpouse->initial->octs, val->nameOfSpouse->familyName->octs);
+ printf ("Number of Children: %d\n", AsnListCount (val->children));
+ printf ("**********************************************************************\n\n");
+
+ /*
+ * finished playing with the decoded value.
+ * now re-encode the value. Using an expbuf to hold the encoded val
+ * because they can grow and in general you can predict a values
+ * encoded size (although we could assume that is would be close to
+ * the same size as the one we read in at the beginning of this prg).
+ * (note: the size of PersonnelRecord BER value we decoded may be
+ * different from the size of the re-encoded version depending on
+ * the use of indefinite or definite lengths. Both are valid BER.)
+ */
+ fprintf (stdout, "now re-encoding the PersonnelRecord value to \"%s\"\n", outputFileNameG);
+
+ ebPtr = ExpBufAllocBufAndData();
+ ExpBufResetInWriteRvsMode (ebPtr); /* set up to hold encoding (= writing) */
+
+ PutExpBufInGenBuf (ebPtr, &gb);
+
+ if (TblEncode (tbl, NULL, "PersonnelRecord", &gb, val, &bytesEncoded) < 0)
+ fprintf (stderr, "main: error encoding the PersonnelRecord\n");
+
+ /* copy ExpBuf data to file */
+ outputFile = fopen (outputFileNameG, "w");
+ if (outputFile == NULL)
+ {
+ fprintf (stderr, "error - could not open file \"%s\"\n", outputFileNameG);
+ perror ("main: fopen:");
+ }
+
+ ExpBufCopyToFile (ebPtr, outputFile);
+
+ fclose (outputFile);
+
+ /* free the encoded version */
+ ExpBufFreeBufAndDataList (ebPtr);
+
+
+ return 0;
+} /* main */
diff -uraN snacc-1.3bbn/tbl-example/makefile snacc-1.3b4/tbl-example/makefile
--- snacc-1.3bbn/tbl-example/makefile 1970-01-01 00:00:00.000000000 +0000
+++ snacc-1.3b4/tbl-example/makefile 1997-02-15 19:33:26.000000000 +0000
@@ -0,0 +1,82 @@
+# file: .../tbl-example/makefile
+#
+# $Header: /usr/app/odstb/CVS/snacc/tbl-example/makefile,v 1.1 1997/02/15 19:33:26 rj Exp $
+# $Log: makefile,v $
+# Revision 1.1 1997/02/15 19:33:26 rj
+# first check-in
+#
+
+include ../makehead
+
+TOP = ..
+
+ASN1_SRC_DIR = $(TOP)/asn1specs
+
+ASN1_C_LIB_DIR = $(TOP)/c-lib
+ASN1_C_INC_DIR = $(ASN1_C_LIB_DIR)/inc
+TTBL_ASN1_LIB = $(ASN1_C_LIB_DIR)/libasn1ctbl.a
+
+COMPILERDIR = $(TOP)/compiler
+SNACC = $(COMPILERDIR)/snacc
+USEFUL_TYPES = $(ASN1_SRC_DIR)/asn-useful.asn1
+SNACCFLAGS = -u $(USEFUL_TYPES)
+
+TBLTOOLSDIR = $(TOP)/tbl-tools
+MKHDR = $(TBLTOOLSDIR)/mkchdr/mkchdr
+
+ASN1FILES = $(ASN1_SRC_DIR)/p-rec.asn1
+ASN1TTFILE = p-rec.tt
+ASN1TTHFILE = p-rec.h
+
+CFILES = example.c
+OFILES = example.o
+
+DISTFILES = \
+ README \
+ makefile \
+ $(CFILES) \
+ p-rec.ber
+
+CPPFLAGS += -I$(TOP) -I$(ASN1_C_INC_DIR) -DUSE_GEN_BUF
+
+#-------------------------------------------------------------------------------
+
+all:: example
+
+example: $(OFILES) $(TTBL_ASN1_LIB)
+ $(REASON)
+ $(CC) $(CFLAGS) -o example $(OFILES) $(TTBL_ASN1_LIB) $(LIBS)
+
+$(ASN1TTFILE): $(ASN1FILES)
+ $(REASON)
+ $(SNACC) $(SNACCFLAGS) -T $@ $(ASN1FILES)
+
+$(SNACC) $(MKHDR):
+ cd $(@D) && $(MAKE) $(@F)
+
+$(TTBL_ASN1_LIB):
+ cd $(@D) && $(MAKE) tbl-lib
+
+$(ASN1TTHFILE): $(ASN1TTFILE)
+ $(REASON)
+ $(MKHDR) $? $@
+
+check:: example $(ASN1TTFILE)
+
+check::
+ ./example p-rec.tt p-rec.ber
+ cmp p-rec.ber p-rec.out.ber
+ @echo "+++ the test was successful"
+
+# dummy:
+install::
+
+clean::
+ $(RM) example *.o *~ core .emacs* $(ASN1TTFILE) $(ASN1TTHFILE) p-rec.out.ber
+
+depend::
+ $(MAKE) $(MKHDR)
+
+depend:: $(ASN1TTHFILE)
+
+include ../maketail
diff -uraN snacc-1.3bbn/tbl-example/p-rec.ber.uu snacc-1.3b4/tbl-example/p-rec.ber.uu
--- snacc-1.3bbn/tbl-example/p-rec.ber.uu 1970-01-01 00:00:00.000000000 +0000
+++ snacc-1.3b4/tbl-example/p-rec.ber.uu 2005-07-30 16:57:00.588101736 +0000
@@ -0,0 +1,7 @@
+begin 644 p-rec.ber
+M8(&.81`6!$IO:&X6`446!5-M:71HH!`6#E1H92!":6<@0VAE97-E7X$``P&&
+MGZ$*0P at Q.3@R,#$P-*(281`6!$UA<GD6`4P6!5-M:71HHT$Q'V$1%@5*86UE
+M<Q8!4A8%4VUI=&B@"D,(,3DU-S`S,3`Q'F$0%@1,:7-A%@%-%@53;6ET:*`*
+*0P at Q.38Q,#8R,0``
+`
+end
snacc-gcc.patch:
c++-lib/inc/asn-any.h | 2
c++-lib/inc/asn-bits.h | 2
c++-lib/inc/asn-bool.h | 2
c++-lib/inc/asn-config.h | 6 +-
c++-lib/inc/asn-int.h | 2
c++-lib/inc/asn-list.h | 2
c++-lib/inc/asn-null.h | 2
c++-lib/inc/asn-octs.h | 2
c++-lib/inc/asn-oid.h | 2
c++-lib/inc/asn-real.h | 2
c++-lib/inc/asn-type.h | 2
c++-lib/inc/print.h | 4 -
c++-lib/src/asn-any.C | 2
c++-lib/src/asn-bits.C | 4 +
c++-lib/src/asn-bool.C | 4 +
c++-lib/src/asn-enum.C | 4 +
c++-lib/src/asn-int.C | 4 +
c++-lib/src/asn-len.C | 1
c++-lib/src/asn-list.C | 6 +-
c++-lib/src/asn-null.C | 4 +
c++-lib/src/asn-octs.C | 4 +
c++-lib/src/asn-oid.C | 8 +-
c++-lib/src/asn-real.C | 6 +-
c++-lib/src/asn-tag.C | 2
c++-lib/src/asn-type.C | 4 +
c++-lib/src/meta.C | 2
c++-lib/src/print.C | 4 -
c++-lib/src/tcl-if.C | 7 +-
compiler/back-ends/c++-gen/gen-code.c | 102 +++++++++++++++++-----------------
compiler/back-ends/c-gen/gen-code.c | 1
compiler/core/parse-asn1.y | 2
31 files changed, 116 insertions(+), 85 deletions(-)
--- NEW FILE snacc-gcc.patch ---
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-any.h snacc-1.3bbn/c++-lib/inc/asn-any.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-any.h 2001-01-27 01:03:02.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-any.h 2005-07-30 19:22:42.514097072 +0000
@@ -81,7 +81,7 @@
PDU_MEMBER_MACROS
- void Print (ostream &) const;
+ void Print (std::ostream &) const;
#if 0
#if TCL
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-bits.h snacc-1.3bbn/c++-lib/inc/asn-bits.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-bits.h 2001-01-27 01:03:02.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-bits.h 2005-07-30 19:23:29.321981192 +0000
@@ -105,7 +105,7 @@
PDU_MEMBER_MACROS
- void Print (ostream &) const;
+ void Print (std::ostream &) const;
#if META
static const AsnBitsTypeDesc _desc;
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-bool.h snacc-1.3bbn/c++-lib/inc/asn-bool.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-bool.h 2001-01-27 01:03:02.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-bool.h 2005-07-30 19:23:45.319549192 +0000
@@ -101,7 +101,7 @@
PDU_MEMBER_MACROS
- void Print (ostream &) const;
+ void Print (std::ostream &) const;
#if META
static const AsnBoolTypeDesc _desc;
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-config.h snacc-1.3bbn/c++-lib/inc/asn-config.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-config.h 2001-01-27 01:03:02.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-config.h 2005-07-30 19:24:29.054900408 +0000
@@ -49,7 +49,7 @@
#define _asn_config_h_
#include <ctype.h> /* for isprint() in <<op on AsnOcts */
-#include <iostream.h>
+#include <iostream>
#include <memory.h>
#include <string.h>
#include <setjmp.h>
@@ -85,14 +85,14 @@
* Asn1Error (char *str)
* - configure error handler
*/
-#define Asn1Error cerr
+#define Asn1Error std::cerr
/*
* Asn1Warning (char *str) - configure warning mechanism
* (currently not called)
*/
-#define Asn1Warning cerr
+#define Asn1Warning std::cerr
/*
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-int.h snacc-1.3bbn/c++-lib/inc/asn-int.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-int.h 2001-01-27 01:03:02.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-int.h 2005-07-30 19:24:45.421412320 +0000
@@ -70,7 +70,7 @@
PDU_MEMBER_MACROS
- void Print (ostream &os) const;
+ void Print (std::ostream &os) const;
#if META
static const AsnIntTypeDesc _desc;
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-list.h snacc-1.3bbn/c++-lib/inc/asn-list.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-list.h 2001-01-27 01:03:02.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-list.h 2005-07-30 19:25:10.914682616 +0000
@@ -86,7 +86,7 @@
last (NULL)
{}
- friend ostream &operator << (ostream &os, AsnList &l);
+ friend std::ostream &operator << (std::ostream &os, AsnList &l);
void SetCurrElmt (unsigned long int index);
void SetCurrToFirst() { curr = first; }
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-null.h snacc-1.3bbn/c++-lib/inc/asn-null.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-null.h 2001-01-27 01:03:02.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-null.h 2005-07-30 19:25:26.432323576 +0000
@@ -57,7 +57,7 @@
PDU_MEMBER_MACROS
- void Print (ostream &os) const;
+ void Print (std::ostream &os) const;
#if META
static const AsnNullTypeDesc _desc;
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-octs.h snacc-1.3bbn/c++-lib/inc/asn-octs.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-octs.h 2001-01-27 01:03:02.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-octs.h 2005-07-30 19:25:41.916969552 +0000
@@ -108,7 +108,7 @@
PDU_MEMBER_MACROS
- void Print (ostream &os) const;
+ void Print (std::ostream &os) const;
#if META
static const AsnOctsTypeDesc _desc;
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-oid.h snacc-1.3bbn/c++-lib/inc/asn-oid.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-oid.h 2001-01-27 01:03:03.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-oid.h 2005-07-30 19:25:52.747323088 +0000
@@ -108,7 +108,7 @@
PDU_MEMBER_MACROS
- void Print (ostream &os) const;
+ void Print (std::ostream &os) const;
#if META
static const AsnOidTypeDesc _desc;
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-real.h snacc-1.3bbn/c++-lib/inc/asn-real.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-real.h 2001-01-27 01:03:03.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-real.h 2005-07-30 19:26:05.321411536 +0000
@@ -67,7 +67,7 @@
AsnLen BEnc (BUF_TYPE b);
void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
- void Print (ostream &os) const;
+ void Print (std::ostream &os) const;
PDU_MEMBER_MACROS
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/asn-type.h snacc-1.3bbn/c++-lib/inc/asn-type.h
--- snacc-1.3bbn.orig/c++-lib/inc/asn-type.h 2001-01-27 01:03:03.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/asn-type.h 2005-07-30 19:26:16.551704272 +0000
@@ -111,7 +111,7 @@
#endif
- virtual void Print (ostream &) const;
+ virtual void Print (std::ostream &) const;
#if META
static const AsnTypeDesc _desc;
diff -uraN snacc-1.3bbn.orig/c++-lib/inc/print.h snacc-1.3bbn/c++-lib/inc/print.h
--- snacc-1.3bbn.orig/c++-lib/inc/print.h 2001-01-27 01:03:03.000000000 +0000
+++ snacc-1.3bbn/c++-lib/inc/print.h 2005-07-30 19:26:54.240974632 +0000
@@ -42,8 +42,8 @@
extern unsigned short int indentG;
extern unsigned short int stdIndentG;
-void Indent (ostream &os, unsigned short int i);
+void Indent (std::ostream &os, unsigned short int i);
-ostream &operator << (ostream &os, const AsnType &a);
+std::ostream &operator << (std::ostream &os, const AsnType &a);
#endif /* conditional include */
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-any.C snacc-1.3bbn/c++-lib/src/asn-any.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-any.C 2001-01-27 01:03:00.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-any.C 2005-07-30 19:27:15.597727912 +0000
@@ -165,7 +165,7 @@
}
-void AsnAny::Print (ostream &os) const
+void AsnAny::Print (std::ostream &os) const
{
os << value;
}
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-bits.C snacc-1.3bbn/c++-lib/src/asn-bits.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-bits.C 2001-01-27 01:03:00.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-bits.C 2005-07-30 19:27:51.063336320 +0000
@@ -65,6 +65,8 @@
#include "asn-bits.h"
#include "str-stk.h"
+using std::endl;
+
extern StrStk strStkG;
unsigned short int strStkUnusedBitsG;
@@ -440,7 +442,7 @@
} /* BDecConsBits */
// prints the BIT STRING to the given ostream.
-void AsnBits::Print (ostream &os) const
+void AsnBits::Print (std::ostream &os) const
{
size_t octetLen = (bitLen+7)/8;
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-bool.C snacc-1.3bbn/c++-lib/src/asn-bool.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-bool.C 2001-01-27 01:03:00.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-bool.C 2005-07-30 19:28:23.793360600 +0000
@@ -54,6 +54,8 @@
#include "asn-type.h"
#include "asn-bool.h"
+using std::endl;
+
AsnType *AsnBool::Clone() const
{
return new AsnBool;
@@ -110,7 +112,7 @@
}
// print the BOOLEAN's value in ASN.1 value notation to the given ostream
-void AsnBool::Print (ostream &os) const
+void AsnBool::Print (std::ostream &os) const
{
os << (value ? "TRUE" : "FALSE");
}
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-enum.C snacc-1.3bbn/c++-lib/src/asn-enum.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-enum.C 2001-01-27 01:03:00.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-enum.C 2005-07-30 19:28:57.068302040 +0000
@@ -41,9 +41,11 @@
#include "asn-int.h"
#include "asn-enum.h"
+using std::endl;
+
AsnType *AsnEnum::Clone() const
{
- cerr << "AsnEnum::Clone() called" << endl;
+ std::cerr << "AsnEnum::Clone() called" << endl;
abort();
return NULL;
}
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-int.C snacc-1.3bbn/c++-lib/src/asn-int.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-int.C 2001-01-27 01:03:00.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-int.C 2005-07-30 19:31:10.276100376 +0000
@@ -55,6 +55,8 @@
#include "asn-type.h"
#include "asn-int.h"
+using std::endl;
+
AsnType *AsnInt::Clone() const
{
return new AsnInt;
@@ -171,7 +173,7 @@
BDecContent (b, MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE), elmtLen, bytesDecoded, env);
}
-void AsnInt::Print (ostream &os) const
+void AsnInt::Print (std::ostream &os) const
{
os << value;
}
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-len.C snacc-1.3bbn/c++-lib/src/asn-len.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-len.C 2001-01-27 01:03:00.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-len.C 2005-07-30 19:31:35.984192152 +0000
@@ -41,6 +41,7 @@
#include "asn-config.h"
#include "asn-len.h"
+using std::endl;
/*
* Encodes the given length to the given buffer.
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-list.C snacc-1.3bbn/c++-lib/src/asn-list.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-list.C 2001-01-27 01:03:00.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-list.C 2005-07-30 19:32:25.815616624 +0000
@@ -62,6 +62,8 @@
#include "asn-tag.h"
#include "asn-type.h"
+using std::endl;
+
#ifdef __GNUG__
#pragma implementation
#endif
@@ -80,7 +82,7 @@
// print routine for lists
template <class T>
-ostream &operator << (ostream &os, AsnList<T> &l)
+std::ostream &operator << (std::ostream &os, AsnList<T> &l)
{
os << "SEQUENCE OF { ";
@@ -241,7 +243,7 @@
{
listElmtTagId = BDecTag (b, bytesDecoded, env);
- if ((listElmtTagId == EOC) && (elmtLen == INDEFINITE_LEN))
+ if ((listElmtTagId == EOC_TAG_ID) && (elmtLen == INDEFINITE_LEN))
break;
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-null.C snacc-1.3bbn/c++-lib/src/asn-null.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-null.C 2001-01-27 01:03:01.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-null.C 2005-07-30 19:33:01.169242056 +0000
@@ -48,6 +48,8 @@
#include "asn-type.h"
#include "asn-null.h"
+using std::endl;
+
AsnType *AsnNull::Clone() const
{
return new AsnNull;
@@ -85,7 +87,7 @@
BDecContent (b, MAKE_TAG_ID (UNIV, PRIM, NULLTYPE_TAG_CODE), elmtLen, bytesDecoded, env);
}
-void AsnNull::Print (ostream &os) const
+void AsnNull::Print (std::ostream &os) const
{
os << "NULL";
}
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-octs.C snacc-1.3bbn/c++-lib/src/asn-octs.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-octs.C 2001-01-27 01:03:01.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-octs.C 2005-07-30 19:33:30.540776904 +0000
@@ -58,6 +58,8 @@
#include "asn-octs.h"
#include "str-stk.h"
+using std::endl;
+
extern StrStk strStkG;
AsnOcts::~AsnOcts()
@@ -166,7 +168,7 @@
// Prints the AsnOcts to the given ostream in Value Notation.
-void AsnOcts::Print (ostream &os) const
+void AsnOcts::Print (std::ostream &os) const
{
int i;
os << "'";
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-oid.C snacc-1.3bbn/c++-lib/src/asn-oid.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-oid.C 2001-01-27 01:03:01.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-oid.C 2005-07-30 19:43:47.320214040 +0000
@@ -51,7 +51,7 @@
#include "asn-config.h"
#if TCL
-#include <strstream.h>
+#include <strstream>
#endif
#include "asn-len.h"
#include "asn-tag.h"
@@ -59,6 +59,8 @@
#include "asn-oid.h"
#include "print.h"
+using std::endl;
+
AsnOid::~AsnOid()
{
delete oid;
@@ -157,7 +159,7 @@
*(tmpBuf++) = 0x7f & headArcNum;
// repeat for the rest of the arc numbers
- for (i = 2; (i < 11) && (arcNumArr[i] > 0); i++)
+ for (int i = 2; (i < 11) && (arcNumArr[i] > 0); i++)
{
tmpArcNum = arcNumArr[i];
for (elmtLen = 1; (tmpArcNum >>= 7) != 0; elmtLen++)
@@ -308,7 +310,7 @@
// Prints an AsnOid in ASN.1 Value Notation.
// Decodes the oid to get the individual arc numbers
-void AsnOid::Print (ostream &os) const
+void AsnOid::Print (std::ostream &os) const
{
unsigned short int firstArcNum;
unsigned long int arcNum;
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-real.C snacc-1.3bbn/c++-lib/src/asn-real.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-real.C 2001-01-27 01:03:01.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-real.C 2005-07-30 19:44:57.954476000 +0000
@@ -57,12 +57,16 @@
#include "asn-type.h"
#include "asn-real.h"
+using std::endl;
+
#ifndef IEEE_REAL_LIB
/* ieee functions (in case not in math.h)*/
extern "C" {
extern int iszero (double);
+#if defined(__GNUC__) && (__GNUC__ < 3)
extern int isinf (double);
extern int signbit (double);
+#endif /* __GNUC__ && __GNUC__ < 3 */
extern int ilogb (double);
extern double scalbn (double, int);
}
@@ -841,7 +845,7 @@
BDecContent (b, MAKE_TAG_ID (UNIV, PRIM, REAL_TAG_CODE), elmtLen, bytesDecoded, env);
}
-void AsnReal::Print (ostream &os) const
+void AsnReal::Print (std::ostream &os) const
{
os << value;
}
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-tag.C snacc-1.3bbn/c++-lib/src/asn-tag.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-tag.C 2001-01-27 01:03:01.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-tag.C 2005-07-30 19:45:24.267135808 +0000
@@ -45,6 +45,8 @@
#include "asn-len.h"
#include "asn-tag.h"
+using std::endl;
+
/*
* Decode a BER Tag from the given buffer. Error is
* flagged if the tag is too long or if a read error occurs.
diff -uraN snacc-1.3bbn.orig/c++-lib/src/asn-type.C snacc-1.3bbn/c++-lib/src/asn-type.C
--- snacc-1.3bbn.orig/c++-lib/src/asn-type.C 2001-01-27 01:03:01.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/asn-type.C 2005-07-30 19:30:07.294675008 +0000
@@ -72,6 +72,8 @@
#include "asn-len.h"
#include "asn-type.h"
+using std::endl;
+
AsnType::~AsnType()
{
}
@@ -97,7 +99,7 @@
#endif
-void AsnType::Print (ostream &os) const
+void AsnType::Print (std::ostream &os) const
{
os << "ERROR - Attempt to print an improperly formed ANY type (programming error)." << endl;
}
diff -uraN snacc-1.3bbn.orig/c++-lib/src/meta.C snacc-1.3bbn/c++-lib/src/meta.C
--- snacc-1.3bbn.orig/c++-lib/src/meta.C 2001-01-27 01:03:01.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/meta.C 2005-07-30 19:46:03.588158104 +0000
@@ -27,6 +27,8 @@
#include "asn-incl.h"
+using std::endl;
+
#if META
AsnMemberDesc::AsnMemberDesc (const char *_name, const AsnTypeDesc *_desc):
diff -uraN snacc-1.3bbn.orig/c++-lib/src/print.C snacc-1.3bbn/c++-lib/src/print.C
--- snacc-1.3bbn.orig/c++-lib/src/print.C 2001-01-27 01:03:01.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/print.C 2005-07-30 19:46:33.326637168 +0000
@@ -45,13 +45,13 @@
unsigned short int stdIndentG = 4;
void
-Indent (ostream &os, unsigned short int i)
+Indent (std::ostream &os, unsigned short int i)
{
while (i-->0)
os << ' ';
}
-ostream &operator << (ostream &os, const AsnType &v)
+std::ostream &operator << (std::ostream &os, const AsnType &v)
{
v.Print (os);
return os;
diff -uraN snacc-1.3bbn.orig/c++-lib/src/tcl-if.C snacc-1.3bbn/c++-lib/src/tcl-if.C
--- snacc-1.3bbn.orig/c++-lib/src/tcl-if.C 2001-01-27 01:03:01.000000000 +0000
+++ snacc-1.3bbn/c++-lib/src/tcl-if.C 2005-07-30 19:48:01.296263752 +0000
@@ -28,12 +28,13 @@
#include <assert.h>
#include <unistd.h>
#include <stdlib.h>
-#include <strstream.h>
-#include <fstream.h>
+#include <sstream>
#include <string.h>
#include "asn-incl.h"
+using std::endl;
+
#if TCL
#ifdef _AIX32
@@ -835,7 +836,7 @@
}
cout << *var;
- strstream s;
+ stringstream s;
s << *var;
s.put ('\0');
cout << strlen(s.str()) << endl;
diff -uraN snacc-1.3bbn.orig/compiler/back-ends/c++-gen/gen-code.c snacc-1.3bbn/compiler/back-ends/c++-gen/gen-code.c
--- snacc-1.3bbn.orig/compiler/back-ends/c++-gen/gen-code.c 2001-01-27 01:02:54.000000000 +0000
+++ snacc-1.3bbn/compiler/back-ends/c++-gen/gen-code.c 2005-07-30 19:58:00.407885728 +0000
@@ -453,7 +453,7 @@
fprintf (src, " else\n");
fprintf (src, " return false;\n");
/*
- fprintf (src, " { cerr << \"longjmp return value is \" << val << endl;\n");
+ fprintf (src, " { std::cerr << \"longjmp return value is \" << val << std::endl;\n");
fprintf (src, " return false; }\n");
*/
fprintf (src, "}\n\n");
@@ -999,7 +999,7 @@
fprintf (src, ")\n");
}
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
+ fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << std::endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n");
@@ -1357,7 +1357,7 @@
fprintf (src, "%s::%s (const %s &)\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, "{\n");
- fprintf (src, " Asn1Error << \"use of incompletely defined %s::%s (const %s &)\" << endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
+ fprintf (src, " Asn1Error << \"use of incompletely defined %s::%s (const %s &)\" << std::endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, " abort();\n");
fprintf (src, "}\n\n");
@@ -1423,7 +1423,7 @@
fprintf (src, "\n");
fprintf (src, " return *this;\n");
fprintf (src, "#else // SNACC_DEEP_COPY\n");
- fprintf (src, " Asn1Error << \"use of incompletely defined %s &%s::operator = (const %s &)\" << endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
+ fprintf (src, " Asn1Error << \"use of incompletely defined %s &%s::operator = (const %s &)\" << std::endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, " abort();\n");
fprintf (src, " // if your compiler complains here, check the -novolat option\n");
if (novolatilefuncs)
@@ -1666,7 +1666,7 @@
}
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"Unexpected Tag\" << endl;\n");
+ fprintf (src, " Asn1Error << \"Unexpected Tag\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n\n");
@@ -1780,7 +1780,7 @@
}
fprintf (src, " default:\n");
- fprintf (src, " Asn1Error << \"ERROR - unexpected tag in CHOICE\" << endl;\n");
+ fprintf (src, " Asn1Error << \"ERROR - unexpected tag in CHOICE\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " break;\n");
@@ -1847,7 +1847,7 @@
else
fprintf (src, "MAKE_TAG_ID (%s, %s, %d))", classStr, formStr, tag->code);
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
+ fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << std::endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n");
fprintf (src, " extraLen%d = BDecLen (b, bytesDecoded, env);\n", ++elmtLevel);
@@ -1876,11 +1876,11 @@
/* ostream printing routine */
if (printPrintersG)
{
- fprintf (hdr, " void Print (ostream &os) const;\n", td->cxxTypeDefInfo->className);
+ fprintf (hdr, " void Print (std::ostream &os) const;\n", td->cxxTypeDefInfo->className);
- fprintf (src, "void %s::Print (ostream &os) const\n", td->cxxTypeDefInfo->className);
+ fprintf (src, "void %s::Print (std::ostream &os) const\n", td->cxxTypeDefInfo->className);
fprintf (src, "{\n");
- /* fprintf (src, " os << \"{\" << endl;\n") */
+ /* fprintf (src, " os << \"{\" << std::endl;\n") */
fprintf (src, " switch (choiceId)\n");
fprintf (src, " {\n");
FOR_EACH_LIST_ELMT (e, choice->basicType->a.choice)
@@ -1909,7 +1909,7 @@
}
fprintf (src, " } // end of switch\n");
- /* fprintf (src, " os << \"}\" << endl;\n") */
+ /* fprintf (src, " os << \"}\" << std::endl;\n") */
fprintf (src, "} // %s::Print\n\n", td->cxxTypeDefInfo->className);
}
/* end of Print Method code */
@@ -2260,7 +2260,7 @@
fprintf (src, "%s::%s (const %s &)\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, "{\n");
- fprintf (src, " Asn1Error << \"use of incompletely defined %s::%s (const %s &)\" << endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
+ fprintf (src, " Asn1Error << \"use of incompletely defined %s::%s (const %s &)\" << std::endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, " abort();\n");
fprintf (src, "}\n\n");
@@ -2310,7 +2310,7 @@
fprintf (src, "\n");
fprintf (src, " return *this;\n");
fprintf (src, "#else // SNACC_DEEP_COPY\n");
- fprintf (src, " Asn1Error << \"use of incompletely defined %s &%s::operator = (const %s &)\" << endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
+ fprintf (src, " Asn1Error << \"use of incompletely defined %s &%s::operator = (const %s &)\" << std::endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, " abort();\n");
fprintf (src, " // if your compiler complains here, check the -novolat option\n");
if (novolatilefuncs)
@@ -2460,7 +2460,7 @@
fprintf (src, " BDecEoc (b, bytesDecoded, env);\n");
fprintf (src, " else if (elmtLen0 != 0)\n");
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"Expected an empty sequence\" << endl;\n");
+ fprintf (src, " Asn1Error << \"Expected an empty sequence\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n");
@@ -2638,7 +2638,7 @@
}
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"Unexpected Tag\" << endl;\n");
+ fprintf (src, " Asn1Error << \"Unexpected Tag\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n\n");
fprintf (src, " elmtLen%d = BDecLen (b, seqBytesDecoded, env);\n", ++elmtLevel);
@@ -2826,7 +2826,7 @@
fprintf (src, " }\n"); /* end of tag check if */
fprintf (src, " else\n");
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"ERROR - SEQUENCE is missing non-optional elmt.\" << endl;\n");
+ fprintf (src, " Asn1Error << \"ERROR - SEQUENCE is missing non-optional elmt.\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n\n");
}
@@ -2845,7 +2845,7 @@
fprintf (src, " }\n");
fprintf (src, " else if (seqBytesDecoded != elmtLen0)\n");
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"ERROR - Length discrepancy on sequence.\" << endl;\n");
+ fprintf (src, " Asn1Error << \"ERROR - Length discrepancy on sequence.\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n");
fprintf (src, " else\n");
@@ -2914,7 +2914,7 @@
else
fprintf (src, "MAKE_TAG_ID (%s, %s, %d))\n", classStr, formStr, tag->code);
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
+ fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << std::endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n");
@@ -2939,14 +2939,14 @@
/* write code for printing */
if (printPrintersG)
{
- fprintf (hdr, " void Print (ostream &os) const;\n");
+ fprintf (hdr, " void Print (std::ostream &os) const;\n");
- fprintf (src, "void %s::Print (ostream &os) const\n", td->cxxTypeDefInfo->className);
+ fprintf (src, "void %s::Print (std::ostream &os) const\n", td->cxxTypeDefInfo->className);
fprintf (src, "{\n");
allOpt = AllElmtsOptional (seq->basicType->a.sequence);
if (allOpt)
fprintf (src, " int nonePrinted = true;\n");
- fprintf (src, " os << \"{ -- SEQUENCE --\" << endl;\n");
+ fprintf (src, " os << \"{ -- SEQUENCE --\" << std::endl;\n");
fprintf (src, " indentG += stdIndentG;\n\n");
FOR_EACH_LIST_ELMT (e, seq->basicType->a.sequence)
@@ -2963,12 +2963,12 @@
if (e != FIRST_LIST_ELMT (seq->basicType->a.sequence))
{
fprintf (src, " if (!nonePrinted)\n");
- fprintf (src, " os << \",\" << endl;\n");
+ fprintf (src, " os << \",\" << std::endl;\n");
}
fprintf (src, " nonePrinted = false;\n", i);
}
else if (inTailOptElmts) /* cannot be first elmt ow allOpt is true */
- fprintf (src, " os << \",\"<< endl;\n");
+ fprintf (src, " os << \",\"<< std::endl;\n");
fprintf (src, " Indent (os, indentG);\n");
@@ -2982,10 +2982,10 @@
#ifdef KHO
if (e != LAST_LIST_ELMT (seq->basicType->a.sequence)&&(!e->type->cxxTypeRefInfo->isPtr) )
- fprintf (src, " os << \",\" << endl;\n");
+ fprintf (src, " os << \",\" << std::endl;\n");
#else
if (e != LAST_LIST_ELMT (seq->basicType->a.sequence) && !inTailOptElmts && !NextIsTailOptional (seq->basicType->a.sequence))
- fprintf (src, " os << \",\" << endl;\n");
+ fprintf (src, " os << \",\" << std::endl;\n");
#endif
fprintf (src, " }\n");
@@ -3000,9 +3000,9 @@
fprintf (src, " os << \"%s \";\n", e->fieldName);
fprintf (src, " os << \"-- void --\";\n");
if (e != LAST_LIST_ELMT (seq->basicType->a.sequence))
- fprintf (src, " os << \",\" << endl;\n");
+ fprintf (src, " os << \",\" << std::endl;\n");
else
- fprintf (src, " os << endl;\n");
+ fprintf (src, " os << std::endl;\n");
fprintf (src, " }\n");
#else
fprintf (src, " os << \"-- void --\";\n");
@@ -3012,7 +3012,7 @@
fprintf (src, "\n");
if (e == LAST_LIST_ELMT (seq->basicType->a.sequence))
- fprintf (src, " os << endl;\n");
+ fprintf (src, " os << std::endl;\n");
}
fprintf (src, " indentG -= stdIndentG;\n");
@@ -3361,7 +3361,7 @@
fprintf (src, "%s::%s (const %s &)\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, "{\n");
- fprintf (src, " Asn1Error << \"use of incompletely defined %s::%s (const %s &)\" << endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
+ fprintf (src, " Asn1Error << \"use of incompletely defined %s::%s (const %s &)\" << std::endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, " abort();\n");
fprintf (src, "}\n\n");
@@ -3411,7 +3411,7 @@
fprintf (src, "\n");
fprintf (src, " return *this;\n");
fprintf (src, "#else // SNACC_DEEP_COPY\n");
- fprintf (src, " Asn1Error << \"use of incompletely defined %s &%s::operator = (const %s &)\" << endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
+ fprintf (src, " Asn1Error << \"use of incompletely defined %s &%s::operator = (const %s &)\" << std::endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, " abort();\n");
fprintf (src, " // if your compiler complains here, check the -novolat option\n");
if (novolatilefuncs)
@@ -3557,7 +3557,7 @@
fprintf (src, " BDecEoc (b, bytesDecoded, env);\n");
fprintf (src, " else if (elmtLen0 != 0)\n");
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"Expected an empty sequence\" << endl;\n");
+ fprintf (src, " Asn1Error << \"Expected an empty sequence\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n");
@@ -3697,7 +3697,7 @@
}
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"Unexpected Tag\" << endl;\n");
+ fprintf (src, " Asn1Error << \"Unexpected Tag\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n\n");
@@ -3814,14 +3814,14 @@
FreeTags (tags);
} /* for each elmt */
fprintf (src, " default:\n");
- fprintf (src, " Asn1Error << \"Unexpected Tag on SET elmt.\" << endl;\n");
+ fprintf (src, " Asn1Error << \"Unexpected Tag on SET elmt.\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " } // end switch\n");
fprintf (src, " } // end for loop\n");
fprintf (src, " bytesDecoded += setBytesDecoded;\n");
fprintf (src, " if (mandatoryElmtsDecoded != %d)\n", mandatoryElmtCount);
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"ERROR - non-optional SET element missing.\" << endl;\n");
+ fprintf (src, " Asn1Error << \"ERROR - non-optional SET element missing.\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n");
@@ -3889,7 +3889,7 @@
else
fprintf (src, "MAKE_TAG_ID (%s, %s, %d))\n", classStr, formStr, tag->code);
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
+ fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << std::endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n");
@@ -3914,15 +3914,15 @@
/* write code for printing */
if (printPrintersG)
{
- fprintf (hdr, " void Print (ostream &os) const;\n");
+ fprintf (hdr, " void Print (std::ostream &os) const;\n");
- fprintf (src, "void %s::Print (ostream &os) const\n", td->cxxTypeDefInfo->className);
+ fprintf (src, "void %s::Print (std::ostream &os) const\n", td->cxxTypeDefInfo->className);
fprintf (src, "{\n");
allOpt = AllElmtsOptional (set->basicType->a.set);
if (allOpt)
fprintf (src, " int nonePrinted = true;\n");
- fprintf (src, " os << \"{ -- SET --\" << endl;\n");
+ fprintf (src, " os << \"{ -- SET --\" << std::endl;\n");
fprintf (src, " indentG += stdIndentG;\n\n");
FOR_EACH_LIST_ELMT (e, set->basicType->a.set)
@@ -3939,12 +3939,12 @@
if (e != FIRST_LIST_ELMT (set->basicType->a.set))
{
fprintf (src, " if (!nonePrinted)\n");
- fprintf (src, " os << \",\" << endl;\n");
+ fprintf (src, " os << \",\" << std::endl;\n");
}
fprintf (src, " nonePrinted = false;\n", i);
}
else if (inTailOptElmts) /* cannot be first elmt ow allOpt is true */
- fprintf (src, " os << \",\"<< endl;\n");
+ fprintf (src, " os << \",\"<< std::endl;\n");
fprintf (src, " Indent (os, indentG);\n");
@@ -3957,7 +3957,7 @@
fprintf (src, " os << %s;\n", e->type->cxxTypeRefInfo->fieldName);
if (e != LAST_LIST_ELMT (set->basicType->a.set) && !inTailOptElmts && !NextIsTailOptional (set->basicType->a.set))
- fprintf (src, " os << \",\" << endl;\n");
+ fprintf (src, " os << \",\" << std::endl;\n");
fprintf (src, " }\n");
@@ -3974,7 +3974,7 @@
fprintf (src, "\n");
if (e == LAST_LIST_ELMT (set->basicType->a.set))
- fprintf (src, " os << endl;\n");
+ fprintf (src, " os << std::endl;\n");
}
fprintf (src, " indentG -= stdIndentG;\n");
fprintf (src, " Indent (os, indentG);\n");
@@ -4294,7 +4294,7 @@
else
fprintf (src, "MAKE_TAG_ID (%s, %s, %d))\n", classStr, formStr, tag->code);
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
+ fprintf (src, " Asn1Error << \"%s::B%s: ERROR - wrong tag\" << std::endl;\n", td->cxxTypeDefInfo->className, r->decodeBaseName);
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n");
@@ -4324,7 +4324,7 @@
fprintf (hdr, " PDU_MEMBER_MACROS\n");
if (printPrintersG)
- fprintf (hdr, " void Print (ostream &os) const;\n");
+ fprintf (hdr, " void Print (std::ostream &os) const;\n");
fprintf (hdr, "};\n\n\n");
@@ -4380,7 +4380,7 @@
}
fprintf (src, "))\n");
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"Unexpected Tag\" << endl;\n");
+ fprintf (src, " Asn1Error << \"Unexpected Tag\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n\n");
fprintf (src, " elmtLen%d = BDecLen (b, listBytesDecoded, env);\n", ++elmtLevel);
@@ -4406,7 +4406,7 @@
fprintf (src, "))\n");
fprintf (src, " {\n");
- fprintf (src, " Asn1Error << \"Unexpected Tag\" << endl;\n");
+ fprintf (src, " Asn1Error << \"Unexpected Tag\" << std::endl;\n");
fprintf (src, " longjmp (env, %d);\n", longJmpValG--);
fprintf (src, " }\n\n");
fprintf (src, " elmtLen%d = BDecLen (b, listBytesDecoded, env);\n", ++elmtLevel);
@@ -4461,7 +4461,7 @@
fprintf (src, "%s::%s (const %s &)\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, "{\n");
- fprintf (src, " Asn1Error << \"use of incompletely defined %s::%s (const %s &)\" << endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
+ fprintf (src, " Asn1Error << \"use of incompletely defined %s::%s (const %s &)\" << std::endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, " abort();\n");
fprintf (src, "}\n\n");
@@ -4494,7 +4494,7 @@
fprintf (src, "\n");
fprintf (src, " return *this;\n");
fprintf (src, "#else // SNACC_DEEP_COPY\n");
- fprintf (src, " Asn1Error << \"use of incompletely defined %s &%s::operator = (const %s &)\" << endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
+ fprintf (src, " Asn1Error << \"use of incompletely defined %s &%s::operator = (const %s &)\" << std::endl;\n", td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className, td->cxxTypeDefInfo->className);
fprintf (src, " abort();\n");
fprintf (src, " // if your compiler complains here, check the -novolat option\n");
if (novolatilefuncs)
@@ -4506,9 +4506,9 @@
if (printPrintersG)
{
- fprintf (src, "void %s::Print (ostream &os) const\n", td->cxxTypeDefInfo->className);
+ fprintf (src, "void %s::Print (std::ostream &os) const\n", td->cxxTypeDefInfo->className);
fprintf (src, "{\n");
- fprintf (src, " os << \"{ -- SEQUENCE/SET OF -- \" << endl;\n");
+ fprintf (src, " os << \"{ -- SEQUENCE/SET OF -- \" << std::endl;\n");
fprintf (src, " indentG += stdIndentG;\n");
fprintf (src, " //SetCurrToFirst();\n");
@@ -4521,7 +4521,7 @@
fprintf (src, " //if (Curr() != Last())\n");
fprintf (src, " if (run != last)\n");
fprintf (src, " os << \",\";\n");
- fprintf (src, " os << endl;\n");
+ fprintf (src, " os << std::endl;\n");
fprintf (src, " }\n");
fprintf (src, " indentG -= stdIndentG;\n");
diff -uraN snacc-1.3bbn.orig/compiler/back-ends/c-gen/gen-code.c snacc-1.3bbn/compiler/back-ends/c-gen/gen-code.c
--- snacc-1.3bbn.orig/compiler/back-ends/c-gen/gen-code.c 2001-01-27 01:02:52.000000000 +0000
+++ snacc-1.3bbn/compiler/back-ends/c-gen/gen-code.c 2005-07-30 19:22:04.488877784 +0000
@@ -33,6 +33,7 @@
*/
#include <stdio.h>
+#include <time.h>
#include "asn-incl.h"
#include "asn1module.h"
diff -uraN snacc-1.3bbn.orig/compiler/core/parse-asn1.y snacc-1.3bbn/compiler/core/parse-asn1.y
--- snacc-1.3bbn.orig/compiler/core/parse-asn1.y 2001-01-27 01:02:47.000000000 +0000
+++ snacc-1.3bbn/compiler/core/parse-asn1.y 2005-07-30 17:29:02.838828848 +0000
@@ -456,6 +456,7 @@
/*-----------------------------------------------------------------------*/
LineNo: { $$ = myLineNoG; }
+;
ModuleDefinition:
ModuleIdentifier
@@ -1462,6 +1463,7 @@
$$->choiceId = SUBTYPEVALUE_SINGLEVALUE;
$$->a.singleValue = $1;
}
+;
ContainedSubtype:
INCLUDES_SYM Type
snacc-ttab-tex-UTF8-fix.patch:
ttab.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE snacc-ttab-tex-UTF8-fix.patch ---
diff -up ./doc/ttab.tex.texfix ./doc/ttab.tex
--- ./doc/ttab.tex.texfix 2009-09-09 10:30:25.597509928 +0530
+++ ./doc/ttab.tex 2009-09-09 10:30:54.173509922 +0530
@@ -18,7 +18,7 @@ size of your type tables, put the only u
your ASN.1 module and compile it without using the useful types
module.
-A generic buffer type (à la ISODE and XDR) was defined to allow type
+A generic buffer type (ISODE and XDR) was defined to allow type
table driven routines to read from a wide variety of buffer formats.
Currently slightly modified versions of the {\C ExpBuf} and the
{\C SBuf} are provided. It shouldn't be too hard for you to add
--- NEW FILE snacc.spec ---
Name: snacc
Version: 1.3
Release: 4%{?dist}
Summary: Sample Neufeld ASN.1 to C Compiler
Group: Applications/System
License: GPLv2+
URL: http://packages.debian.org/source/sid/snacc
Source0: http://ftp.de.debian.org/debian/pool/main/s/snacc/%{name}_%{version}bbn.orig.tar.gz
Patch0: snacc-bts-442873.patch
Patch1: snacc-configure.patch
Patch2: snacc-examples.patch
Patch3: snacc-gcc.patch
Patch4: snacc-ttab-tex-UTF8-fix.patch
BUILDROOT: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf automake17 libtool flex bison
%description
Snacc is Sample Neufeld ASN.1 to C compiler that can produce C, C++ routines
or type tables for BER encoding, decoding, printing and freeing.
%package devel
Summary: Header files for snacc development
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains the header files
for snacc development.
%prep
%setup -qn %{name}-%{version}bbn.orig
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%{__mkdir} -p c-lib/Cebuf c-lib/ebuf c-lib/mbuf c-lib/sbuf c-lib/tbl c++-lib/c++
# ---- Build ----
# configure without tcl for libtool to use -DMETA=0
%build
AUTOMAKE=automake-1.7 ACLOCAL=aclocal-1.7 autoreconf -fi
%configure
%{__make}
%install
%{__rm} -rf %{buildroot}
%{__make} INSTALL="%{_bindir}/install -p" install DESTDIR=%{buildroot}
%{__rm} -f `find %{buildroot} -name *.a`
%{__rm} -f `find %{buildroot} -name *.la`
%clean
%{__rm} -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc README COPYING doc/snacc-a5.ps
%dir %{_includedir}/%{name}/
%{_includedir}/%{name}/asn1
%{_bindir}/%{name}
%{_bindir}/berdecode
%{_bindir}/mkchdr
%{_bindir}/ptbl
%{_bindir}/pval
%{_mandir}/man1/mkchdr.1.gz
%{_mandir}/man1/ptbl.1.gz
%{_mandir}/man1/pval.1.gz
%{_mandir}/man1/snacc.1.gz
%{_mandir}/man1/snacced.1.gz
%{_mandir}/mann/snacc.n.gz
%{_libdir}/libasn1c++.so.0.0.0
%{_libdir}/libasn1cCebuf.so.0.0.0
%{_libdir}/libasn1cebuf.so.0.0.0
%{_libdir}/libasn1cmbuf.so.0.0.0
%{_libdir}/libasn1csbuf.so.0.0.0
%{_libdir}/libasn1ctbl.so.0.0.0
%{_libdir}/libasn1c++.so.0
%{_libdir}/libasn1cCebuf.so.0
%{_libdir}/libasn1cebuf.so.0
%{_libdir}/libasn1cmbuf.so.0
%{_libdir}/libasn1csbuf.so.0
%{_libdir}/libasn1ctbl.so.0
%files devel
%defattr(-,root,root,-)
%doc c-examples/ c++-examples/
%{_bindir}/snacc-config
%{_datadir}/aclocal/snacc.m4
%{_includedir}/%{name}/c
%{_includedir}/%{name}/c++
%{_libdir}/libasn1c++.so
%{_libdir}/libasn1cCebuf.so
%{_libdir}/libasn1cebuf.so
%{_libdir}/libasn1cmbuf.so
%{_libdir}/libasn1csbuf.so
%{_libdir}/libasn1ctbl.so
%changelog
* Sat Sep 26 2009 Shakthi Kannan <shakthimaan [AT] gmail DOT com> 1.3-4
- Removed --without-tcl as it doesn not affect configure.
- snacc-configure.patch will not build c++-lib/tcl/Makefile as tcl is not
required.
* Thu Sep 24 2009 Shakthi Kannan <shakthimaan [AT] gmail DOT com> 1.3-3
- Removed -libs package, and moved them to -base package.
- s/sample/Sample in package description.
- Directory ownership in base package for includedir/name.
- snacc.m4 moved to -devel package.
- Patch names start with snacc-.
- Removed .tex and .bib files as .ps is already shipped.
* Wed Sep 23 2009 Shakthi Kannan <shakthimaan [AT] gmail DOT com> 1.3-2
- Fixed spelling mistake s/dample/sample.
- Added {c, c++}-examples to devel package.
- Moved *.asn1 files to base package.
- Created separate libs package.
- Call ldconfig for post, postun for libs package.
* Mon Sep 21 2009 Shakthi Kannan <shakthimaan [AT] gmail DOT com> 1.3-1
- First snacc package.
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/snacc/EL-5/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore 29 Sep 2009 19:57:08 -0000 1.1
+++ .cvsignore 30 Sep 2009 03:47:02 -0000 1.2
@@ -0,0 +1 @@
+snacc_1.3bbn.orig.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/snacc/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources 29 Sep 2009 19:57:09 -0000 1.1
+++ sources 30 Sep 2009 03:47:02 -0000 1.2
@@ -0,0 +1 @@
+24c969e2673f1713d5d995d2f9e64781 snacc_1.3bbn.orig.tar.gz
- Previous message (by thread): rpms/etckeeper/devel etckeeper.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/snacc/F-10 import.log, NONE, 1.1 snacc-bts-442873.patch, NONE, 1.1 snacc-configure.patch, NONE, 1.1 snacc-examples.patch, NONE, 1.1 snacc-gcc.patch, NONE, 1.1 snacc-ttab-tex-UTF8-fix.patch, NONE, 1.1 snacc.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list