The *mmenu* utility uses Nobilis in order to display the castle menu. There is
no real command line interface, and the GUI is programmed in Motif.
+# EXIT CODES
+*0* all ok,++
+*1* libcurl/page request error,++
+*2* out of memory,++
+*3* usage error
+
# LICENSE
MIT License, Armaan Bhojwani 2021.
memfail(void)
{
printf("ERROR: Out of memory\n");
- exit(4);
+ exit(2);
}
static size_t
if (res != CURLE_OK) {
fprintf(stderr,"ERROR: Could not fetch webpage\n%s\n",
curl_easy_strerror(res));
- exit(2);
+ exit(1);
}
curl_easy_cleanup(curl);
int
main(int argc, char *argv[])
{
+ if (argc > 1) {
+ printf("Usage: %s\n", argv[0]);
+ exit(3);
+ }
+
// Initialize motif
Widget toplevel, rowcol, daysel, disp;
XmStringTable strs;