X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=e2fsck%2Fprofile.h;h=4cc10ebcb92019033da4cf304a0fe86ef2dded3c;hb=d973c18b33df378b071a951e942954e79f316567;hp=8c909a18f4aed916f4630209b3cab27e814f978a;hpb=2fa9ba98337b07d6acfac52b5ee5dc8116dda866;p=tools%2Fe2fsprogs.git diff --git a/e2fsck/profile.h b/e2fsck/profile.h index 8c909a1..4cc10eb 100644 --- a/e2fsck/profile.h +++ b/e2fsck/profile.h @@ -7,16 +7,16 @@ * This file may be redistributed under the terms of the GNU Public * License. * %End-Header% - * + * * Copyright (C) 1985-2005 by the Massachusetts Institute of Technology. - * + * * All rights reserved. - * + * * Export of this software from the United States of America may require * a specific license from the United States Government. It is the * responsibility of any person or organization contemplating export to * obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright @@ -30,7 +30,7 @@ * M.I.T. makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -41,6 +41,9 @@ typedef struct _profile_t *profile_t; +typedef void (*profile_syntax_err_cb_t)(const char *file, long err, + int line_num); + /* * Used by the profile iterator in prof_get.c */ @@ -55,20 +58,14 @@ extern "C" { long profile_init (const char * *files, profile_t *ret_profile); -long profile_init_path - (const char * filelist, profile_t *ret_profile); - void profile_release (profile_t profile); -long profile_get_values - (profile_t profile, const char *const *names, char ***ret_values); - -void profile_free_list - (char **list); +long profile_set_default + (profile_t profile, const char *def_string); long profile_get_string - (profile_t profile, const char *name, const char *subname, + (profile_t profile, const char *name, const char *subname, const char *subsubname, const char *def_val, char **ret_string); long profile_get_integer @@ -76,28 +73,32 @@ long profile_get_integer const char *subsubname, int def_val, int *ret_default); +long profile_get_uint + (profile_t profile, const char *name, const char *subname, + const char *subsubname, unsigned int def_val, + unsigned int *ret_int); + +long profile_get_double + (profile_t profile, const char *name, const char *subname, + const char *subsubname, double def_val, + double *ret_float); + long profile_get_boolean (profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, int *ret_default); -long profile_get_relation_names - (profile_t profile, const char **names, char ***ret_names); - -long profile_get_subsection_names - (profile_t profile, const char **names, char ***ret_names); - long profile_iterator_create (profile_t profile, const char *const *names, int flags, void **ret_iter); void profile_iterator_free (void **iter_p); - + long profile_iterator (void **iter_p, char **ret_name, char **ret_value); -void profile_release_string (char *str); +profile_syntax_err_cb_t profile_set_syntax_err_cb(profile_syntax_err_cb_t hook); #ifdef __cplusplus }