Yet another print-the-error-message example program, after gnokii error code messages and gnokii error code messages (2).
Sample usage:
$ ./gnokii_error 5 Command called isn't implemented in model. $ ./gnokii_error 25 Unsolicited message received.
Source code:
/* gcc gnokii_error.c -o gnokii_error $(pkg-config --libs gnokii) && ./gnokii_error */ #include#include "gnokii.h" int main(int argc, char *argv[]) { if ((argc != 2)) { printf("usage %s number\n", argv[0]); return 1; } printf("%s\n", gn_error_print(atoi(argv[1]))); return 0; }