Diff

Differences From Artifact [3125d83cbc]:

To Artifact [bc792aa0c5]:


296
297
298
299
300
301
302
303
304
305
306
307
308
309
310

311
312
313
314
315
316
317

	dataval = data;
	*dataval = lc_process_size(value, endptr);

	return(0);
}


static int lc_handle_type(lc_var_type_t type, const char *value, void *data) {
	const char *next;
	int is_list;

	is_list = type & LC_VAR_LIST;

	if (is_list == LC_VAR_LIST) {

	}

	switch (type) {
		case LC_VAR_STRING:
			return(lc_process_var_string(data, value, &next));
			break;
		case LC_VAR_LONG_LONG:







<
|






>







296
297
298
299
300
301
302

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317

	dataval = data;
	*dataval = lc_process_size(value, endptr);

	return(0);
}


int lc_handle_type(lc_var_type_t type, const char *value, void *data) {
	const char *next;
	int is_list;

	is_list = type & LC_VAR_LIST;

	if (is_list == LC_VAR_LIST) {
		/* XXX */
	}

	switch (type) {
		case LC_VAR_STRING:
			return(lc_process_var_string(data, value, &next));
			break;
		case LC_VAR_LONG_LONG:
373
374
375
376
377
378
379

380
381
382
383
384
385
386
387
			return(-1);
		case LC_VAR_NONE:
		case LC_VAR_UNKNOWN:
		case LC_VAR_SECTION:
		case LC_VAR_SECTIONSTART:
		case LC_VAR_SECTIONEND:
			return(0);

			break;
	}

	return(-1);
}

static int lc_handle(struct lc_varhandler_st *handler, const char *var, const char *varargs, const char *value, lc_flags_t flags) {
	const char *localvar = NULL;







>
|







373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
			return(-1);
		case LC_VAR_NONE:
		case LC_VAR_UNKNOWN:
		case LC_VAR_SECTION:
		case LC_VAR_SECTIONSTART:
		case LC_VAR_SECTIONEND:
			return(0);
		case LC_VAR_LIST:
			return(0);
	}

	return(-1);
}

static int lc_handle(struct lc_varhandler_st *handler, const char *var, const char *varargs, const char *value, lc_flags_t flags) {
	const char *localvar = NULL;
397
398
399
400
401
402
403



404
405
406
407
408
409
410
	} else {
		localvar = NULL;
	}

	switch (handler->mode) {
		case LC_MODE_CALLBACK:
			if (handler->callback != NULL) {



				retval = handler->callback(localvar, var, varargs, value, flags, handler->extra);
				if (retval < 0) {
					lc_errno = LC_ERR_CALLBACK;
				}
				return(retval);
			}
			break;







>
>
>







398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
	} else {
		localvar = NULL;
	}

	switch (handler->mode) {
		case LC_MODE_CALLBACK:
			if (handler->callback != NULL) {
				lc_errno = LC_ERR_NONE;
				lc_err_usererrmsg = NULL;

				retval = handler->callback(localvar, var, varargs, value, flags, handler->extra);
				if (retval < 0) {
					lc_errno = LC_ERR_CALLBACK;
				}
				return(retval);
			}
			break;