Permalink
Browse files

Add _function to all function pointer typedef names where it doesn't …

…appear
  • Loading branch information...
1 parent c72f900 commit 453a10a927a0f68fd533d439aca4837b243298a0 @GayathriSrini GayathriSrini committed Apr 4, 2012
@@ -137,14 +137,14 @@ typedef nyx_error_t (*nyx_get_operating_mode_function_t)(nyx_device_t*, nyx_oper
typedef nyx_error_t (*nyx_get_event_source_function_t)(nyx_device_t*, int32_t*);
typedef nyx_error_t (*nyx_get_event_function_t)(nyx_device_t*, nyx_event_t**);
typedef nyx_error_t (*nyx_release_event_function_t)(nyx_device_t*, nyx_event_t*);
-typedef nyx_error_t (*nyx_set_event_report_rate_t)(nyx_device_t*, nyx_report_rate_t);
-typedef nyx_error_t (*nyx_get_event_report_rate_t)(nyx_device_t*, nyx_report_rate_t*);
+typedef nyx_error_t (*nyx_set_event_report_rate_function_t)(nyx_device_t*, nyx_report_rate_t);
+typedef nyx_error_t (*nyx_get_event_report_rate_function_t)(nyx_device_t*, nyx_report_rate_t*);
-typedef nyx_error_t (*nyx_set_report_rate_t)(nyx_device_t*, nyx_report_rate_t);
-typedef nyx_error_t (*nyx_get_report_rate_t)(nyx_device_t*, nyx_report_rate_t*);
+typedef nyx_error_t (*nyx_set_report_rate_function_t)(nyx_device_t*, nyx_report_rate_t);
+typedef nyx_error_t (*nyx_get_report_rate_function_t)(nyx_device_t*, nyx_report_rate_t*);
-typedef nyx_error_t (*nyx_set_scan_rate_t)(nyx_device_t*, uint32_t);
-typedef nyx_error_t (*nyx_get_scan_rate_t)(nyx_device_t*, uint32_t*);
+typedef nyx_error_t (*nyx_set_scan_rate_function_t)(nyx_device_t*, uint32_t);
+typedef nyx_error_t (*nyx_get_scan_rate_function_t)(nyx_device_t*, uint32_t*);
typedef nyx_error_t (*nyx_set_int_function_t)(nyx_device_t*, int32_t);
typedef nyx_error_t (*nyx_get_int_function_t)(nyx_device_t*, int32_t*);
@@ -61,12 +61,12 @@ typedef enum {
NYX_LOG_PRINTER_SYSLOG,
} nyx_log_destination_t;
-typedef int32_t (*nyx_log_printer)(nyx_log_level_t level, const char *msg, va_list args);
+typedef int32_t (*nyx_log_printer_function_t)(nyx_log_level_t level, const char *msg, va_list args);
void nyx_log_init();
void nyx_log_set_level(nyx_log_level_t level);
-void nyx_log_set_printer(nyx_log_printer new_logger);
+void nyx_log_set_printer(nyx_log_printer_function_t new_logger);
#define nyx_critical(m, args...) nyx_msg(NYX_LOG_CRITICAL, (m), ##args)
@@ -64,7 +64,7 @@ nyx_error_t nyx_module_set_name(nyx_instance_t instance, nyx_device_t* device_in
* set the description of the newly created device.
*
* @param[in] instance - instance passed into nyx_open_function.
- * @param[in] device_in_ptr - pointer to the device on which to set the name
+ * @param[in] device_in_ptr - pointer to the device on which to set the description
* @param[in] description_str - description string to set on the device.
*
* @return nyx_error_t that will be NYX_ERROR_NONE if operation is
@@ -77,7 +77,7 @@ nyx_error_t nyx_module_set_description(nyx_instance_t instance, nyx_device_t* de
* set the method for the newly created device.
*
* @param[in] instance - instance passed into nyx_open_function.
- * @param[in] device_in_ptr - pointer to the device on which to set the name
+ * @param[in] device_in_ptr - pointer to the device on which to set the method
* @param[in] method - method to be set
* @param[in] symbol_str - symbol for the method to use.
*
@@ -36,10 +36,10 @@
#include "nyx_device_impl.h"
#include "nyx_core_impl.h"
-typedef int32_t (*_nyx_module_get_api_version_major_t) (void);
-typedef int32_t (*_nyx_module_get_api_version_minor_t) (void);
-typedef const char* (*_nyx_module_get_name_t) (void);
-typedef nyx_device_type_t (*_nyx_module_get_type_t) (void);
+typedef int32_t (*_nyx_module_get_api_version_major_function_t) (void);
+typedef int32_t (*_nyx_module_get_api_version_minor_function_t) (void);
+typedef const char* (*_nyx_module_get_name_function_t) (void);
+typedef nyx_device_type_t (*_nyx_module_get_type_function_t) (void);
struct nyx_device_iterator {
GSList* list;
@@ -250,28 +250,28 @@ nyx_error_t nyx_device_open(nyx_device_type_t type, nyx_device_id_t id, nyx_devi
return NYX_ERROR_UNSUPPORTED_DEVICE_TYPE;
}
- _nyx_module_get_api_version_major_t get_version_major_ptr = dlsym(module_ptr, "_nyx_module_get_api_version_major");
+ _nyx_module_get_api_version_major_function_t get_version_major_ptr = dlsym(module_ptr, "_nyx_module_get_api_version_major");
if (NULL == get_version_major_ptr) {
nyx_error ("module was not declared with NYX_DECLARE_MODULE");
dlclose (module_ptr);
return NYX_ERROR_UNSUPPORTED_DEVICE_TYPE;
}
- _nyx_module_get_api_version_minor_t get_version_minor_ptr = dlsym(module_ptr, "_nyx_module_get_api_version_minor");
+ _nyx_module_get_api_version_minor_function_t get_version_minor_ptr = dlsym(module_ptr, "_nyx_module_get_api_version_minor");
if (NULL == get_version_minor_ptr) {
nyx_error ("module was not declared with NYX_DECLARE_MODULE");
dlclose (module_ptr);
return NYX_ERROR_UNSUPPORTED_DEVICE_TYPE;
}
- _nyx_module_get_name_t get_name_ptr = dlsym(module_ptr, "_nyx_module_get_name");
+ _nyx_module_get_name_function_t get_name_ptr = dlsym(module_ptr, "_nyx_module_get_name");
if (NULL == get_name_ptr) {
nyx_error ("module was not declared with NYX_DECLARE_MODULE");
dlclose (module_ptr);
return NYX_ERROR_UNSUPPORTED_DEVICE_TYPE;
}
- _nyx_module_get_type_t get_device_type_ptr = dlsym(module_ptr, "_nyx_module_get_type");
+ _nyx_module_get_type_function_t get_device_type_ptr = dlsym(module_ptr, "_nyx_module_get_type");
if (NULL == get_device_type_ptr) {
nyx_error ("module was not declared with NYX_DECLARE_MODULE");
dlclose (module_ptr);
@@ -417,7 +417,7 @@ nyx_error_t nyx_device_set_report_rate(nyx_device_handle_t handle, nyx_report_ra
{
nyx_device_t* d = (nyx_device_t*)handle;
CHECK_DEVICE(d);
- nyx_set_report_rate_t f = LOOKUP_METHOD(d, NYX_SET_REPORT_RATE_MODULE_METHOD);
+ nyx_set_report_rate_function_t f = LOOKUP_METHOD(d, NYX_SET_REPORT_RATE_MODULE_METHOD);
if (f)
return f(d,rate);
else
@@ -428,7 +428,7 @@ nyx_error_t nyx_device_get_report_rate(nyx_device_handle_t handle, nyx_report_ra
{
nyx_device_t* d = (nyx_device_t*)handle;
CHECK_DEVICE(d);
- nyx_get_report_rate_t f = LOOKUP_METHOD(d, NYX_GET_REPORT_RATE_MODULE_METHOD);
+ nyx_get_report_rate_function_t f = LOOKUP_METHOD(d, NYX_GET_REPORT_RATE_MODULE_METHOD);
if (f)
return f(d,rate_out_ptr);
else
@@ -57,7 +57,7 @@ nyx_error_t nyx_touchpanel_set_active_scan_rate(nyx_device_handle_t handle, uint
{
nyx_device_t* d = (nyx_device_t*)handle;
CHECK_DEVICE(d);
- nyx_set_scan_rate_t f = LOOKUP_METHOD(d, NYX_TOUCHPANEL_SET_ACTIVE_SCAN_RATE_MODULE_METHOD);
+ nyx_set_scan_rate_function_t f = LOOKUP_METHOD(d, NYX_TOUCHPANEL_SET_ACTIVE_SCAN_RATE_MODULE_METHOD);
if (f)
return f(d,active_scan_rate_in);
else
@@ -68,7 +68,7 @@ nyx_error_t nyx_touchpanel_get_active_scan_rate(nyx_device_handle_t handle, uint
{
nyx_device_t* d = (nyx_device_t*)handle;
CHECK_DEVICE(d);
- nyx_get_scan_rate_t f = LOOKUP_METHOD(d, NYX_TOUCHPANEL_GET_ACTIVE_SCAN_RATE_MODULE_METHOD);
+ nyx_get_scan_rate_function_t f = LOOKUP_METHOD(d, NYX_TOUCHPANEL_GET_ACTIVE_SCAN_RATE_MODULE_METHOD);
if (f)
return f(d,active_scan_rate_out_ptr);
else
@@ -79,7 +79,7 @@ nyx_error_t nyx_touchpanel_set_idle_scan_rate(nyx_device_handle_t handle, uint32
{
nyx_device_t* d = (nyx_device_t*)handle;
CHECK_DEVICE(d);
- nyx_set_scan_rate_t f = LOOKUP_METHOD(d, NYX_TOUCHPANEL_SET_IDLE_SCAN_RATE_MODULE_METHOD);
+ nyx_set_scan_rate_function_t f = LOOKUP_METHOD(d, NYX_TOUCHPANEL_SET_IDLE_SCAN_RATE_MODULE_METHOD);
if (f)
return f(d,idle_scan_rate_in);
else
@@ -90,7 +90,7 @@ nyx_error_t nyx_touchpanel_get_idle_scan_rate(nyx_device_handle_t handle, uint32
{
nyx_device_t* d = (nyx_device_t*)handle;
CHECK_DEVICE(d);
- nyx_get_scan_rate_t f = LOOKUP_METHOD(d, NYX_TOUCHPANEL_GET_IDLE_SCAN_RATE_MODULE_METHOD);
+ nyx_get_scan_rate_function_t f = LOOKUP_METHOD(d, NYX_TOUCHPANEL_GET_IDLE_SCAN_RATE_MODULE_METHOD);
if (f)
return f(d,idle_scan_rate_out_ptr);
else
View
@@ -108,7 +108,7 @@ int32_t _nyx_log_syslog_printer(nyx_log_level_t level, const char *msg, va_list
return 0;
}
-static nyx_log_printer nyx_printer = _nyx_log_syslog_printer;
+static nyx_log_printer_function_t nyx_printer = _nyx_log_syslog_printer;
static int32_t print_error_wrapper(const char *msg, ...)
@@ -123,7 +123,7 @@ static int32_t print_error_wrapper(const char *msg, ...)
return printed;
}
-void nyx_log_set_printer(nyx_log_printer new_log_printer)
+void nyx_log_set_printer(nyx_log_printer_function_t new_log_printer)
{
if (new_log_printer == NULL) {
print_error_wrapper("Attempt to set a NULL logger");

0 comments on commit 453a10a

Please sign in to comment.