From 084bfea79c7a19d8a23f6f48f938af1bce282868 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 5 Jan 2001 00:25:11 +0000 Subject: [PATCH] no longer needed and it died a while back anyway --- tools/cvar_doc.py | 71 ----------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100755 tools/cvar_doc.py diff --git a/tools/cvar_doc.py b/tools/cvar_doc.py deleted file mode 100755 index c3d73b5..0000000 --- a/tools/cvar_doc.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python - -import sys -import re -import string - -cvar_def_re = re.compile(r'Cvar_Get\s*\(\s*(("' + - r'([^"]+)' + - r'")|([^,]+))\s*,\s*(("' + - r'((\\.|[^"\\])*(\n(\\.|[^"\\])*)*)' + - r'")|([^,]+))\s*,\s*' + - r'([^,]+)' + - r'\s*,\s*(("' + - r'((\\.|[^"\\])*(\n(\\.|[^"\\])*)*)' + - r'"\s*)+)\)\s*;') -cvar_get_re = re.compile(r'=\s*Cvar_Get') - -class cvar: - def __init__(self, name, default, flags, desc, source): - self.name = name - self.default = default - self.flags = string.split (flags, '|') - self.desc = desc - self.source = source - def __repr__(self): - return 'cvar(('+`self.name`+','+\ - `self.default`+','+\ - `string.join(self.flags,'|')`+','+\ - `self.desc`+','+\ - `self.source`+')' - def __str__(self): - return self.name+'\n\t'+self.default+'\n\t'+`self.flags`+'\n\t'+self.desc+'\n\t'+self.source[0]+':'+`self.source[1]` - -cvars = [] - -def clean(str): - str=string.strip(str) - if str[0]=='"': - str=str[1:] - if str[-1]=='"': - str=str[:-1] - str = re.sub(r'\s*"\s*\n\s*"\s*', ' ', str) - return str - -def get_cvar_defs(fname): - f=open(fname,'rt').readlines() - i=0 - while (i