libksba  1.6.0
About: KSBA is a library to make the tasks of working with X.509 certificates, CMS data and related objects more easy.
  Fossies Dox: libksba-1.6.0.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

asn1-gentables.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdarg.h>
#include "gen-help.h"
#include "asn1-func.h"
Include dependency graph for asn1-gentables.c:

Go to the source code of this file.

Data Structures

struct  name_list_s
 

Macros

#define PGMNAME   "asn1-gentables"
 
#define ATTR_PRINTF(a, b)
 
#define DEVNULL_NAME   "/dev/null"
 

Functions

static void print_error (const char *fmt,...)
 
static size_t insert_string (const char *name)
 
static int cmp_string (const void *aptr, const void *bptr)
 
static void sort_string_table (void)
 
static void write_string_table (FILE *fp)
 
static struct name_list_screate_static_structure (AsnNode pointer, const char *file_name, FILE *fp)
 
static struct name_list_sone_file (const char *fname, int *count, FILE *fp)
 
int main (int argc, char **argv)
 

Variables

static int error_counter
 
static int dump_only
 
static int check_only
 
static struct name_list_sstring_table
 
static struct name_list_s ** string_table_tail
 
static size_t string_table_offset
 

Macro Definition Documentation

◆ ATTR_PRINTF

#define ATTR_PRINTF (   a,
 
)

Definition at line 34 of file asn1-gentables.c.

◆ DEVNULL_NAME

#define DEVNULL_NAME   "/dev/null"

Definition at line 40 of file asn1-gentables.c.

◆ PGMNAME

#define PGMNAME   "asn1-gentables"

Definition at line 29 of file asn1-gentables.c.

Function Documentation

◆ cmp_string()

static int cmp_string ( const void *  aptr,
const void *  bptr 
)
static

Definition at line 110 of file asn1-gentables.c.

Referenced by sort_string_table().

◆ create_static_structure()

◆ insert_string()

static size_t insert_string ( const char *  name)
static

◆ main()

int main ( int  argc,
char **  argv 
)

◆ one_file()

static struct name_list_s* one_file ( const char *  fname,
int *  count,
FILE *  fp 
)
static

◆ print_error()

static void print_error ( const char *  fmt,
  ... 
)
static

Definition at line 64 of file asn1-gentables.c.

References error_counter, and PGMNAME.

Referenced by create_static_structure(), main(), and one_file().

◆ sort_string_table()

static void sort_string_table ( void  )
static

◆ write_string_table()

static void write_string_table ( FILE *  fp)
static

Definition at line 154 of file asn1-gentables.c.

References insert_string(), name_list_s::name, name_list_s::next, and string_table.

Referenced by main().

Variable Documentation

◆ check_only

int check_only
static

Definition at line 50 of file asn1-gentables.c.

Referenced by main(), and one_file().

◆ dump_only

int dump_only
static

Definition at line 48 of file asn1-gentables.c.

Referenced by main(), and one_file().

◆ error_counter

int error_counter
static

Definition at line 45 of file asn1-gentables.c.

Referenced by main(), and print_error().

◆ string_table

struct name_list_s* string_table
static

Definition at line 57 of file asn1-gentables.c.

Referenced by insert_string(), sort_string_table(), and write_string_table().

◆ string_table_offset

size_t string_table_offset
static

Definition at line 58 of file asn1-gentables.c.

Referenced by insert_string(), and sort_string_table().

◆ string_table_tail

struct name_list_s ** string_table_tail
static

Definition at line 57 of file asn1-gentables.c.

Referenced by insert_string(), and sort_string_table().