From: Klas Lindfors Date: Tue, 16 Apr 2013 13:26:26 +0000 (+0200) Subject: change names of not exported functions X-Git-Tag: v1.13.0~28 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f80cc85e89a4ed977c7f7e7f131a5b3e86ea508c;p=yubikey-personalization change names of not exported functions --- diff --git a/ykpers-json.c b/ykpers-json.c index 43a50af..f4985cc 100644 --- a/ykpers-json.c +++ b/ykpers-json.c @@ -36,7 +36,7 @@ #include #include -int ykp_json_export_cfg(const YKP_CONFIG *cfg, char *json, size_t len) { +int _ykp_json_export_cfg(const YKP_CONFIG *cfg, char *json, size_t len) { json_object *jobj = json_object_new_object(); json_object *yprod_json = json_object_new_object(); json_object *options_json = json_object_new_object(); @@ -164,7 +164,7 @@ int ykp_json_export_cfg(const YKP_CONFIG *cfg, char *json, size_t len) { return strlen(json); } -int ykp_json_import_cfg(const char *json, size_t len, YKP_CONFIG *cfg) { +int _ykp_json_import_cfg(const char *json, size_t len, YKP_CONFIG *cfg) { if(cfg) { json_object *jobj = json_tokener_parse(json); json_object *yprod_json = json_object_object_get(jobj, "yubiProdConfig"); diff --git a/ykpers-json.h b/ykpers-json.h index 5271be4..9708b30 100644 --- a/ykpers-json.h +++ b/ykpers-json.h @@ -37,8 +37,8 @@ extern "C" { # endif -int ykp_json_export_cfg(const YKP_CONFIG *cfg, char *json, size_t len); -int ykp_json_import_cfg(const char *json, size_t len, YKP_CONFIG *cfg); +int _ykp_json_export_cfg(const YKP_CONFIG *cfg, char *json, size_t len); +int _ykp_json_import_cfg(const char *json, size_t len, YKP_CONFIG *cfg); # ifdef __cplusplus } diff --git a/ykpers.c b/ykpers.c index 510dbef..18b3608 100644 --- a/ykpers.c +++ b/ykpers.c @@ -851,7 +851,7 @@ static const char str_config_flags[] = "config_flags"; static const char str_extended_flags[] = "extended_flags"; -static int ykp_legacy_export_config(const YKP_CONFIG *cfg, char *buf, size_t len) { +static int _ykp_legacy_export_config(const YKP_CONFIG *cfg, char *buf, size_t len) { if (cfg) { char buffer[256]; struct map_st *p; @@ -997,9 +997,9 @@ static int ykp_legacy_export_config(const YKP_CONFIG *cfg, char *buf, size_t len int ykp_export_config(const YKP_CONFIG *cfg, char *buf, size_t len, int format) { if(format == YKP_FORMAT_YCFG) { - return ykp_json_export_cfg(cfg, buf, len); + return _ykp_json_export_cfg(cfg, buf, len); } else if(format == YKP_FORMAT_LEGACY) { - return ykp_legacy_export_config(cfg, buf, len); + return _ykp_legacy_export_config(cfg, buf, len); } ykp_errno = YKP_EINVAL; return 0; @@ -1009,7 +1009,7 @@ int ykp_export_config(const YKP_CONFIG *cfg, char *buf, size_t len, int ykp_import_config(const char *buf, size_t len, YKP_CONFIG *cfg, int format) { if(format == YKP_FORMAT_YCFG) { - return ykp_json_import_cfg(buf, len, cfg); + return _ykp_json_import_cfg(buf, len, cfg); } else if(format == YKP_FORMAT_LEGACY) { ykp_errno = YKP_ENOTYETIMPL; } @@ -1022,7 +1022,7 @@ int ykp_write_config(const YKP_CONFIG *cfg, void *userdata) { if(cfg) { char buffer[1024]; - int ret = ykp_legacy_export_config(cfg, buffer, 1024); + int ret = _ykp_legacy_export_config(cfg, buffer, 1024); if(ret) { writer(buffer, strlen(buffer), userdata); return 1;