Convert an LTC error code to ASCII @param err The error code @return A pointer to the ASCII NUL terminated string for the error or "Invalid error code." if the err code was not valid. */
| 65 | @return A pointer to the ASCII NUL terminated string for the error or "Invalid error code." if the err code was not valid. |
| 66 | */ |
| 67 | const char *error_to_string(int err) |
| 68 | { |
| 69 | if (err < 0 || err >= (int)(sizeof(err_2_str)/sizeof(err_2_str[0]))) { |
| 70 | return "Invalid error code."; |
| 71 | } else { |
| 72 | return err_2_str[err]; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | |
| 77 | /* ref: $Format:%D$ */ |
no outgoing calls