資源簡(jiǎn)介
Download the ASN.1 compiler release:
Source code: asn1c-0.9.24.tar.gz (2013-Mar-26), see ChangeLog and License
Notes:
0. The code generated by the ASN.1 compiler is cross-platform and not compiler dependent, unlike asn1c itself.
1. Requires GCC compiler under unix-like environment (FreeBSD, Linux,
代碼片段和文件信息
/*-
?*?Copyright?(c)?2003?2004?2005?2006?2013
?*? Lev?Walkin?.?All?rights?reserved.
?*
?*?Redistribution?and?use?in?source?and?binary?forms?with?or?without
?*?modification?are?permitted?provided?that?the?following?conditions
?*?are?met:
?*?1.?Redistributions?of?source?code?must?retain?the?above?copyright
?*????notice?this?list?of?conditions?and?the?following?disclaimer.
?*?2.?Redistributions?in?binary?form?must?reproduce?the?above?copyright
?*????notice?this?list?of?conditions?and?the?following?disclaimer?in?the
?*????documentation?and/or?other?materials?provided?with?the?distribution.
?*
?*?THIS?SOFTWARE?IS?PROVIDED?BY?THE?AUTHOR?AND?CONTRIBUTORS?‘‘AS?IS‘‘?AND
?*?ANY?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE
?*?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE
?*?ARE?DISCLAIMED.??IN?NO?EVENT?SHALL?THE?AUTHOR?OR?CONTRIBUTORS?BE?LIABLE
?*?FOR?ANY?DIRECT?INDIRECT?INCIDENTAL?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL
?*?DAMAGES?(INCLUDING?BUT?NOT?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS
?*?OR?SERVICES;?LOSS?OF?USE?DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)
?*?HOWEVER?CAUSED?AND?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT?STRICT
?*?LIABILITY?OR?TORT?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN?ANY?WAY
?*?OUT?OF?THE?USE?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF
?*?SUCH?DAMAGE.
?*
?*?$Id$
?*/
/*
?*?This?is?the?program?that?connects?the?libasn1*?libraries?together.
?*?It?uses?them?in?turn?to?parse?fix?and?then?compile?or?print?the?ASN.1?tree.
?*/
#include?“sys-common.h“
#undef??COPYRIGHT
#define?COPYRIGHT???????\
“Copyright?(c)?2003?2004?2005?2006?Lev?Walkin?\n“
#include? /*?Parse?the?ASN.1?file?and?build?a?tree?*/
#include? /*?Fix?the?ASN.1?tree?*/
#include? /*?Print?the?ASN.1?tree?*/
#include? /*?Compile?the?ASN.1?tree?*/
#include? /*?Portable?basename(3)?and?dirname(3)?*/
#ifdef _WIN32
#include?
#include?
#else
#include?
#endif
static?void?usage(const?char?*av0); /*?Print?the?Usage?screen?and?exit?*/
static?int?importStandardModules(asn1p_t?*asn?const?char?*skeletons_dir);
int
main(int?ac?char?**av)?{
enum?asn1p_flags?????asn1_parser_flags =?A1P_NOFLAGS;
enum?asn1f_flags?????asn1_fixer_flags =?A1F_NOFLAGS;
enum?asn1c_flags?????asn1_compiler_flags=?A1C_NO_C99;
enum?asn1print_flags?asn1_printer_flags =?APF_NOFLAGS;
int?print_arg__print_out?=?0; /*?Don‘t?compile?just?print?parsed?*/
int?print_arg__fix_n_print?=?0; /*?Fix?and?print?*/
int?warnings_as_errors?=?0; /*?Treat?warnings?as?errors?*/
char?*skeletons_dir?=?NULL; /*?Directory?with?supplementary?stuff?*/
asn1p_t?*asn?=?0; /*?An?ASN.1?parsed?tree?*/
int?ret; /*?Return?value?from?misc?functions?*/
int?ch; /*?Command?line?character?*/
int?i; /*?Index?in?some?loops?*/
/*
?*?Process?command-line?options.
?*/
while((ch?=?getopt(ac?av?“EFf:g:hLPp:RS:vW:
評(píng)論
共有 條評(píng)論