diff options
Diffstat (limited to 'accel-pptpd/ctrl/l2tp/dict2c.py')
-rw-r--r-- | accel-pptpd/ctrl/l2tp/dict2c.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/accel-pptpd/ctrl/l2tp/dict2c.py b/accel-pptpd/ctrl/l2tp/dict2c.py deleted file mode 100644 index ff0961e..0000000 --- a/accel-pptpd/ctrl/l2tp/dict2c.py +++ /dev/null @@ -1,20 +0,0 @@ -import sys,re - -hdr = file(sys.argv[2],'w') - -def process(fname, hdr): - for line in file(fname): - if line[:-1].strip() == '': - continue - if line[0] == '#': - continue - f = re.compile('[$.a-zA-Z0-9\-]+').findall(line) - if f[0] == 'ATTRIBUTE' or f[0] == 'VENDOR': - hdr.write('#define {0} {1}\n'.format(f[1].replace('-','_').replace('.','_'), f[2])) - elif f[0] == 'VALUE': - hdr.write('#define {0}_{1} {2}\n'.format(f[1].replace('-','_').replace('.','_'), f[2].replace('-','_'),f[3])) - elif f[0] == '$INCLUDE': - process(f[1], hdr) - -if __name__ == '__main__': - process(sys.argv[1], hdr) |