Commit e2ec9fa6 authored by medranocalvo's avatar medranocalvo

tcldot: downcase error messages

parent 080346be
......@@ -29,12 +29,12 @@ int edgecmd(ClientData clientData, Tcl_Interp * interp,
gctx_t *gctx = (gctx_t *)clientData;
if (argc < 2) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0], "\" option ?arg arg ...?", NULL);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], "\" option ?arg arg ...?", NULL);
return TCL_ERROR;
}
e = cmd2e(argv[0]);
if (!e) {
Tcl_AppendResult(interp, "Edge \"", argv[0], "\" not found", NULL);
Tcl_AppendResult(interp, "edge \"", argv[0], "\" not found", NULL);
return TCL_ERROR;
}
g = agraphof(agtail(e));
......@@ -65,7 +65,7 @@ int edgecmd(ClientData clientData, Tcl_Interp * interp,
if ((a = agfindedgeattr(g, argv2[j]))) {
Tcl_AppendElement(interp, agxget(e, a));
} else {
Tcl_AppendResult(interp, "No attribute named \"", argv2[j], "\"", NULL);
Tcl_AppendResult(interp, "no attribute named \"", argv2[j], "\"", NULL);
return TCL_ERROR;
}
}
......@@ -84,7 +84,7 @@ int edgecmd(ClientData clientData, Tcl_Interp * interp,
Tcl_AppendElement(interp, argv2[j]);
Tcl_AppendElement(interp, agxget(e, a));
} else {
Tcl_AppendResult(interp, "No attribute named \"", argv2[j], "\"", NULL);
Tcl_AppendResult(interp, "no attribute named \"", argv2[j], "\"", NULL);
return TCL_ERROR;
}
}
......@@ -99,7 +99,7 @@ int edgecmd(ClientData clientData, Tcl_Interp * interp,
(CONST84 char ***) &argv2) != TCL_OK)
return TCL_ERROR;
if ((argc2 == 0) || (argc2 % 2)) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0],
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
"\" setattributes attributename attributevalue ?attributename attributevalue? ?...?",
NULL);
Tcl_Free((char *) argv2);
......@@ -109,7 +109,7 @@ int edgecmd(ClientData clientData, Tcl_Interp * interp,
Tcl_Free((char *) argv2);
} else {
if ((argc < 4) || (argc % 2)) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0],
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
"\" setattributes attributename attributevalue ?attributename attributevalue? ?...?",
NULL);
return TCL_ERROR;
......@@ -127,7 +127,7 @@ int edgecmd(ClientData clientData, Tcl_Interp * interp,
return TCL_OK;
} else {
Tcl_AppendResult(interp, "Bad option \"", argv[1],
Tcl_AppendResult(interp, "bad option \"", argv[1],
"\": must be one of:",
"\n\tdelete, listattributes, listnodes,",
"\n\tueryattributes, queryattributevalues,",
......
......@@ -35,12 +35,12 @@ int graphcmd(ClientData clientData, Tcl_Interp * interp,
GVJ_t *job = gvc->job;
if (argc < 2) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0], " option ?arg arg ...?\"", NULL);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " option ?arg arg ...?\"", NULL);
return TCL_ERROR;
}
g = cmd2g(argv[0]);
if (!g) {
Tcl_AppendResult(interp, "Graph \"", argv[0], "\" not found", NULL);
Tcl_AppendResult(interp, "graph \"", argv[0], "\" not found", NULL);
return TCL_ERROR;
}
......@@ -49,7 +49,7 @@ int graphcmd(ClientData clientData, Tcl_Interp * interp,
if (MATCHES_OPTION("addedge", argv[1], c, length)) {
if ((argc < 4) || (argc % 2)) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0],
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" addedge tail head ?attributename attributevalue? ?...?\"",
NULL);
return TCL_ERROR;
......@@ -57,23 +57,23 @@ int graphcmd(ClientData clientData, Tcl_Interp * interp,
tail = cmd2n(argv[2]);
if (!tail) {
if (!(tail = agfindnode(g, argv[2]))) {
Tcl_AppendResult(interp, "Tail node \"", argv[2], "\" not found.", NULL);
Tcl_AppendResult(interp, "tail node \"", argv[2], "\" not found.", NULL);
return TCL_ERROR;
}
}
if (agroot(g) != agroot(agraphof(tail))) {
Tcl_AppendResult(interp, "Tail node ", argv[2], " is not in the graph.", NULL);
Tcl_AppendResult(interp, "tail node ", argv[2], " is not in the graph.", NULL);
return TCL_ERROR;
}
head = cmd2n(argv[3]);
if (!head) {
if (!(head = agfindnode(g, argv[3]))) {
Tcl_AppendResult(interp, "Head node \"", argv[3], "\" not found.", NULL);
Tcl_AppendResult(interp, "head node \"", argv[3], "\" not found.", NULL);
return TCL_ERROR;
}
}
if (agroot(g) != agroot(agraphof(head))) {
Tcl_AppendResult(interp, "Head node ", argv[3], " is not in the graph.", NULL);
Tcl_AppendResult(interp, "head node ", argv[3], " is not in the graph.", NULL);
return TCL_ERROR;
}
e = agedge(g, tail, head, NULL, 1);
......@@ -133,15 +133,15 @@ int graphcmd(ClientData clientData, Tcl_Interp * interp,
return TCL_ERROR;
}
if (!(tail = agfindnode(g, argv[2]))) {
Tcl_AppendResult(interp, "Tail node \"", argv[2], "\" not found.", NULL);
Tcl_AppendResult(interp, "tail node \"", argv[2], "\" not found.", NULL);
return TCL_ERROR;
}
if (!(head = agfindnode(g, argv[3]))) {
Tcl_AppendResult(interp, "Head node \"", argv[3], "\" not found.", NULL);
Tcl_AppendResult(interp, "head node \"", argv[3], "\" not found.", NULL);
return TCL_ERROR;
}
if (!(e = agfindedge(g, tail, head))) {
Tcl_AppendResult(interp, "Edge \"", argv[2], " - ", argv[3], "\" not found.", NULL);
Tcl_AppendResult(interp, "edge \"", argv[2], " - ", argv[3], "\" not found.", NULL);
return TCL_ERROR;
}
Tcl_AppendElement(interp, obj2cmd(e));
......@@ -153,7 +153,7 @@ int graphcmd(ClientData clientData, Tcl_Interp * interp,
return TCL_ERROR;
}
if (!(n = agfindnode(g, argv[2]))) {
Tcl_AppendResult(interp, "Node not found.", NULL);
Tcl_AppendResult(interp, "node not found.", NULL);
return TCL_ERROR;
}
Tcl_AppendResult(interp, obj2cmd(n), NULL);
......@@ -516,7 +516,7 @@ int graphcmd(ClientData clientData, Tcl_Interp * interp,
}
if (i == NO_SUPPORT) {
const char *s = gvplugin_list(gvc, API_render, argv[3]);
Tcl_AppendResult(interp, "Bad langname: \"", argv[3], "\". Use one of:", s, NULL);
Tcl_AppendResult(interp, "bad langname: \"", argv[3], "\". Use one of:", s, NULL);
return TCL_ERROR;
}
......@@ -537,11 +537,11 @@ int graphcmd(ClientData clientData, Tcl_Interp * interp,
chan = Tcl_GetChannel(interp, argv[2], &mode);
if (!chan) {
Tcl_AppendResult(interp, "Channel not open: \"", argv[2], NULL);
Tcl_AppendResult(interp, "channel not open: \"", argv[2], NULL);
return TCL_ERROR;
}
if (!(mode & TCL_WRITABLE)) {
Tcl_AppendResult(interp, "Channel not writable: \"", argv[2], NULL);
Tcl_AppendResult(interp, "channel not writable: \"", argv[2], NULL);
return TCL_ERROR;
}
job->output_file = (FILE *)chan;
......
......@@ -31,12 +31,12 @@ int nodecmd(ClientData clientData, Tcl_Interp * interp,
gctx_t *gctx = (gctx_t *)clientData;
if (argc < 2) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0], " option ?arg arg ...?\"", NULL);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " option ?arg arg ...?\"", NULL);
return TCL_ERROR;
}
n = cmd2n(argv[0]);
if (!n) {
Tcl_AppendResult(interp, "Node \"", argv[0], "\" not found", NULL);
Tcl_AppendResult(interp, "node \"", argv[0], "\" not found", NULL);
return TCL_ERROR;
}
g = agraphof(n);
......@@ -47,18 +47,18 @@ int nodecmd(ClientData clientData, Tcl_Interp * interp,
if (MATCHES_OPTION("addedge", argv[1], c, length)) {
if ((argc < 3) || (!(argc % 2))) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0], " addedge head ?attributename attributevalue? ?...?\"", NULL);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " addedge head ?attributename attributevalue? ?...?\"", NULL);
return TCL_ERROR;
}
head = cmd2n(argv[2]);
if (!head) {
if (!(head = agfindnode(g, argv[2]))) {
Tcl_AppendResult(interp, "Head node \"", argv[2], "\" not found.", NULL);
Tcl_AppendResult(interp, "head node \"", argv[2], "\" not found.", NULL);
return TCL_ERROR;
}
}
if (agroot(g) != agroot(agraphof(head))) {
Tcl_AppendResult(interp, "Nodes ", argv[0], " and ", argv[2], " are not in the same graph.", NULL);
Tcl_AppendResult(interp, "nodes ", argv[0], " and ", argv[2], " are not in the same graph.", NULL);
return TCL_ERROR;
}
e = agedge(g, n, head, NULL, 1);
......@@ -72,15 +72,15 @@ int nodecmd(ClientData clientData, Tcl_Interp * interp,
} else if (MATCHES_OPTION("findedge", argv[1], c, length)) {
if (argc < 3) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0], " findedge headnodename\"", NULL);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " findedge headnodename\"", NULL);
return TCL_ERROR;
}
if (!(head = agfindnode(g, argv[2]))) {
Tcl_AppendResult(interp, "Head node \"", argv[2], "\" not found.", NULL);
Tcl_AppendResult(interp, "head node \"", argv[2], "\" not found.", NULL);
return TCL_ERROR;
}
if (!(e = agfindedge(g, n, head))) {
Tcl_AppendResult(interp, "Edge \"", argv[0], " - ", obj2cmd(head), "\" not found.", NULL);
Tcl_AppendResult(interp, "edge \"", argv[0], " - ", obj2cmd(head), "\" not found.", NULL);
return TCL_ERROR;
}
Tcl_AppendElement(interp, obj2cmd(head));
......@@ -118,7 +118,7 @@ int nodecmd(ClientData clientData, Tcl_Interp * interp,
if ((a = agfindnodeattr(g, argv2[j]))) {
Tcl_AppendElement(interp, agxget(n, a));
} else {
Tcl_AppendResult(interp, "No attribute named \"", argv2[j], "\"", NULL);
Tcl_AppendResult(interp, "no attribute named \"", argv2[j], "\"", NULL);
return TCL_ERROR;
}
}
......@@ -137,7 +137,7 @@ int nodecmd(ClientData clientData, Tcl_Interp * interp,
Tcl_AppendElement(interp, argv2[j]);
Tcl_AppendElement(interp, agxget(n, a));
} else {
Tcl_AppendResult(interp, "No attribute named \"", argv2[j], "\"", NULL);
Tcl_AppendResult(interp, "no attribute named \"", argv2[j], "\"", NULL);
return TCL_ERROR;
}
}
......@@ -153,7 +153,7 @@ int nodecmd(ClientData clientData, Tcl_Interp * interp,
(CONST84 char ***) &argv2) != TCL_OK)
return TCL_ERROR;
if ((argc2 == 0) || (argc2 % 2)) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0],
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
"\" setattributes attributename attributevalue ?attributename attributevalue? ?...?",
NULL);
Tcl_Free((char *) argv2);
......@@ -163,7 +163,7 @@ int nodecmd(ClientData clientData, Tcl_Interp * interp,
Tcl_Free((char *) argv2);
} else {
if ((argc < 4) || (argc % 2)) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0],
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
"\" setattributes attributename attributevalue ?attributename attributevalue? ?...?",
NULL);
return TCL_ERROR;
......@@ -177,7 +177,7 @@ int nodecmd(ClientData clientData, Tcl_Interp * interp,
return TCL_OK;
} else {
Tcl_AppendResult(interp, "Bad option \"", argv[1],
Tcl_AppendResult(interp, "bad option \"", argv[1],
"\": must be one of:",
"\n\taddedge, listattributes, listedges, listinedges,",
"\n\tlistoutedges, queryattributes, queryattributevalues,",
......
......@@ -85,7 +85,7 @@ static int dotread(ClientData clientData, Tcl_Interp * interp,
ictx->myioDisc.afread = myiodisc_afread; /* replace afread to use Tcl Channels */
if (argc < 2) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0], " fileHandle\"", NULL);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " fileHandle\"", NULL);
return TCL_ERROR;
}
channel = Tcl_GetChannel(interp, argv[1], &mode);
......@@ -133,7 +133,7 @@ static int dotstring(ClientData clientData, Tcl_Interp * interp,
rdr.cur = 0;
if (argc < 2) {
Tcl_AppendResult(interp, "Wrong # args: should be \"", argv[0], " string\"", NULL);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " string\"", NULL);
return TCL_ERROR;
}
/* agmemread() is broken for our use because it replaces the id disc */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment