Skip to content

Commit

Permalink
fill in the rest of the enumeration for type_to_str()
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasDickey committed Nov 29, 2012
1 parent 5149602 commit e9e45a5
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion error.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the GNU General Public License, version 2, 1991.
********************************************/

/*
* $MawkId: error.c,v 1.19 2012/11/26 11:53:10 tom Exp $
* $MawkId: error.c,v 1.20 2012/11/28 09:55:29 tom Exp $
* @Log: error.c,v @
* Revision 1.6 1995/06/06 00:18:22 mike
* change mawk_exit(1) to mawk_exit(2)
Expand Down Expand Up @@ -315,18 +315,42 @@ type_to_str(int type)
const char *retval = 0;

switch (type) {
case ST_NONE:
retval = "untyped variable";
break;
case ST_VAR:
retval = "variable";
break;
case ST_KEYWORD:
retval = "keyword";
break;
case ST_BUILTIN:
retval = "builtin";
break;
case ST_ARRAY:
retval = "array";
break;
case ST_FIELD:
retval = "field";
break;
case ST_NR:
retval = "NR";
break;
case ST_ENV:
retval = "ENVIRON";
break;
case ST_FUNCT:
retval = "function";
break;
case ST_LENGTH:
retval = "length";
break;
case ST_LOCAL_VAR:
retval = "local variable";
break;
case ST_LOCAL_NONE:
retval = "local untyped variable";
break;
case ST_LOCAL_ARRAY:
retval = "local array";
break;
Expand Down

0 comments on commit e9e45a5

Please sign in to comment.