diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-04-26 17:28:56 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-04-26 17:28:56 +0200 |
commit | 82a5d35360c4c882d9a5f92c4ac27c61bd4a4cc5 (patch) | |
tree | 8c50e8d74033214e711929c3244e5aca34f9705f /contrib/scripts | |
parent | 51c0c5072fa27f4964778512a0040c77cce7cd04 (diff) | |
download | gnunet-82a5d35360c4c882d9a5f92c4ac27c61bd4a4cc5.tar.gz gnunet-82a5d35360c4c882d9a5f92c4ac27c61bd4a4cc5.zip |
-fix misc typos
Diffstat (limited to 'contrib/scripts')
-rwxr-xr-x | contrib/scripts/check-texinfo.awk.in | 5 | ||||
-rw-r--r-- | contrib/scripts/gdb-iterate-dll.py | 2 | ||||
-rwxr-xr-x | contrib/scripts/gnunet-chk.py.in | 6 | ||||
-rwxr-xr-x | contrib/scripts/visualize_stats.sh | 20 |
4 files changed, 13 insertions, 20 deletions
diff --git a/contrib/scripts/check-texinfo.awk.in b/contrib/scripts/check-texinfo.awk.in index 3d6a1c643..4efa73658 100755 --- a/contrib/scripts/check-texinfo.awk.in +++ b/contrib/scripts/check-texinfo.awk.in | |||
@@ -52,11 +52,6 @@ BEGIN { | |||
52 | } | 52 | } |
53 | 53 | ||
54 | { | 54 | { |
55 | if (/wether/) { | ||
56 | printf "...lines containing a popular typo\n" ; | ||
57 | print FILENAME":"NR":"$0 ; | ||
58 | } | ||
59 | |||
60 | if (/the the/) { | 55 | if (/the the/) { |
61 | printf "...lines containing a popular typo\n" ; | 56 | printf "...lines containing a popular typo\n" ; |
62 | print FILENAME":"NR":"$0 ; | 57 | print FILENAME":"NR":"$0 ; |
diff --git a/contrib/scripts/gdb-iterate-dll.py b/contrib/scripts/gdb-iterate-dll.py index 28c435ccb..882dee039 100644 --- a/contrib/scripts/gdb-iterate-dll.py +++ b/contrib/scripts/gdb-iterate-dll.py | |||
@@ -7,7 +7,7 @@ def search_dll(head, field, match, pfield): | |||
7 | 7 | ||
8 | head: name of the symbol denoting the head of the DLL | 8 | head: name of the symbol denoting the head of the DLL |
9 | field: the field that should be search for match | 9 | field: the field that should be search for match |
10 | match: the mathing value for field | 10 | match: the matching value for field |
11 | pfield: the field whose value is to be printed for matched elements; None to | 11 | pfield: the field whose value is to be printed for matched elements; None to |
12 | print all fields of the matched elemented | 12 | print all fields of the matched elemented |
13 | """ | 13 | """ |
diff --git a/contrib/scripts/gnunet-chk.py.in b/contrib/scripts/gnunet-chk.py.in index afc0924f4..74e9e4cf9 100755 --- a/contrib/scripts/gnunet-chk.py.in +++ b/contrib/scripts/gnunet-chk.py.in | |||
@@ -32,7 +32,7 @@ from functools import reduce | |||
32 | # Defaults | 32 | # Defaults |
33 | DBLOCK_SIZE = (32 * 1024) # Data block size | 33 | DBLOCK_SIZE = (32 * 1024) # Data block size |
34 | 34 | ||
35 | # Pick a multiple of 2 here to achive 8-byte alignment! We also | 35 | # Pick a multiple of 2 here to achieve 8-byte alignment! We also |
36 | # probably want DBlocks to have (roughly) the same size as IBlocks. | 36 | # probably want DBlocks to have (roughly) the same size as IBlocks. |
37 | # With SHA-512, the optimal value is 32768 byte / 128 byte = 256 (128 | 37 | # With SHA-512, the optimal value is 32768 byte / 128 byte = 256 (128 |
38 | # byte = 2 * 512 bits). DO NOT CHANGE! | 38 | # byte = 2 * 512 bits). DO NOT CHANGE! |
@@ -288,7 +288,7 @@ def compute_rootchk(readin, size): | |||
288 | current_depth = 0 | 288 | current_depth = 0 |
289 | chks = [None] * (depth * CHK_PER_INODE) # list buffer | 289 | chks = [None] * (depth * CHK_PER_INODE) # list buffer |
290 | read_offset = 0 | 290 | read_offset = 0 |
291 | logging.debug("Begining to calculate tree hash with depth: " + repr(depth)) | 291 | logging.debug("Beginning to calculate tree hash with depth: " + repr(depth)) |
292 | while True: | 292 | while True: |
293 | if (depth == current_depth): | 293 | if (depth == current_depth): |
294 | off = CHK_PER_INODE * (depth - 1) | 294 | off = CHK_PER_INODE * (depth - 1) |
@@ -370,7 +370,7 @@ if '__main__' == __name__: | |||
370 | opts, args = getopt.getopt(sys.argv[1:], "h", ["help"]) | 370 | opts, args = getopt.getopt(sys.argv[1:], "h", ["help"]) |
371 | except getopt.GetoptError as err: | 371 | except getopt.GetoptError as err: |
372 | print(err) | 372 | print(err) |
373 | print("Exception occured") | 373 | print("Exception occurred") |
374 | usage() | 374 | usage() |
375 | sys.exit(2) | 375 | sys.exit(2) |
376 | for option, value in opts: | 376 | for option, value in opts: |
diff --git a/contrib/scripts/visualize_stats.sh b/contrib/scripts/visualize_stats.sh index aaa5e657b..b3404b164 100755 --- a/contrib/scripts/visualize_stats.sh +++ b/contrib/scripts/visualize_stats.sh | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # | 2 | # |
3 | # This script polls gnunet-stats repeatedly to create statistics plots. | 3 | # This script polls gnunet-stats repeatedly to create statistics plots. |
4 | # Use 'collect' to collect statistics and 'plot' to plot whats been | 4 | # Use 'collect' to collect statistics and 'plot' to plot what has been |
5 | # collected. All plots will be written to $STATDIR as separate .png files. | 5 | # collected. All plots will be written to $STATDIR as separate .png files. |
6 | # | 6 | # |
7 | # WARNING: calling 'collect' will delete all files in $STATDIR. | 7 | # WARNING: calling 'collect' will delete all files in $STATDIR. |
@@ -10,7 +10,7 @@ | |||
10 | # | 10 | # |
11 | # Note: gnuplot syntax has changed across versions. This | 11 | # Note: gnuplot syntax has changed across versions. This |
12 | # script perhaps will not produce color images with older gnuplots. | 12 | # script perhaps will not produce color images with older gnuplots. |
13 | # The script should work atleast with gnuplot 3.8k patchlevel 1. | 13 | # The script should work at least with gnuplot 3.8k patchlevel 1. |
14 | # | 14 | # |
15 | 15 | ||
16 | SLEEP=120 | 16 | SLEEP=120 |
@@ -26,10 +26,10 @@ mkdir -p $STATDIR | |||
26 | case "$1" in | 26 | case "$1" in |
27 | collect) | 27 | collect) |
28 | rm -f $STATDIR/* | 28 | rm -f $STATDIR/* |
29 | 29 | ||
30 | STARTTIME=`date +%s` | 30 | STARTTIME=`date +%s` |
31 | IFS=":" | 31 | IFS=":" |
32 | 32 | ||
33 | while true; do | 33 | while true; do |
34 | NOW=`date +%s` | 34 | NOW=`date +%s` |
35 | RELAT=$[$NOW-$STARTTIME] | 35 | RELAT=$[$NOW-$STARTTIME] |
@@ -45,7 +45,7 @@ case "$1" in | |||
45 | # Write new stats | 45 | # Write new stats |
46 | echo $RELAT $VALUE >>"$STATDIR/$KEY.dat" | 46 | echo $RELAT $VALUE >>"$STATDIR/$KEY.dat" |
47 | echo $RELAT $PREV $VALUE >>"$STATDIR/$KEY.diff" | 47 | echo $RELAT $PREV $VALUE >>"$STATDIR/$KEY.diff" |
48 | 48 | ||
49 | done | 49 | done |
50 | sleep $SLEEP | 50 | sleep $SLEEP |
51 | done | 51 | done |
@@ -61,13 +61,13 @@ case "$1" in | |||
61 | rm "$FILENAME.png" | 61 | rm "$FILENAME.png" |
62 | fi | 62 | fi |
63 | done | 63 | done |
64 | 64 | ||
65 | # Plot diff | 65 | # Plot diff |
66 | ls -1 $STATDIR/*.diff | while read FILENAME; do | 66 | ls -1 $STATDIR/*.diff | while read FILENAME; do |
67 | BASENAME=`basename "$FILENAME" | sed -e "s/ *\..*//g"` | 67 | BASENAME=`basename "$FILENAME" | sed -e "s/ *\..*//g"` |
68 | echo "set terminal png;set output '$FILENAME.png';set title '$BASENAME - diff';plot '$FILENAME' using (\$1/60):(\$3-\$2) title '' with lines;" | nice gnuplot 2> $TMP | 68 | echo "set terminal png;set output '$FILENAME.png';set title '$BASENAME - diff';plot '$FILENAME' using (\$1/60):(\$3-\$2) title '' with lines;" | nice gnuplot 2> $TMP |
69 | EC=`cat $TMP | grep "empty" | grep "Warning" | wc -l` | 69 | EC=`cat $TMP | grep "empty" | grep "Warning" | wc -l` |
70 | if test $EC -ge 1 | 70 | if test $EC -ge 1 |
71 | then | 71 | then |
72 | rm "$FILENAME.png" | 72 | rm "$FILENAME.png" |
73 | fi | 73 | fi |
@@ -80,7 +80,5 @@ case "$1" in | |||
80 | *) | 80 | *) |
81 | echo $"Usage: $0 {collect|plot|view}" | 81 | echo $"Usage: $0 {collect|plot|view}" |
82 | exit 1 | 82 | exit 1 |
83 | |||
84 | esac | ||
85 | 83 | ||
86 | 84 | esac | |