Fix some spelling errors in tools folder

This commit is contained in:
Martin Mathieson 2024-07-08 20:56:12 +00:00
parent 409bb10764
commit b37c836a2d
16 changed files with 82 additions and 39 deletions

View File

@ -2214,7 +2214,7 @@ class EthCtx:
print(', '.join(dep))
# end of print_mod()
(mod_ord, mod_cyc) = dependency_compute(self.module_ord, self.module, ignore_fn = lambda t: t not in self.module)
print("\n# ASN.1 Moudules")
print("\n# ASN.1 Modules")
print("Module name Dependency")
print("-" * 100)
new_ord = False
@ -2222,7 +2222,7 @@ class EthCtx:
print_mod(m)
new_ord = new_ord or (self.module_ord.index(m) != mod_ord.index(m))
if new_ord:
print("\n# ASN.1 Moudules - in dependency order")
print("\n# ASN.1 Modules - in dependency order")
print("Module name Dependency")
print("-" * 100)
for m in (mod_ord):
@ -7323,11 +7323,11 @@ def p_cls_syntax_list_2 (t):
# X.681
def p_cls_syntax_1 (t):
'cls_syntax : Type IDENTIFIED BY Value'
t[0] = { get_class_fieled(' ') : t[1], get_class_fieled(' '.join((t[2], t[3]))) : t[4] }
t[0] = { get_class_field(' ') : t[1], get_class_field(' '.join((t[2], t[3]))) : t[4] }
def p_cls_syntax_2 (t):
'cls_syntax : HAS PROPERTY Value'
t[0] = { get_class_fieled(' '.join(t[1:-1])) : t[-1:][0] }
t[0] = { get_class_field(' '.join(t[1:-1])) : t[-1:][0] }
# X.880
def p_cls_syntax_3 (t):
@ -7340,17 +7340,17 @@ def p_cls_syntax_3 (t):
| PRIORITY Value
| ALWAYS RESPONDS BooleanValue
| IDEMPOTENT BooleanValue '''
t[0] = { get_class_fieled(' '.join(t[1:-1])) : t[-1:][0] }
t[0] = { get_class_field(' '.join(t[1:-1])) : t[-1:][0] }
def p_cls_syntax_4 (t):
'''cls_syntax : ARGUMENT Type
| RESULT Type
| PARAMETER Type '''
t[0] = { get_class_fieled(t[1]) : t[2] }
t[0] = { get_class_field(t[1]) : t[2] }
def p_cls_syntax_5 (t):
'cls_syntax : CODE Value'
fld = get_class_fieled(t[1]);
fld = get_class_field(t[1]);
t[0] = { fld : t[2] }
if isinstance(t[2], ChoiceValue):
fldt = fld + '.' + t[2].choice
@ -7360,7 +7360,7 @@ def p_cls_syntax_6 (t):
'''cls_syntax : ARGUMENT Type OPTIONAL BooleanValue
| RESULT Type OPTIONAL BooleanValue
| PARAMETER Type OPTIONAL BooleanValue '''
t[0] = { get_class_fieled(t[1]) : t[2], get_class_fieled(' '.join((t[1], t[3]))) : t[4] }
t[0] = { get_class_field(t[1]) : t[2], get_class_field(' '.join((t[1], t[3]))) : t[4] }
# 12 Information object set definition and assignment
@ -7506,7 +7506,7 @@ def is_class_syntax(name):
return False
return name in class_syntaxes[class_current_syntax]
def get_class_fieled(name):
def get_class_field(name):
if not class_current_syntax:
return None
return class_syntaxes[class_current_syntax][name]

View File

@ -448,7 +448,7 @@ parser.add_argument('--file', action='append',
help='specify individual file to test')
parser.add_argument('--folder', action='append',
help='specify folder to test')
parser.add_argument('--glob', action='store', default='',
parser.add_argument('--glob', action='append',
help='specify glob to test - should give in "quotes"')
parser.add_argument('--no-recurse', action='store_true', default='',
help='do not recurse inside chosen folder(s)')
@ -560,12 +560,13 @@ if args.open:
if args.glob:
# Add specified file(s)
for f in glob.glob(args.glob):
if not os.path.isfile(f):
print('Chosen file', f, 'does not exist.')
exit(1)
else:
files.append(f)
for g in args.glob:
for f in glob.glob(g):
if not os.path.isfile(f):
print('Chosen file', f, 'does not exist.')
exit(1)
else:
files.append(f)
if args.folder:
for folder in args.folder:

View File

@ -12,7 +12,7 @@ import argparse
import signal
# This utility scans for tfs items, and works out if standard ones
# could have been used intead (from epan/tfs.c)
# could have been used instead (from epan/tfs.c)
# Can also check for value_string where common tfs could be used instead.
# TODO:
@ -197,7 +197,7 @@ class Item:
self.strings = strings
self.mask = mask
# N.B. Not sestting mask by looking up macros.
# N.B. Not setting mask by looking up macros.
self.item_type = item_type
self.type_modifier = type_modifier

View File

@ -183,7 +183,7 @@ class APICheck:
if self.fun_name.find('add_bits') == -1 and call.hf_name in items_defined:
if call.length and items_defined[call.hf_name].item_type in item_lengths:
if item_lengths[items_defined[call.hf_name].item_type] < call.length:
# Don't warn if adding value - value is unlkely to just be bytes value
# Don't warn if adding value - value is unlikely to just be bytes value
if self.fun_name.find('_add_uint') == -1:
print('Warning:', self.file + ':' + str(call.line_number),
self.fun_name + ' called for', call.hf_name, ' - ',

View File

@ -291,7 +291,7 @@ sub remove_quoted_strings {
sub remove_if0_code {
my ($codeRef, $fileName) = @_;
# Preprocess outputput (ensure trailing LF and no leading WS before '#')
# Preprocess output (ensure trailing LF and no leading WS before '#')
$$codeRef =~ s/^\s*#/#/m;
if ($$codeRef !~ /\n$/) { $$codeRef .= "\n"; }

View File

@ -5,7 +5,7 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
'''\
convert-glib-types.py - Convert glib types to their C and C99 eqivalents.
convert-glib-types.py - Convert glib types to their C and C99 equivalents.
'''
# Imports
@ -112,11 +112,11 @@ def convert_file(file):
print(f'Converted {file}')
def main():
parser = argparse.ArgumentParser(description='Convert glib types to their C and C99 eqivalents.')
parser = argparse.ArgumentParser(description='Convert glib types to their C and C99 equivalents.')
parser.add_argument('files', metavar='FILE', nargs='*')
args = parser.parse_args()
# Build a padded version of type_map which attempts to preseve alignment
# Build a padded version of type_map which attempts to preserve alignment
for glib_type, c99_type in type_map.items():
pg_type = glib_type + ' '
pc_type = c99_type + ' '

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
# Generate Wireshark Dissectors for eletronic trading/market data
# Generate Wireshark Dissectors for electronic trading/market data
# protocols such as ETI/EOBI.
#
# Targets Wireshark 3.5 or later.
@ -1121,7 +1121,7 @@ def group_members(e, dt):
def parse_args():
p = argparse.ArgumentParser(description='Generate Wireshark Dissector for ETI/EOBI style protocol specifictions')
p = argparse.ArgumentParser(description='Generate Wireshark Dissector for ETI/EOBI style protocol specifications')
p.add_argument('filename', help='protocol description XML file')
p.add_argument('--proto', default='eti',
help='short protocol name (default: %(default)s)')

View File

@ -3369,7 +3369,7 @@ install_all() {
install_curl
#
# Now intall xz: it is the sole download format of glib later than 2.31.2.
# Now install xz: it is the sole download format of glib later than 2.31.2.
#
install_xz
@ -3993,7 +3993,7 @@ then
#
# Set the minimum OS version for which to build to the specified
# minimum target OS version, so we don't, for example, end up using
# linker features supported by the OS verson on which we're building
# linker features supported by the OS version on which we're building
# but not by the target version.
#
VERSION_MIN_FLAGS="-mmacosx-version-min=$min_osx_target"

View File

@ -223,7 +223,7 @@ for uuids in uuids_sources:
'''
Do a check on duplicate entries.
While at it, do a count of the number of UUIDs retreived.
While at it, do a count of the number of UUIDs retrieved.
'''
prev_uuid = 0
uuid_count = 0

View File

@ -29,7 +29,7 @@ def exit_msg(msg=None, status=1):
def open_url(url):
'''Open a URL.
Returns a tuple containing the body and response dict. The body is a
str in Python 3 and bytes in Python 2 in order to be compatibile with
str in Python 3 and bytes in Python 2 in order to be compatible with
csv.reader.
'''

View File

@ -36,7 +36,7 @@ def exit_msg(msg=None, status=1):
def open_url(url):
'''Open a URL.
Returns a tuple containing the body and response dict. The body is a
str in Python 3 and bytes in Python 2 in order to be compatibile with
str in Python 3 and bytes in Python 2 in order to be compatible with
csv.reader.
'''

View File

@ -5850,7 +5850,7 @@ def define_errors():
errors[0xff0d] = "Object associated with ObjectID is not a manager"
errors[0xff0e] = "Invalid initial semaphore value"
errors[0xff0f] = "The semaphore handle is not valid"
errors[0xff10] = "SemaphoreHandle is not associated with a valid sempahore"
errors[0xff10] = "SemaphoreHandle is not associated with a valid semaphore"
errors[0xff11] = "Invalid semaphore handle"
errors[0xff12] = "Transaction tracking is not available"
errors[0xff13] = "The transaction has not yet been written to disk"
@ -8486,7 +8486,7 @@ proto_register_ncp2222(void)
{ "Vendor Name", "ncp.vendor_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_hardware_name,
{ "Hardware Name", "ncp.harware_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "Hardware Name", "ncp.hardware_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_no_request_record_found,
{ "No request record found. Parsing is impossible.", "ncp.no_request_record_found", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},

View File

@ -666,7 +666,7 @@ sub register_element($$$$;$)
given ($e->name()) {
when ('pad') { return; } # Pad has no variables
when ('switch') { return; } # Switch defines varaibles in a tighter scope to avoid collisions
when ('switch') { return; } # Switch defines variables in a tighter scope to avoid collisions
}
# Register field with wireshark

View File

@ -218,7 +218,7 @@ then
# OpenSUSE additionally has a separate Qt5PrintSupport package.
add_package BASIC_LIST qt5-qtmultimedia-devel ||
add_packages BASIC_LIST libqt5-qtmultimedia-devel libQt5PrintSupport-devel ||
echo "Required Qt5 Mutlimedia and/or Qt5 Print Support is unavailable" >&2
echo "Required Qt5 Multimedia and/or Qt5 Print Support is unavailable" >&2
# This is only required on OpenSUSE
add_package BASIC_LIST libqt5-qtsvg-devel ||
@ -258,7 +258,7 @@ fi
# This in only required on OpenSUSE
add_packages BASIC_LIST hicolor-icon-theme xdg-utils ||
echo "Required OpenSUSE packages hicolor-icon-theme and xdg-utils are unavailable. Not required for other distirbutions." >&2
echo "Required OpenSUSE packages hicolor-icon-theme and xdg-utils are unavailable. Not required for other distributions." >&2
# This in only required (and available) on OpenSUSE
add_package BASIC_LIST update-desktop-files ||

View File

@ -238,7 +238,7 @@ class wireshark_gen_C:
rt = op.returnType()
if rt.kind() != idltype.tk_void:
if rt.kind() == idltype.tk_alias: # a typdef return val possibly ?
if rt.kind() == idltype.tk_alias: # a typedef return val possibly ?
#self.get_CDR_alias(rt, rt.name())
if rt.unalias().kind() == idltype.tk_sequence:
self.st.out(self.template_hf, name=sname + "_return_loop")
@ -482,7 +482,7 @@ class wireshark_gen_C:
def genAtList(self, atlist):
"""in: atlist
out: C code for IDL attribute decalarations.
out: C code for IDL attribute declarations.
ie: def genAtlist(self,atlist,language)
"""
@ -502,7 +502,7 @@ class wireshark_gen_C:
def genEnList(self, enlist):
"""in: enlist
out: C code for IDL Enum decalarations using "static const value_string" template
out: C code for IDL Enum declarations using "static const value_string" template
"""
self.st.out(self.template_comment_enums_start)
@ -1110,7 +1110,7 @@ class wireshark_gen_C:
string_digits = '%i ' % type.digits() # convert int to string
string_scale = '%i ' % type.scale() # convert int to string
string_length = '%i ' % self.dig_to_len(type.digits()) # how many octets to hilight for a number of digits
string_length = '%i ' % self.dig_to_len(type.digits()) # how many octets to highlight for a number of digits
self.st.out(self.template_get_CDR_fixed, hfname=pn, digits=string_digits, scale=string_scale, length=string_length)
self.addvar(self.c_seq)

View File

@ -110,6 +110,7 @@ arbitrated
arcnet
arduino
arfcn
argparse
arista
armscii
arphrd
@ -159,6 +160,7 @@ authtoken
authtype
authz
autocompletions
autoconf
autoconfiguration
autodiscovery
autoneg
@ -198,6 +200,7 @@ bgpspec
bharti
bibliographic
bibliography
bidir
bidirection
bidirectional
bidirectionally
@ -304,6 +307,7 @@ centre
centric
centrino
cfilters
cflags
cframe
chacha
chan1
@ -386,6 +390,7 @@ colorized
colorizing
colormap
colour
colouring
combi
combiner
combiners
@ -423,6 +428,7 @@ connid
connp
conout
const
constr
contactless
contextp
contiguity
@ -472,6 +478,7 @@ curvezmq
customizable
customization
customizing
cxxflags
cyber
cymru
cyphering
@ -516,6 +523,7 @@ december
decentralization
dechunk
decimals
declarator
decnet
decompressed
decompressing
@ -578,6 +586,7 @@ deregistering
deregistration
derivate
des40
descname
descr
descriptor
descriptors
@ -593,6 +602,7 @@ destport
determinant
deutschland
devcap
devel
devfs
deviceid
devmode
@ -623,6 +633,7 @@ digium
dilithium
diplexer
directionality
dirname
disambiguate
disambiguation
discontinuities
@ -632,6 +643,7 @@ dishnet
dissection
dissector
dissectors
distclean
distinguisher
distrib
distributions
@ -644,6 +656,7 @@ dlsch
dlstatus
dmacros
dmepi
dmrpc
dmx4all
dnskey
dnsop
@ -699,6 +712,7 @@ elektronik
elided
elink
ellipsoid
elsif
emlsr
emulates
emule
@ -749,10 +763,12 @@ equiv
equivalence
ericsson
erldp
errcnt
errinf
errno
errorcode
errored
errorlog
errorportinfo
erspan
España
@ -766,6 +782,7 @@ ethercat
ethernet
ethers
ethertype
ethname
etisalat
etlfile
ettarr
@ -821,6 +838,7 @@ fileseg
fileset
filsfils
filter2d
finditer
firefox
firewall
fiveco
@ -838,6 +856,7 @@ flowset
flowspec
fmconfig
fmdata
fname
foffset
followup
foobar
@ -962,6 +981,7 @@ hfarr
hfill,
hfindex
hfinfo
hfname
HI2Operations
histogram
historizing
@ -1003,6 +1023,7 @@ ideographic
idiographic
idl2deb
idl2wrs
idltype
iec60870
ieee1609dot
ieee17221
@ -1130,6 +1151,7 @@ isakmp
isatap
iscsi
iseries
isinstance
isobus
isocenter
isochronous
@ -1188,10 +1210,13 @@ lbmpdm
lcgid
lcids
lcsap
ldflags
leasequery
legitimisation
lempar
level1login
lexer
lexpos
lfsck
libcap
libgcrypt
@ -1218,6 +1243,7 @@ literals
lithionics
llcgprs
lnpdqp
localise
locamation
locoinfof
logcat
@ -1348,6 +1374,7 @@ modulo
modulus
modus
monday
moscow
motorola
móviles
mozilla
@ -1424,6 +1451,7 @@ nasdaq
nbifom
nbrar
ndpsm
ndriver
nederland
negotiability
neighbour
@ -1508,6 +1536,7 @@ nssvc
nstat
nstime
nstrace
nstring
nt4change
ntlmssp
ntlmv
@ -1645,6 +1674,7 @@ pdsch
pdustatus
peeraddr
peerkey
pentium
periodicities
periodicity
peripherals
@ -1716,6 +1746,7 @@ prefs
preloaded
prepay
prepend
preprocessor
preshared
prettification
printf
@ -1735,6 +1766,7 @@ promiscsniff
promiscuously
propertykey
prosody
protabbrev
protected
proto
protoabbrev
@ -1886,6 +1918,7 @@ regex
regexp
regid
regionid
regname
reimplement
reimplementation
reimplemented
@ -1947,6 +1980,7 @@ resized
resolvable
resolver
resolvers
restofline
resub
resubmission
resync
@ -2052,6 +2086,7 @@ scrollbar
sczdx
sdcch
sdjournal
sdkflags
sdram
sdusize
sectigo
@ -2133,6 +2168,7 @@ slimp
slovak
slsch
smime
sminfo
smpdirected
smpte
smrse
@ -2151,6 +2187,7 @@ sonet
spacebar
spacetel
spacings
spandsp
spanish
spare
spare1
@ -2167,6 +2204,7 @@ specifier
specifiers
spectrograph
speex
speexdsp
spirent
spline
spnego
@ -2196,6 +2234,7 @@ stateful
statfs
statsum
statusbar
statvfs
stderr
stdin
stdio
@ -2358,6 +2397,7 @@ tipcv
titlebar
tlvlen
tlvtype
tname
tobago
toggled
toggles
@ -2448,6 +2488,7 @@ unack
unacked
unadmitted
unadvise
unalias
unaligned
unallocated
unallowed
@ -2606,6 +2647,7 @@ uploading
uploads
uptime
urlencoded
urllib
urnti
usability
usbdump