mirror of
https://git.familie-radermacher.ch/linux/ptouch-print.git
synced 2025-08-14 16:03:25 +00:00
coding style cosmetics
This commit is contained in:
parent
92c1e43f0c
commit
d293e9427d
@ -489,15 +489,15 @@ void add_job(job_type_t type, int n, char *line)
|
||||
fprintf(stderr, "Memory allocation failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
new_job->type = type;
|
||||
if (type == JOB_TEXT && n > MAX_LINES) {
|
||||
n = MAX_LINES;
|
||||
}
|
||||
new_job->n = n;
|
||||
new_job->lines[0] = line;
|
||||
for(int i=1; i<MAX_LINES; i++)
|
||||
for (int i=1; i<MAX_LINES; ++i) {
|
||||
new_job->lines[i] = NULL;
|
||||
}
|
||||
new_job->next = NULL;
|
||||
|
||||
if (!last_added_job) { // just created the first job
|
||||
@ -581,7 +581,6 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
|
||||
default:
|
||||
return ARGP_ERR_UNKNOWN;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -641,8 +640,9 @@ int main(int argc, char *argv[])
|
||||
for (job_t *job = jobs; job != NULL; job = job->next) {
|
||||
if (arguments.debug) {
|
||||
printf("job %p: type=%d | n=%d", job, job->type, job->n);
|
||||
for(int i=0; i<MAX_LINES; i++)
|
||||
for (int i=0; i<MAX_LINES; ++i) {
|
||||
printf(" | %s", job->lines[i]);
|
||||
}
|
||||
printf(" | next=%p\n", job->next);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user