Debian Codegraph @

pTk/mTk/tixGeneric/tixError.c

raw symbols SCIP
1
2 /* $Id: tixError.c,v 1.1.1.1 2000/05/17 11:08:41 idiscovery Exp $ */
3
4 /*
5 * tixError.c --
6 *
7 * Implements error handlers for Tix.
8 *
9 * Copyright (c) 1996, Expert Interface Technologies
10 *
11 * See the file "license.terms" for information on usage and redistribution
12 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 *
14 */
15
16 #include "tixPort.h"
17 #include "tixInt.h"
18
19 int Tix_ArgcError(interp, argc, argv, prefixCount, message)
20 Tcl_Interp * interp;
21 int argc;
22 char ** argv;
23 int prefixCount;
24 char * message;
25 {
26 int i;
27
28 Tcl_AppendResult(interp, "wrong # of arguments, should be \"",(char*)NULL);
29
30 for (i=0; i<prefixCount && i<argc; i++) {
31 Tcl_AppendResult(interp, argv[i], " ", (char*)NULL);
32 }
33
34 Tcl_AppendResult(interp, message, "\".", (char*)NULL);
35
36 return TCL_ERROR;
37 }
38
39 #if 0
40
41 int Tix_ValueMissingError(interp, spec)
42 Tcl_Interp * interp;
43 char * spec;
44 {
45 Tcl_AppendResult(interp, "value for \"", spec,
46 "\" missing", (char*)NULL);
47 return TCL_ERROR;
48 }
49
50
51 /*----------------------------------------------------------------------
52 * Tix_UnknownPublicMethodError --
53 *
54 *
55 * ToDo: sort the list of commands.
56 *----------------------------------------------------------------------
57 */
58 int Tix_UnknownPublicMethodError(interp, cPtr, widRec, method)
59 Tcl_Interp * interp;
60 TixClassRecord * cPtr;
61 char * widRec;
62 char * method;
63 {
64 int i;
65 char * lead = "";
66
67 Tcl_AppendResult(interp, "unknown option \"", method,
68 "\": must be ",
69 (char*)NULL);
70
71 for (i=0; i<cPtr->nMethods-1; i++) {
72 Tcl_AppendResult(interp, lead, cPtr->methods[i], (char*)NULL);
73 lead = ", ";
74 }
75 if (cPtr->nMethods>1) {
76 Tcl_AppendResult(interp, " or ", (char*)NULL);
77 }
78 if (cPtr->nMethods>0) {
79 Tcl_AppendResult(interp, cPtr->methods[i], (char*)NULL);
80 }
81 return TCL_ERROR;
82 }
83
84 #endif