mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 19:22:40 +01:00
c2english: minor clean-ups
This commit is contained in:
parent
31ae34e17e
commit
68ed2e7580
@ -1895,27 +1895,33 @@ constant:
|
||||
$modifier = '32-bit character ' if $constant =~ s/^U//;
|
||||
|
||||
if ($constant eq q('\n')) {
|
||||
$return = "a $modifier" . 'newline';
|
||||
"a $modifier" . 'newline';
|
||||
} elsif ($constant eq q('\f')) {
|
||||
$return = "a $modifier" . 'form-feed character';
|
||||
"a $modifier" . 'form-feed character';
|
||||
} elsif ($constant eq q('\t')) {
|
||||
$return = "a $modifier" . 'tab';
|
||||
"a $modifier" . 'tab';
|
||||
} elsif ($constant eq q('\v')) {
|
||||
$return = "a $modifier" . 'vertical tab';
|
||||
"a $modifier" . 'vertical tab';
|
||||
} elsif ($constant eq q('\a')) {
|
||||
$return = 'an alert character' if not length $modifier;
|
||||
$return = "a $modifier" . 'alert character' if length $modifier;
|
||||
} elsif ($constant eq q('\r')) {
|
||||
$return = "a $modifier" . 'carriage-return';
|
||||
} elsif ($constant eq q('\b')) {
|
||||
$return = "a $modifier" . 'backspace character';
|
||||
} elsif ($constant eq q('\'')) {
|
||||
$return = "a $modifier" . 'single-quote';
|
||||
} elsif ($constant eq q(' ')) {
|
||||
$return = "a $modifier" . 'space';
|
||||
if (not length $modifier) {
|
||||
'an alert character'
|
||||
} else {
|
||||
$return = $constant if not length $modifier;
|
||||
$return = "a $modifier$constant" if length $modifier;
|
||||
"a $modifier" . 'alert character'
|
||||
}
|
||||
} elsif ($constant eq q('\r')) {
|
||||
"a $modifier" . 'carriage-return';
|
||||
} elsif ($constant eq q('\b')) {
|
||||
"a $modifier" . 'backspace character';
|
||||
} elsif ($constant eq q('\'')) {
|
||||
"a $modifier" . 'single-quote';
|
||||
} elsif ($constant eq q(' ')) {
|
||||
"a $modifier" . 'space';
|
||||
} else {
|
||||
if (not length $modifier) {
|
||||
$constant
|
||||
} else {
|
||||
"a $modifier$constant"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user