Package: jack / 3.1.1+cvs20050801-31

16_len_unusable_replacement.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Print a warning if the number of elements of replacement_chars and
unusable_chars is different.

--- a/jack_checkopts.py~	2005-12-01 10:50:25.000000000 +0000
+++ b/jack_checkopts.py	2005-12-01 10:53:54.000000000 +0000
@@ -135,6 +135,7 @@
 
     # stretch replacement_chars
     if len(cf['_unusable_chars']) > len(cf['_replacement_chars']):
+        warning("unusable_chars contains more elements than replacement_chars")
         u, r = cf['_unusable_chars'], cf['_replacement_chars']
         while len(u) > len(r):
             if type(r) == types.ListType:
@@ -145,6 +146,9 @@
                 error("unsupported type: " + `type(cf['replacement_chars']['val'][-1])`)
         cf.rupdate({'replacement_chars': {'val': r}}, "check")
         del u, r
+    elif len(cf['_replacement_chars']) > len(cf['_unusable_chars']):
+        # This has no practical negative effect but print a warning anyway
+        warning("replacement_chars contains more elements than unusable_chars")
 
     if cf['silent_mode']['val']:
         cf['terminal']['val'] = "dumb"