Define TRUNCLEN and explain its issues.
This commit is contained in:
parent
cf4adf8d02
commit
f1cb740c41
1 changed files with 6 additions and 1 deletions
7
misc.c
7
misc.c
|
@ -512,9 +512,14 @@ static void tokenize(char *raw, command_t *cmd) {
|
||||||
* in their tools. On the other, not simulating this misbehavior
|
* in their tools. On the other, not simulating this misbehavior
|
||||||
* goes against the goal of making oldstyle as accurate as
|
* goes against the goal of making oldstyle as accurate as
|
||||||
* possible an emulation of the original UI.
|
* possible an emulation of the original UI.
|
||||||
|
*
|
||||||
|
* The definition of TRUNCLEN is dubious. It accurately reflects the
|
||||||
|
* FORTRAN, but it's possible that was a bug and the proper definition
|
||||||
|
* is (TOKLEN).
|
||||||
*/
|
*/
|
||||||
|
#define TRUNCLEN (TOKLEN + TOKLEN)
|
||||||
if (settings.oldstyle) {
|
if (settings.oldstyle) {
|
||||||
cmd->word[0].raw[TOKLEN] = cmd->word[1].raw[TOKLEN] = '\0';
|
cmd->word[0].raw[TRUNCLEN] = cmd->word[1].raw[TRUNCLEN] = '\0';
|
||||||
for (size_t i = 0; i < strlen(cmd->word[0].raw); i++) {
|
for (size_t i = 0; i < strlen(cmd->word[0].raw); i++) {
|
||||||
cmd->word[0].raw[i] = toupper(cmd->word[0].raw[i]);
|
cmd->word[0].raw[i] = toupper(cmd->word[0].raw[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue