OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-link-grammar commits / a9ed4e5

link-parser: Fix comment whitespace
a9ed4e5d724cf01f1f741df17fbe27a9494c4323
by ampli <amirpli@gmail.com> · 2024-05-29T17:30:23.000Z

Changed files (3) +5 -5

link-parser/command-line.c +1 -1
……@@ -157,7 +157,7 @@ int get_verbosity(void)
157157}
158158
159159/**
160 * Gets rid of all the white space in the string s.
160 * Gets rid of all the white space in the string s.
161161 */
162162static void clean_up_string(char * s)
163163{
link-parser/lg_readline.c +3 -3
……@@ -421,7 +421,7 @@ char *lg_readline(const char *mb_prompt)
421421 wc_prompt = malloc (sz*sizeof(wchar_t));
422422 mbstowcs(wc_prompt, mb_prompt, sz);
423423
424 hist = history_winit(); /* Init built-in history */
424 hist = history_winit(); /* Init built-in history */
425425 el = el_init("link-parser", stdin, stdout, stderr);
426426 history_w(hist, &ev, H_SETSIZE, 100);
427427 history_w(hist, &ev, H_SETUNIQUE, 1);
……@@ -444,7 +444,7 @@ char *lg_readline(const char *mb_prompt)
444444 el_source(el, NULL); /* Source the user's defaults file. */
445445 }
446446
447 int numc = 1; /* Uninitialized at libedit. */
447 int numc = 1; /* Uninitialized at libedit. */
448448 const wchar_t *wc_line = el_wgets(el, &numc);
449449
450450 /* Received end-of-file */
……@@ -469,7 +469,7 @@ char *lg_readline(const char *mb_prompt)
469469 /* fwprintf(stderr, L"==> got %d %ls", numc, wc_line); */
470470
471471 size_t byte_len = wcstombs(NULL, wc_line, 0) + 4;
472 free(mb_line); // free previous.
472 free(mb_line); // free previous.
473473 if (byte_len == (size_t)-1)
474474 {
475475 prt_error("Error: Unable to process UTF8 in input string.\n");
link-parser/parser-utilities.c +1 -1
……@@ -146,7 +146,7 @@ int get_console_line(char *inbuf, int inbuf_size)
146146 snprintf(inbuf, inbuf_size, "ReadConsoleW: Error %lu\n", GetLastError());
147147 return -1;
148148 }
149 winbuf[nchar] = L'\0'; /* nchar is always <= INPUT_UTF16_SIZE-1. */
149 winbuf[nchar] = L'\0'; /* nchar is always <= INPUT_UTF16_SIZE-1. */
150150
151151 nchar = WideCharToMultiByte(CP_UTF8, 0, winbuf, -1, inbuf,
152152 inbuf_size, NULL, NULL);