mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
Fix most brutal breakages introduced by commit 974a567
The cleanup commit 974a567 added some stub namespace-addition code to
project-text-files.py, which was never completed, but which broke all
other functionality of project-text-files.py. This commit doesn't
complete the implementation, but restores its previous functionality.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
101bad0617
commit
70117f9d34
1 changed files with 5 additions and 4 deletions
|
|
@ -83,14 +83,15 @@ class Cmd(jwutils.Cmd):
|
|||
r = r + line
|
||||
return r
|
||||
|
||||
def self._add_namespace_to_header(self, data, ns_new):
|
||||
def _add_namespace_to_header(self, data, ns_new):
|
||||
lines = data.splitlines()
|
||||
old = None
|
||||
ns_cur = []
|
||||
for line in iter(lines):
|
||||
match = re.sub('^ *namespace[ \t]*([^ ]+)[ \t]*{.*', '\\1', line)
|
||||
if match != line:
|
||||
ns_cur = match(blah, bl
|
||||
#ns_cur = match(blah, bl
|
||||
raise Exception("Name space addition is not yet implemented")
|
||||
classname = re.sub('^ *#[ \t]*ifndef[\t ]+([^ ]+)($|[ \t/;])', '\\1', line)
|
||||
|
||||
def _fix_multiple_inclusion_preventer(self, prefix, path):
|
||||
|
|
@ -292,8 +293,8 @@ class CmdAddCppNamespace(Cmd):
|
|||
data = self._add_namespace_to_header(data, namespace)
|
||||
elif ext in _exts_cpp:
|
||||
data = self._add_using_namespace(data, namespace)
|
||||
elif:
|
||||
continue
|
||||
#elif: Not sure what this was meant to do
|
||||
# continue
|
||||
if data == odata:
|
||||
continue
|
||||
tmp = path + '.' + ('rep' if args.backup is None else args.backup)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue