- if (var == NULL)
- error (_("mi_cmd_var_set_format: Variable object not found"));
-
- formspec = argv[1];
- if (formspec == NULL)
- error (_("mi_cmd_var_set_format: Must specify the format as: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\""));
-
- len = strlen (formspec);
-
- if (strncmp (formspec, "natural", len) == 0)
- format = FORMAT_NATURAL;
- else if (strncmp (formspec, "binary", len) == 0)
- format = FORMAT_BINARY;
- else if (strncmp (formspec, "decimal", len) == 0)
- format = FORMAT_DECIMAL;
- else if (strncmp (formspec, "hexadecimal", len) == 0)
- format = FORMAT_HEXADECIMAL;
- else if (strncmp (formspec, "octal", len) == 0)
- format = FORMAT_OCTAL;
- else
- error (_("mi_cmd_var_set_format: Unknown display format: must be: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\""));
-
- /* Set the format of VAR to given format */