[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gtypist] [Daniil Zhilin] Double sentence spacing should be optional
From: |
Felix Natter |
Subject: |
[bug-gtypist] [Daniil Zhilin] Double sentence spacing should be optional |
Date: |
Sat, 10 Nov 2018 17:42:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
hi Mihai,
double sentence spacing in many lesson files is controversial
(see forwarded mail).
I see two solutions:
1. convert all lesson files to single spaces
(but some people like double spacing)
2. leave the lessons as is, but add an option for converting double
spaces to single spaces at runtime (when reading lessons)
Some simple code where I began (2) is attached.
Cheers and Best Regards,
Felix
--- Begin Message ---
Subject: |
[bug-gtypist] Double sentence spacing should be optional |
Date: |
Sat, 18 Feb 2017 03:42:35 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 |
Hello. Considering that, according to Wikipedia, double sentence spacing
is deprecated in English typography and partially deprecated in digital
media, I think that it should at least be optional and properly
explained in lesson texts.
_______________________________________________
bug-gtypist mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-gtypist
--- End Message ---
--
Felix Natter
debian/rules!
/*
* GNU Typist - interactive typing tutor program for UNIX systems
*
* Copyright (C) 2003 GNU Typist Development Team <address@hidden>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Header for some interface details.
#ifndef MISC_H
#define MISC_H
void remove_double_occurrences_of(char* data, int firstIndex, char c);
void strip_double_spaces(char* data);
#endif /* MISC_H */
#include <misc.h>
void
remove_double_occurrences_of(char* data, int firstIndex, char c) {
int numberCharsFound = 1;
while (data[firstIndex + numberCharsFound] == c)
numberCharsFound++;
if (numberCharsFound > 1)
{
int read = firstIndex + numberCharsFound;
int write = firstIndex + 1;
while(data[read] != '\0')
{
data[write++] = data[read++];
}
data[write] = '\0';
}
}
void
strip_double_spaces(char* data) {
int read;
for (read = 0; data[read] != '\0'; read++)
{
if (data[read] == '.' && data[read+1] == ' ')
{
remove_double_occurrences_of(data, read + 1, ' ');
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-gtypist] [Daniil Zhilin] Double sentence spacing should be optional,
Felix Natter <=