int main(int argc, char *argv[])
{
static const struct option longopts[] = {
- { "mode", required_argument, 0, 'm' },
- { "color", required_argument, 0, 'c' },
- { "color-scheme", required_argument, 0, 'C' },
- { "name", required_argument, 0, 'n' },
- { NULL, 0, 0, 0 }
+ { "mode", required_argument, NULL, 'm' },
+ { "color", required_argument, NULL, 'c' },
+ { "color-scheme", required_argument, NULL, 'C' },
+ { "name", required_argument, NULL, 'n' },
+ { NULL, 0, NULL, 0 }
};
int c, mode = UL_COLORMODE_UNDEF; /* default */
const char *color = "red", *name = NULL, *color_scheme = NULL;
int ncpus = 2048, rc, c;
static const struct option longopts[] = {
- { "ncpus", 1, 0, 'n' },
- { "mask", 1, 0, 'm' },
- { "range", 1, 0, 'r' },
- { NULL, 0, 0, 0 }
+ { "ncpus", 1, NULL, 'n' },
+ { "mask", 1, NULL, 'm' },
+ { "range", 1, NULL, 'r' },
+ { NULL, 0, NULL, 0 }
};
while ((c = getopt_long(argc, argv, "n:m:r:", longopts, NULL)) != -1) {
unsigned int sectorsize;
static const struct option longopts[] = {
- { "label", required_argument, 0, 'x' },
- { "device", required_argument, 0, 'd' },
- { "help", no_argument, 0, 'h' },
- { NULL, 0, 0, 0 },
+ { "label", required_argument, NULL, 'x' },
+ { "device", required_argument, NULL, 'd' },
+ { "help", no_argument, NULL, 'h' },
+ { NULL, 0, NULL, 0 },
};
setlocale(LC_ALL, ""); /* just to have enable UTF8 chars */
int parent_col = -1, id_col = -1;
static const struct option longopts[] = {
- { "maxout", 0, 0, 'm' },
- { "column", 1, 0, 'c' },
- { "nlines", 1, 0, 'n' },
- { "width", 1, 0, 'w' },
- { "tree-parent-column", 1, 0, 'p' },
- { "tree-id-column", 1, 0, 'i' },
- { "json", 0, 0, 'J' },
- { "raw", 0, 0, 'r' },
- { "export", 0, 0, 'E' },
- { "colsep", 1, 0, 'C' },
- { "help", 0, 0, 'h' },
- { NULL, 0, 0, 0 },
+ { "maxout", 0, NULL, 'm' },
+ { "column", 1, NULL, 'c' },
+ { "nlines", 1, NULL, 'n' },
+ { "width", 1, NULL, 'w' },
+ { "tree-parent-column", 1, NULL, 'p' },
+ { "tree-id-column", 1, NULL, 'i' },
+ { "json", 0, NULL, 'J' },
+ { "raw", 0, NULL, 'r' },
+ { "export", 0, NULL, 'E' },
+ { "colsep", 1, NULL, 'C' },
+ { "help", 0, NULL, 'h' },
+ { NULL, 0, NULL, 0 },
};
static const ul_excl_t excl[] = { /* rows and cols in ASCII order */
int c;
static const struct option longopts[] = {
- { "maxout", 0, 0, 'm' },
- { "width", 1, 0, 'w' },
- { NULL, 0, 0, 0 },
+ { "maxout", 0, NULL, 'm' },
+ { "width", 1, NULL, 'w' },
+ { NULL, 0, NULL, 0 },
};
setlocale(LC_ALL, ""); /* just to have enable UTF8 chars */
static const struct option longopts[] = {
- { "ascii", 0, 0, 'i' },
- { "csv", 0, 0, 'c' },
- { "list", 0, 0, 'l' },
- { "noheadings", 0, 0, 'n' },
- { "pairs", 0, 0, 'p' },
- { "json", 0, 0, 'J' },
- { "raw", 0, 0, 'r' },
- { "range-start",1, 0, 'S' },
- { "range-end", 1, 0, 'E' },
- { NULL, 0, 0, 0 },
+ { "ascii", 0, NULL, 'i' },
+ { "csv", 0, NULL, 'c' },
+ { "list", 0, NULL, 'l' },
+ { "noheadings", 0, NULL, 'n' },
+ { "pairs", 0, NULL, 'p' },
+ { "json", 0, NULL, 'J' },
+ { "raw", 0, NULL, 'r' },
+ { "range-start",1, NULL, 'S' },
+ { "range-end", 1, NULL, 'E' },
+ { NULL, 0, NULL, 0 },
};
setlocale(LC_ALL, ""); /* just to have enable UTF8 chars */
obj->pid = th->proc->pid;
obj->idx = th->index + i;;
}
- return 0;
+ return NULL;
}
static void *thread_body(void *arg)