lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev [PATCH to dev18] fix posting to news (when external editor is u


From: Vlad Harchev
Subject: lynx-dev [PATCH to dev18] fix posting to news (when external editor is used)
Date: Sun, 30 Jan 2000 12:57:28 +0400 (SAMT)

* Use (!isspace(c)) instead of (isgraph(c)) in LYNews.c:message_has_content,
  since former could treat characters not listed as "graph" in currently set
  locale as blank. In particular, this prevented posting messages with
  Cyrrillic letters only, when external editor is used (all cyrillic letters
  were treated as blank, so message was refused from posting by lynx since it
  "had no content") provided that russian locale was not set (setting proper 
  local could be impossible on some broken systems) -VH
  
 Best regards,
  -Vlad

diff -ru old/src/LYNews.c fixed/src/LYNews.c
--- old/src/LYNews.c    Thu Nov  4 00:31:12 1999
+++ fixed/src/LYNews.c  Sun Jan 30 12:46:46 2000
@@ -51,7 +51,7 @@
            if (*cp == '\n') {
                break;
            } else if (*cp != ' ') {
-               if (!firstnonblank && isgraph((unsigned char)*cp)) {
+               if (!firstnonblank && !isspace((unsigned char)*cp)) {
                    firstnonblank = *cp;
                }
            }
@@ -59,7 +59,7 @@
        if (*cp != '\n') {
            int c;
            while ((c = getc(fp)) != EOF && c != (int)(unsigned char)'\n') {
-               if (!firstnonblank && isgraph((unsigned char)c))
+               if (!firstnonblank && !isspace((unsigned char)c))
                    firstnonblank = (char)c;
            }
        }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]