Exemplo n.º 1
0
import generate
import rfc3454
import rfc4518
import stringprep

if len(sys.argv) != 3:
    print "usage: %s rfc3454.txt out-dir" % sys.argv[0]
    sys.exit(1)

tables = rfc3454.read(sys.argv[1])
t2 = rfc4518.read()

for x in t2.iterkeys():
    tables[x] = t2[x]

error_list = stringprep.get_errorlist()

errorlist_h = generate.Header('%s/errorlist_table.h' % sys.argv[2])

errorlist_c = generate.Implementation('%s/errorlist_table.c' % sys.argv[2])

errorlist_h.file.write(
'''
#include "windlocl.h"

struct error_entry {
  uint32_t start;
  unsigned len;
  wind_profile_flags flags;
};
Exemplo n.º 2
0
import generate
import rfc3454
import rfc4518
import stringprep

if len(sys.argv) != 3:
    print("usage: %s rfc3454.txt out-dir" % sys.argv[0])
    sys.exit(1)

tables = rfc3454.read(sys.argv[1])
t2 = rfc4518.read()

for x in t2.keys():
    tables[x] = t2[x]

error_list = stringprep.get_errorlist()

errorlist_h = generate.Header('%s/errorlist_table.h' % sys.argv[2])

errorlist_c = generate.Implementation('%s/errorlist_table.c' % sys.argv[2])

errorlist_h.file.write(
'''
#include "windlocl.h"

struct error_entry {
  uint32_t start;
  unsigned len;
  wind_profile_flags flags;
};