OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-link-grammar commits / 4c65644

command_line.c: Add Error label in prt_error()
4c65644fcf0bc6fb8339eef84865410ee3a719db
by ampli <amirpli@gmail.com> · 2024-05-28T23:32:47.000Z

Changed files (1) +6 -6

link-parser/command-line.c +6 -6
……@@ -175,7 +175,7 @@ static void clean_up_string(char * s)
175175 if (0 == w) break;
176176 if (0 > (ssize_t)w)
177177 {
178 prt_error("Unable to process UTF8 command input string.\n");
178 prt_error("Error: Unable to process UTF8 command input string.\n");
179179 break;
180180 }
181181 len -= w;
……@@ -212,7 +212,7 @@ static bool is_numerical_rhs(char *s)
212212 if (0 == w) break;
213213 if (0 > (ssize_t)w)
214214 {
215 prt_error("Unable to process UTF8 command input string.\n");
215 prt_error("Error: Unable to process UTF8 command input string.\n");
216216 break;
217217 }
218218 len -= w;
……@@ -789,9 +789,9 @@ static int handle_help_command(const Switch *as, char *line,
789789 {
790790 rc = -1; /* Error indication. */
791791 if (count > 1)
792 prt_error("Ambiguous command: \"%s\". %s\n", s, helpmsg);
792 prt_error("Error: Ambiguous command: \"%s\". %s\n", s, helpmsg);
793793 else
794 prt_error("Undefined command: \"%s\". %s\n", s, helpmsg);
794 prt_error("Error: Undefined command: \"%s\". %s\n", s, helpmsg);
795795 }
796796 }
797797 }
……@@ -868,7 +868,7 @@ static int x_issue_special_command(char * line, Command_Options *copts, Dictiona
868868
869869 if (count > 1)
870870 {
871 prt_error("Ambiguous command \"%s\". %s\n", s, helpmsg);
871 prt_error("Error: Ambiguous command \"%s\". %s\n", s, helpmsg);
872872 return -1;
873873 }
874874 if (count == 1)
……@@ -879,7 +879,7 @@ static int x_issue_special_command(char * line, Command_Options *copts, Dictiona
879879 size_t junk = strcspn(s, WHITESPACE);
880880 if (junk != strlen(s))
881881 {
882 prt_error("Junk after a boolean variable: \"%s\". %s\n",
882 prt_error("Error: Junk after a boolean variable: \"%s\". %s\n",
883883 &s[junk], helpmsg);
884884 return -1;
885885 }