1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Use consistent style for pointers

This commit is contained in:
Michael Vetter 2015-10-09 11:58:25 +02:00
parent e434b1bbf8
commit 3b0f7e109c
10 changed files with 148 additions and 148 deletions

View File

@ -48,16 +48,16 @@ typedef struct chat_session_t {
void chat_sessions_init(void);
void chat_sessions_clear(void);
void chat_session_resource_override(const char * const barejid, const char * const resource);
ChatSession* chat_session_get(const char * const barejid);
void chat_session_resource_override(const char *const barejid, const char *const resource);
ChatSession* chat_session_get(const char *const barejid);
void chat_session_recipient_active(const char * const barejid, const char * const resource,
void chat_session_recipient_active(const char *const barejid, const char *const resource,
gboolean send_states);
void chat_session_recipient_typing(const char * const barejid, const char * const resource);
void chat_session_recipient_paused(const char * const barejid, const char * const resource);
void chat_session_recipient_gone(const char * const barejid, const char * const resource);
void chat_session_recipient_inactive(const char * const barejid, const char * const resource);
void chat_session_recipient_typing(const char *const barejid, const char *const resource);
void chat_session_recipient_paused(const char *const barejid, const char *const resource);
void chat_session_recipient_gone(const char *const barejid, const char *const resource);
void chat_session_recipient_inactive(const char *const barejid, const char *const resource);
void chat_session_remove(const char * const barejid);
void chat_session_remove(const char *const barejid);
#endif

View File

@ -53,9 +53,9 @@ typedef struct prof_chat_state_t {
ChatState* chat_state_new(void);
void chat_state_free(ChatState *state);
void chat_state_handle_idle(const char * const barejid, ChatState *state);
void chat_state_handle_typing(const char * const barejid, ChatState *state);
void chat_state_handle_idle(const char *const barejid, ChatState *state);
void chat_state_handle_typing(const char *const barejid, ChatState *state);
void chat_state_active(ChatState *state);
void chat_state_gone(const char * const barejid, ChatState *state);
void chat_state_gone(const char *const barejid, ChatState *state);
#endif

View File

@ -98,36 +98,36 @@ gchar* p_utf8_substring(const gchar *str, glong start_pos, glong end_pos);
void p_slist_free_full(GSList *items, GDestroyNotify free_func);
void p_list_free_full(GList *items, GDestroyNotify free_func);
gboolean p_hash_table_add(GHashTable *hash_table, gpointer key);
gboolean p_hash_table_contains(GHashTable *hash_table, gconstpointer key);
gboolean p_hash_table_contains(GHashTable *hash_table, gconstpointer key);
gboolean create_dir(char *name);
gboolean mkdir_recursive(const char *dir);
char * str_replace(const char *string, const char *substr,
char* str_replace(const char *string, const char *substr,
const char *replacement);
gboolean str_contains_str(const char * const searchstr, const char * const substr);
gboolean str_contains_str(const char *const searchstr, const char *const substr);
int str_contains(const char str[], int size, char ch);
gboolean strtoi_range(char *str, int *saveptr, int min, int max, char **err_msg);
int utf8_display_len(const char * const str);
char * prof_getline(FILE *stream);
int utf8_display_len(const char *const str);
char* prof_getline(FILE *stream);
char* release_get_latest(void);
gboolean release_is_new(char *found_version);
gchar * xdg_get_config_home(void);
gchar * xdg_get_data_home(void);
gchar* xdg_get_config_home(void);
gchar* xdg_get_data_home(void);
gboolean valid_resource_presence_string(const char * const str);
const char * string_from_resource_presence(resource_presence_t presence);
resource_presence_t resource_presence_from_string(const char * const str);
gboolean valid_resource_presence_string(const char *const str);
const char* string_from_resource_presence(resource_presence_t presence);
resource_presence_t resource_presence_from_string(const char *const str);
contact_presence_t contact_presence_from_resource_presence(resource_presence_t resource_presence);
char * p_sha1_hash(char *str);
char * create_unique_id(char *prefix);
char* p_sha1_hash(char *str);
char* create_unique_id(char *prefix);
void reset_unique_id(void);
int cmp_win_num(gconstpointer a, gconstpointer b);
int get_next_available_win_num(GList *used);
char* get_file_or_linked(char *loc, char *basedir);
char * strip_arg_quotes(const char * const input);
char* strip_arg_quotes(const char *const input);
gboolean is_notify_enabled(void);
#endif

View File

@ -40,11 +40,11 @@
typedef struct p_contact_t *PContact;
PContact p_contact_new(const char * const barejid, const char * const name,
GSList *groups, const char * const subscription,
const char * const offline_message, gboolean pending_out);
PContact p_contact_new(const char *const barejid, const char *const name,
GSList *groups, const char *const subscription,
const char *const offline_message, gboolean pending_out);
void p_contact_add_resource(PContact contact, Resource *resource);
gboolean p_contact_remove_resource(PContact contact, const char * const resource);
gboolean p_contact_remove_resource(PContact contact, const char *const resource);
void p_contact_free(PContact contact);
const char* p_contact_barejid(PContact contact);
const char* p_contact_barejid_collate_key(PContact contact);
@ -54,23 +54,23 @@ const char* p_contact_name_or_jid(const PContact contact);
const char* p_contact_presence(PContact contact);
const char* p_contact_status(PContact contact);
const char* p_contact_subscription(const PContact contact);
GList * p_contact_get_available_resources(const PContact contact);
GList* p_contact_get_available_resources(const PContact contact);
GDateTime* p_contact_last_activity(const PContact contact);
gboolean p_contact_pending_out(const PContact contact);
void p_contact_set_presence(const PContact contact, Resource *resource);
void p_contact_set_status(const PContact contact, const char * const status);
void p_contact_set_name(const PContact contact, const char * const name);
void p_contact_set_subscription(const PContact contact, const char * const subscription);
void p_contact_set_status(const PContact contact, const char *const status);
void p_contact_set_name(const PContact contact, const char *const name);
void p_contact_set_subscription(const PContact contact, const char *const subscription);
void p_contact_set_pending_out(const PContact contact, gboolean pending_out);
void p_contact_set_last_activity(const PContact contact, GDateTime *last_activity);
gboolean p_contact_is_available(const PContact contact);
gboolean p_contact_has_available_resource(const PContact contact);
Resource * p_contact_get_resource(const PContact contact, const char * const resource);
Resource* p_contact_get_resource(const PContact contact, const char *const resource);
void p_contact_set_groups(const PContact contact, GSList *groups);
GSList * p_contact_groups(const PContact contact);
gboolean p_contact_in_group(const PContact contact, const char * const group);
gboolean p_contact_in_group(const PContact contact, const char *const group);
gboolean p_contact_subscribed(const PContact contact);
char * p_contact_create_display_string(const PContact contact, const char * const resource);
char* p_contact_create_display_string(const PContact contact, const char *const resource);
Autocomplete p_contact_resource_ac(const PContact contact);
void p_contact_resource_ac_reset(const PContact contact);

View File

@ -48,14 +48,14 @@ struct jid_t {
typedef struct jid_t Jid;
Jid * jid_create(const gchar * const str);
Jid * jid_create_from_bare_and_resource(const char * const room, const char * const nick);
Jid* jid_create(const gchar *const str);
Jid* jid_create_from_bare_and_resource(const char *const room, const char *const nick);
void jid_destroy(Jid *jid);
gboolean jid_is_valid_room_form(Jid *jid);
char * create_fulljid(const char * const barejid, const char * const resource);
char * get_nick_from_full_jid(const char * const full_room_jid);
char* create_fulljid(const char *const barejid, const char *const resource);
char* get_nick_from_full_jid(const char *const full_room_jid);
char * jid_fulljid_or_barejid(Jid *jid);
char* jid_fulljid_or_barejid(Jid *jid);
#endif

View File

@ -54,13 +54,13 @@ void log_init(log_level_t filter);
log_level_t log_get_filter(void);
void log_close(void);
void log_reinit(void);
char * get_log_file_location(void);
void log_debug(const char * const msg, ...);
void log_info(const char * const msg, ...);
void log_warning(const char * const msg, ...);
void log_error(const char * const msg, ...);
void log_msg(log_level_t level, const char * const area,
const char * const msg);
char* get_log_file_location(void);
void log_debug(const char *const msg, ...);
void log_info(const char *const msg, ...);
void log_warning(const char *const msg, ...);
void log_error(const char *const msg, ...);
void log_msg(log_level_t level, const char *const area,
const char *const msg);
log_level_t log_level_from_string(char *log_level);
void log_stderr_init(log_level_t level);
@ -69,19 +69,19 @@ void log_stderr_handler(void);
void chat_log_init(void);
void chat_log_msg_out(const char * const barejid, const char * const msg);
void chat_log_otr_msg_out(const char * const barejid, const char * const msg);
void chat_log_pgp_msg_out(const char * const barejid, const char * const msg);
void chat_log_msg_out(const char *const barejid, const char *const msg);
void chat_log_otr_msg_out(const char *const barejid, const char *const msg);
void chat_log_pgp_msg_out(const char *const barejid, const char *const msg);
void chat_log_msg_in(const char * const barejid, const char * const msg, GDateTime *timestamp);
void chat_log_otr_msg_in(const char * const barejid, const char * const msg, gboolean was_decrypted, GDateTime *timestamp);
void chat_log_pgp_msg_in(const char * const barejid, const char * const msg, GDateTime *timestamp);
void chat_log_msg_in(const char *const barejid, const char *const msg, GDateTime *timestamp);
void chat_log_otr_msg_in(const char *const barejid, const char *const msg, gboolean was_decrypted, GDateTime *timestamp);
void chat_log_pgp_msg_in(const char *const barejid, const char *const msg, GDateTime *timestamp);
void chat_log_close(void);
GSList * chat_log_get_previous(const gchar * const login,
const gchar * const recipient);
GSList* chat_log_get_previous(const gchar *const login,
const gchar *const recipient);
void groupchat_log_init(void);
void groupchat_log_chat(const gchar * const login, const gchar * const room,
const gchar * const nick, const gchar * const msg);
void groupchat_log_chat(const gchar *const login, const gchar *const room,
const gchar *const nick, const gchar *const msg);
#endif

View File

@ -76,75 +76,75 @@ typedef struct _muc_occupant_t {
void muc_init(void);
void muc_close(void);
void muc_join(const char * const room, const char * const nick, const char * const password, gboolean autojoin);
void muc_leave(const char * const room);
void muc_join(const char *const room, const char *const nick, const char *const password, gboolean autojoin);
void muc_leave(const char *const room);
gboolean muc_active(const char * const room);
gboolean muc_autojoin(const char * const room);
gboolean muc_active(const char *const room);
gboolean muc_autojoin(const char *const room);
GList* muc_rooms(void);
void muc_set_features(const char * const room, GSList *features);
void muc_set_features(const char *const room, GSList *features);
char* muc_nick(const char * const room);
char* muc_password(const char * const room);
char* muc_nick(const char *const room);
char* muc_password(const char *const room);
void muc_nick_change_start(const char * const room, const char * const new_nick);
void muc_nick_change_complete(const char * const room, const char * const nick);
gboolean muc_nick_change_pending(const char * const room);
char* muc_old_nick(const char * const room, const char * const new_nick);
void muc_nick_change_start(const char *const room, const char *const new_nick);
void muc_nick_change_complete(const char *const room, const char *const nick);
gboolean muc_nick_change_pending(const char *const room);
char* muc_old_nick(const char *const room, const char *const new_nick);
gboolean muc_roster_contains_nick(const char * const room, const char * const nick);
gboolean muc_roster_complete(const char * const room);
gboolean muc_roster_add(const char * const room, const char * const nick, const char * const jid,
const char * const role, const char * const affiliation, const char * const show,
const char * const status);
void muc_roster_remove(const char * const room, const char * const nick);
void muc_roster_set_complete(const char * const room);
GList * muc_roster(const char * const room);
Autocomplete muc_roster_ac(const char * const room);
Autocomplete muc_roster_jid_ac(const char * const room);
void muc_jid_autocomplete_reset(const char * const room);
void muc_jid_autocomplete_add_all(const char * const room, GSList *jids);
gboolean muc_roster_contains_nick(const char *const room, const char *const nick);
gboolean muc_roster_complete(const char *const room);
gboolean muc_roster_add(const char *const room, const char *const nick, const char *const jid,
const char *const role, const char *const affiliation, const char *const show,
const char *const status);
void muc_roster_remove(const char *const room, const char *const nick);
void muc_roster_set_complete(const char *const room);
GList* muc_roster(const char *const room);
Autocomplete muc_roster_ac(const char *const room);
Autocomplete muc_roster_jid_ac(const char *const room);
void muc_jid_autocomplete_reset(const char *const room);
void muc_jid_autocomplete_add_all(const char *const room, GSList *jids);
Occupant* muc_roster_item(const char * const room, const char * const nick);
Occupant * muc_roster_item(const char *const room, const char *const nick);
gboolean muc_occupant_available(Occupant *occupant);
const char * muc_occupant_affiliation_str(Occupant *occupant);
const char * muc_occupant_role_str(Occupant *occupant);
GSList * muc_occupants_by_role(const char * const room, muc_role_t role);
GSList * muc_occupants_by_affiliation(const char * const room, muc_affiliation_t affiliation);
const char* muc_occupant_affiliation_str(Occupant *occupant);
const char* muc_occupant_role_str(Occupant *occupant);
GSList* muc_occupants_by_role(const char *const room, muc_role_t role);
GSList* muc_occupants_by_affiliation(const char *const room, muc_affiliation_t affiliation);
void muc_occupant_nick_change_start(const char * const room, const char * const new_nick, const char * const old_nick);
char* muc_roster_nick_change_complete(const char * const room, const char * const nick);
void muc_occupant_nick_change_start(const char *const room, const char *const new_nick, const char *const old_nick);
char* muc_roster_nick_change_complete(const char *const room, const char *const nick);
void muc_invites_add(const char * const room, const char * const password);
void muc_invites_remove(const char * const room);
void muc_invites_add(const char *const room, const char *const password);
void muc_invites_remove(const char *const room);
gint muc_invites_count(void);
GSList* muc_invites(void);
gboolean muc_invites_contain(const char * const room);
gboolean muc_invites_contain(const char *const room);
void muc_invites_reset_ac(void);
char* muc_invites_find(const char * const search_str);
char* muc_invites_find(const char *const search_str);
void muc_invites_clear(void);
char* muc_invite_password(const char * const room);
char* muc_invite_password(const char *const room);
void muc_set_subject(const char * const room, const char * const subject);
char* muc_subject(const char * const room);
void muc_set_subject(const char *const room, const char *const subject);
char* muc_subject(const char *const room);
void muc_pending_broadcasts_add(const char * const room, const char * const message);
GList * muc_pending_broadcasts(const char * const room);
void muc_pending_broadcasts_add(const char *const room, const char *const message);
GList* muc_pending_broadcasts(const char *const room);
char* muc_autocomplete(ProfWin *window, const char * const input);
void muc_autocomplete_reset(const char * const room);
char* muc_autocomplete(ProfWin *window, const char *const input);
void muc_autocomplete_reset(const char *const room);
gboolean muc_requires_config(const char * const room);
void muc_set_requires_config(const char * const room, gboolean val);
gboolean muc_requires_config(const char *const room);
void muc_set_requires_config(const char *const room, gboolean val);
void muc_set_role(const char * const room, const char * const role);
void muc_set_affiliation(const char * const room, const char * const affiliation);
char *muc_role_str(const char * const room);
char *muc_affiliation_str(const char * const room);
void muc_set_role(const char *const room, const char *const role);
void muc_set_affiliation(const char *const room, const char *const affiliation);
char* muc_role_str(const char *const room);
char* muc_affiliation_str(const char *const room);
muc_member_type_t muc_member_type(const char * const room);
muc_member_type_t muc_member_type(const char *const room);
#endif

View File

@ -44,8 +44,8 @@ typedef struct resource_t {
int priority;
} Resource;
Resource * resource_new(const char * const name, resource_presence_t presence,
const char * const status, const int priority);
Resource* resource_new(const char *const name, resource_presence_t presence,
const char *const status, const int priority);
void resource_destroy(Resource *resource);
int resource_compare_availability(Resource *first, Resource *second);

View File

@ -41,32 +41,32 @@
#include "contact.h"
void roster_clear(void);
gboolean roster_update_presence(const char * const barejid, Resource *resource,
gboolean roster_update_presence(const char *const barejid, Resource *resource,
GDateTime *last_activity);
PContact roster_get_contact(const char * const barejid);
gboolean roster_contact_offline(const char * const barejid,
const char * const resource, const char * const status);
PContact roster_get_contact(const char *const barejid);
gboolean roster_contact_offline(const char *const barejid,
const char *const resource, const char *const status);
void roster_reset_search_attempts(void);
void roster_init(void);
void roster_free(void);
void roster_change_name(PContact contact, const char * const new_name);
void roster_remove(const char * const name, const char * const barejid);
void roster_update(const char * const barejid, const char * const name,
GSList *groups, const char * const subscription, gboolean pending_out);
gboolean roster_add(const char * const barejid, const char * const name, GSList *groups,
const char * const subscription, gboolean pending_out);
char * roster_barejid_from_name(const char * const name);
GSList * roster_get_contacts(void);
GSList * roster_get_contacts_online(void);
void roster_change_name(PContact contact, const char *const new_name);
void roster_remove(const char *const name, const char *const barejid);
void roster_update(const char *const barejid, const char *const name,
GSList *groups, const char *const subscription, gboolean pending_out);
gboolean roster_add(const char *const barejid, const char *const name, GSList *groups,
const char *const subscription, gboolean pending_out);
char* roster_barejid_from_name(const char *const name);
GSList* roster_get_contacts(void);
GSList* roster_get_contacts_online(void);
gboolean roster_has_pending_subscriptions(void);
char * roster_contact_autocomplete(const char * const search_str);
char * roster_fulljid_autocomplete(const char * const search_str);
GSList * roster_get_group(const char * const group);
GSList * roster_get_groups(void);
char * roster_group_autocomplete(const char * const search_str);
char * roster_barejid_autocomplete(const char * const search_str);
GSList * roster_get_contacts_by_presence(const char * const presence);
GSList * roster_get_nogroup(void);
char * roster_get_msg_display_name(const char * const barejid, const char * const resource);
char* roster_contact_autocomplete(const char *const search_str);
char* roster_fulljid_autocomplete(const char *const search_str);
GSList* roster_get_group(const char *const group);
GSList* roster_get_groups(void);
char* roster_group_autocomplete(const char *const search_str);
char* roster_barejid_autocomplete(const char *const search_str);
GSList* roster_get_contacts_by_presence(const char *const presence);
GSList* roster_get_nogroup(void);
char* roster_get_msg_display_name(const char *const barejid, const char *const resource);
#endif

View File

@ -39,27 +39,27 @@
void wins_init(void);
ProfWin * wins_new_xmlconsole(void);
ProfWin * wins_new_chat(const char * const barejid);
ProfWin * wins_new_muc(const char * const roomjid);
ProfWin * wins_new_muc_config(const char * const roomjid, DataForm *form);
ProfWin * wins_new_private(const char * const fulljid);
ProfWin* wins_new_xmlconsole(void);
ProfWin* wins_new_chat(const char *const barejid);
ProfWin* wins_new_muc(const char *const roomjid);
ProfWin* wins_new_muc_config(const char *const roomjid, DataForm *form);
ProfWin* wins_new_private(const char *const fulljid);
ProfWin * wins_get_console(void);
ProfChatWin *wins_get_chat(const char * const barejid);
ProfMucWin * wins_get_muc(const char * const roomjid);
ProfMucConfWin * wins_get_muc_conf(const char * const roomjid);
ProfPrivateWin *wins_get_private(const char * const fulljid);
ProfXMLWin * wins_get_xmlconsole(void);
ProfWin* wins_get_console(void);
ProfChatWin* wins_get_chat(const char *const barejid);
ProfMucWin* wins_get_muc(const char *const roomjid);
ProfMucConfWin* wins_get_muc_conf(const char *const roomjid);
ProfPrivateWin* wins_get_private(const char *const fulljid);
ProfXMLWin* wins_get_xmlconsole(void);
ProfWin * wins_get_current(void);
ProfWin* wins_get_current(void);
void wins_set_current_by_num(int i);
ProfWin * wins_get_by_num(int i);
ProfWin* wins_get_by_num(int i);
ProfWin * wins_get_next(void);
ProfWin * wins_get_previous(void);
ProfWin* wins_get_next(void);
ProfWin* wins_get_previous(void);
int wins_get_num(ProfWin *window);
int wins_get_current_num(void);
void wins_close_current(void);
@ -67,13 +67,13 @@ void wins_close_by_num(int i);
gboolean wins_is_current(ProfWin *window);
int wins_get_total_unread(void);
void wins_resize_all(void);
GSList * wins_get_chat_recipients(void);
GSList * wins_get_prune_wins(void);
GSList* wins_get_chat_recipients(void);
GSList* wins_get_prune_wins(void);
void wins_lost_connection(void);
gboolean wins_tidy(void);
GSList * wins_create_summary(void);
GSList* wins_create_summary(void);
void wins_destroy(void);
GList * wins_get_nums(void);
GList* wins_get_nums(void);
gboolean wins_swap(int source_win, int target_win);
void wins_hide_subwin(ProfWin *window);
void wins_show_subwin(ProfWin *window);