Some more spelling fixes.
Changed script to allow recursive search for multi-words.
This commit is contained in:
parent
4bd5830cda
commit
d06287ec2e
|
@ -480,13 +480,13 @@ static int hf_msg_auth_reply_proto = -1;
|
|||
static int hf_msg_auth_reply_result = -1;
|
||||
static int hf_msg_auth_reply_global_id = -1;
|
||||
static int hf_msg_auth_reply_msg = -1;
|
||||
static int hf_msg_mon_getverison = -1;
|
||||
static int hf_msg_mon_getverison_tid = -1;
|
||||
static int hf_msg_mon_getverison_what = -1;
|
||||
static int hf_msg_mon_getverisonreply = -1;
|
||||
static int hf_msg_mon_getverisonreply_tid = -1;
|
||||
static int hf_msg_mon_getverisonreply_ver = -1;
|
||||
static int hf_msg_mon_getverisonreply_veroldest = -1;
|
||||
static int hf_msg_mon_getversion = -1;
|
||||
static int hf_msg_mon_getversion_tid = -1;
|
||||
static int hf_msg_mon_getversion_what = -1;
|
||||
static int hf_msg_mon_getversionreply = -1;
|
||||
static int hf_msg_mon_getversionreply_tid = -1;
|
||||
static int hf_msg_mon_getversionreply_ver = -1;
|
||||
static int hf_msg_mon_getversionreply_veroldest = -1;
|
||||
static int hf_msg_mds_map = -1;
|
||||
static int hf_msg_mds_map_fsid = -1;
|
||||
static int hf_msg_mds_map_epoch = -1;
|
||||
|
@ -4664,15 +4664,15 @@ guint c_dissect_msg_mon_getversion(proto_tree *root,
|
|||
|
||||
c_set_type(data, "Monitor Get Version");
|
||||
|
||||
ti = proto_tree_add_item(root, hf_msg_mon_getverison, tvb, off, front_len, ENC_NA);
|
||||
ti = proto_tree_add_item(root, hf_msg_mon_getversion, tvb, off, front_len, ENC_NA);
|
||||
tree = proto_item_add_subtree(ti, ett_msg_mon_getversion);
|
||||
|
||||
tid = tvb_get_letoh64(tvb, off);
|
||||
proto_tree_add_item(tree, hf_msg_mon_getverison_tid,
|
||||
proto_tree_add_item(tree, hf_msg_mon_getversion_tid,
|
||||
tvb, off, 8, ENC_LITTLE_ENDIAN);
|
||||
off += 8;
|
||||
|
||||
off = c_dissect_str(tree, hf_msg_mon_getverison_what, &what, tvb, off);
|
||||
off = c_dissect_str(tree, hf_msg_mon_getversion_what, &what, tvb, off);
|
||||
|
||||
|
||||
c_append_text(data, ti, ", TID: %"G_GINT64_MODIFIER"u, What: %s",
|
||||
|
@ -4701,21 +4701,21 @@ guint c_dissect_msg_mon_getversionreply(proto_tree *root,
|
|||
|
||||
c_set_type(data, "Monitor Get Version Reply");
|
||||
|
||||
ti = proto_tree_add_item(root, hf_msg_mon_getverisonreply, tvb, off, front_len, ENC_NA);
|
||||
ti = proto_tree_add_item(root, hf_msg_mon_getversionreply, tvb, off, front_len, ENC_NA);
|
||||
tree = proto_item_add_subtree(ti, ett_msg_mon_getversionreply);
|
||||
|
||||
tid = tvb_get_letoh64(tvb, off);
|
||||
proto_tree_add_item(tree, hf_msg_mon_getverisonreply_tid,
|
||||
proto_tree_add_item(tree, hf_msg_mon_getversionreply_tid,
|
||||
tvb, off, 8, ENC_LITTLE_ENDIAN);
|
||||
off += 8;
|
||||
|
||||
ver = tvb_get_letoh64(tvb, off);
|
||||
proto_tree_add_item(tree, hf_msg_mon_getverisonreply_ver,
|
||||
proto_tree_add_item(tree, hf_msg_mon_getversionreply_ver,
|
||||
tvb, off, 8, ENC_LITTLE_ENDIAN);
|
||||
off += 8;
|
||||
|
||||
veroldest = tvb_get_letoh64(tvb, off);
|
||||
proto_tree_add_item(tree, hf_msg_mon_getverisonreply_veroldest,
|
||||
proto_tree_add_item(tree, hf_msg_mon_getversionreply_veroldest,
|
||||
tvb, off, 8, ENC_LITTLE_ENDIAN);
|
||||
off += 8;
|
||||
|
||||
|
@ -9189,38 +9189,38 @@ proto_register_ceph(void)
|
|||
FT_STRING, BASE_NONE, NULL, 0,
|
||||
NULL, HFILL
|
||||
} },
|
||||
{ &hf_msg_mon_getverison, {
|
||||
"Get Version", "ceph.msg.mon.getverison",
|
||||
{ &hf_msg_mon_getversion, {
|
||||
"Get Version", "ceph.msg.mon.getversion",
|
||||
FT_NONE, BASE_NONE, NULL, 0,
|
||||
NULL, HFILL
|
||||
} },
|
||||
{ &hf_msg_mon_getverison_tid, {
|
||||
"Transaction ID", "ceph.msg.mon.getverison.tid",
|
||||
{ &hf_msg_mon_getversion_tid, {
|
||||
"Transaction ID", "ceph.msg.mon.getversion.tid",
|
||||
FT_UINT64, BASE_DEC, NULL, 0,
|
||||
NULL, HFILL
|
||||
} },
|
||||
{ &hf_msg_mon_getverison_what, {
|
||||
"What", "ceph.msg.mon.getverison.what",
|
||||
{ &hf_msg_mon_getversion_what, {
|
||||
"What", "ceph.msg.mon.getversion.what",
|
||||
FT_STRING, BASE_NONE, NULL, 0,
|
||||
NULL, HFILL
|
||||
} },
|
||||
{ &hf_msg_mon_getverisonreply, {
|
||||
"Get Version Reply", "ceph.msg.mon.getverisonreply",
|
||||
{ &hf_msg_mon_getversionreply, {
|
||||
"Get Version Reply", "ceph.msg.mon.getversionreply",
|
||||
FT_NONE, BASE_NONE, NULL, 0,
|
||||
NULL, HFILL
|
||||
} },
|
||||
{ &hf_msg_mon_getverisonreply_tid, {
|
||||
"Transaction ID", "ceph.msg.mon.getverisonreply.tid",
|
||||
{ &hf_msg_mon_getversionreply_tid, {
|
||||
"Transaction ID", "ceph.msg.mon.getversionreply.tid",
|
||||
FT_UINT64, BASE_DEC, NULL, 0,
|
||||
NULL, HFILL
|
||||
} },
|
||||
{ &hf_msg_mon_getverisonreply_ver, {
|
||||
"Version", "ceph.msg.mon.getverisonreply.ver",
|
||||
{ &hf_msg_mon_getversionreply_ver, {
|
||||
"Version", "ceph.msg.mon.getversionreply.ver",
|
||||
FT_UINT64, BASE_DEC, NULL, 0,
|
||||
NULL, HFILL
|
||||
} },
|
||||
{ &hf_msg_mon_getverisonreply_veroldest, {
|
||||
"Oldest Version", "ceph.msg.mon.getverisonreply.veroldest",
|
||||
{ &hf_msg_mon_getversionreply_veroldest, {
|
||||
"Oldest Version", "ceph.msg.mon.getversionreply.veroldest",
|
||||
FT_UINT64, BASE_DEC, NULL, 0,
|
||||
NULL, HFILL
|
||||
} },
|
||||
|
|
|
@ -8390,7 +8390,7 @@ static const value_string gsm_rlcmac_val_plus_1_vals[] = {
|
|||
|
||||
static const true_false_string gsm_rlcmac_psi1_measurement_order_value = {
|
||||
"MS shall send measurement reports for cell re-selection",
|
||||
"MS performs cell re-selection in both packet idle and transfert mode and shall not send any measurement reports to the network"
|
||||
"MS performs cell re-selection in both packet idle and transfer mode and shall not send any measurement reports to the network"
|
||||
};
|
||||
|
||||
static const value_string gsm_rlcmac_nmo_vals[] = {
|
||||
|
|
|
@ -152,12 +152,12 @@ static const value_string pn_rsi_add_flags_morefrag[] = {
|
|||
|
||||
static const value_string pn_rsi_add_flags_notification[] = {
|
||||
{ 0x00, "No action necessary" },
|
||||
{ 0x01, "The ApplicationReadyBlock is available for reading with the service ReadNotificaton" },
|
||||
{ 0x01, "The ApplicationReadyBlock is available for reading with the service ReadNotification" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const range_string pn_rsi_seq_num[] = {
|
||||
{ 0x0000, 0x7FFF, "synchronization and transmission between initiator and responser" },
|
||||
{ 0x0000, 0x7FFF, "synchronization and transmission between initiator and responder" },
|
||||
{ 0x8000, 0xFFFD, "Reserved" },
|
||||
{ 0xFFFE, 0xFFFE, "synchronize initiator and responder for establishment of an AR" },
|
||||
{ 0xFFFF, 0xFFFF, "Reserved" },
|
||||
|
@ -184,7 +184,7 @@ static const value_string pn_rsi_f_opnum_offset_opnum[] = {
|
|||
{ 0x02, "Read" },
|
||||
{ 0x03, "Write" },
|
||||
{ 0x04, "Control" },
|
||||
{ 0x05, "ReadImplcit" },
|
||||
{ 0x05, "ReadImplicit" },
|
||||
{ 0x06, "ReadConnectionless" },
|
||||
{ 0x07, "ReadNotification" },
|
||||
{ 0x08, "PrmWriteMore" },
|
||||
|
|
|
@ -99,6 +99,7 @@ class File:
|
|||
return False
|
||||
|
||||
# Try splitting into 2 words recognised at various points.
|
||||
# Allow 3-letter words.
|
||||
length = len(word)
|
||||
for idx in range(3, length-3):
|
||||
word1 = word[0:idx]
|
||||
|
@ -107,19 +108,29 @@ class File:
|
|||
if not spell.unknown([word1, word2]):
|
||||
return True
|
||||
|
||||
# Run through, looking for any number of separate words.
|
||||
next_word_start = 0
|
||||
for idx in range(1, length+1):
|
||||
w = word[next_word_start:idx]
|
||||
# N.B. allowing shorter words ends in gibberish being accepted.
|
||||
if len(w) >= 4 and not spell.unknown([w]):
|
||||
next_word_start = idx
|
||||
if next_word_start == length:
|
||||
return True
|
||||
return self.checkMultiWordsRecursive(word)
|
||||
|
||||
def checkMultiWordsRecursive(self, word):
|
||||
length = len(word)
|
||||
#print('word=', word)
|
||||
if length < 4:
|
||||
return False
|
||||
|
||||
for idx in range(4, length+1):
|
||||
w = word[0:idx]
|
||||
#print('considering', w)
|
||||
if not spell.unknown([w]):
|
||||
#print('Recognised!')
|
||||
if idx == len(word):
|
||||
#print('Was end of word, so TRUEE!!!!')
|
||||
return True
|
||||
else:
|
||||
#print('More to go..')
|
||||
if self.checkMultiWordsRecursive(word[idx:]):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
# Check the spelling of all the words we have found
|
||||
def spellCheck(self):
|
||||
|
||||
|
|
|
@ -17269,7 +17269,7 @@ void QCPSelectionDecoratorBracket::drawBracket(QCPPainter *painter, int directio
|
|||
}
|
||||
default:
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "unknown/custom bracket style can't be handeld by default implementation:" << static_cast<int>(mBracketStyle);
|
||||
qDebug() << Q_FUNC_INFO << "unknown/custom bracket style can't be handled by default implementation:" << static_cast<int>(mBracketStyle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue