mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 09:13:14 +02:00
core: reformat comments for functions
This commit is contained in:
@@ -44,7 +44,7 @@ void script_action_install (int quiet);
|
||||
|
||||
|
||||
/*
|
||||
* script_action_list: list loaded scripts (all languages)
|
||||
* Lists loaded scripts (all languages).
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -95,8 +95,9 @@ script_action_list ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_list_input: list loaded scripts (all languages) in input
|
||||
* (send it to buffer if send_to_buffer == 1)
|
||||
* Lists loaded scripts (all languages) in input.
|
||||
*
|
||||
* Sends input to buffer if send_to_buffer == 1.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -154,7 +155,7 @@ script_action_list_input (int send_to_buffer)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_load: load a script
|
||||
* Loads a script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -197,7 +198,7 @@ script_action_load (const char *name, int quiet)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_unload: unload a script
|
||||
* Unloads a script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -303,7 +304,7 @@ script_action_unload (const char *name, int quiet)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_reload: reload a script
|
||||
* Reloads a script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -409,7 +410,7 @@ script_action_reload (const char *name, int quiet)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_installnext_timer_cb: callback called to install next script
|
||||
* Installs next script.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -424,8 +425,7 @@ script_action_installnext_timer_cb (void *data, int remaining_calls)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_install_process_cb: callback called when script is downloaded
|
||||
* (for installing it)
|
||||
* Installs script (after download of script).
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -494,9 +494,7 @@ script_action_install_process_cb (void *data, const char *command,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_get_next_script_to_install: get next script to install
|
||||
* according to "install_order" in
|
||||
* script
|
||||
* Gets next script to install according to "install_order" in scripts.
|
||||
*/
|
||||
|
||||
struct t_script_repo *
|
||||
@@ -521,7 +519,7 @@ script_action_get_next_script_to_install ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_install: install script(s) marked for install
|
||||
* Installs scrip(s) marked for install.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -594,7 +592,7 @@ script_action_install (int quiet)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_remove: remove a script
|
||||
* Removes a script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -672,8 +670,11 @@ script_action_remove (const char *name, int quiet)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_hold: (un)hold a script
|
||||
* return 1 if ok, 0 if error
|
||||
* Un(hold)s a script.
|
||||
*
|
||||
* Returns:
|
||||
* 1: OK
|
||||
* 0: error
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -722,9 +723,8 @@ script_action_hold (const char *name, int quiet)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_show_diff_process_cb: callback called when script is
|
||||
* downloaded (for showing source code
|
||||
* below script detail)
|
||||
* Shows a diff between script installed and script in repository (after
|
||||
* download of script).
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -814,9 +814,7 @@ script_action_show_diff_process_cb (void *data, const char *command,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_show_source_process_cb: callback called when script is
|
||||
* downloaded (for showing source code
|
||||
* below script detail)
|
||||
* Shows source code of script (after download of script).
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -951,7 +949,7 @@ script_action_show_source_process_cb (void *data, const char *command,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_show: show detailed info on a script
|
||||
* Shows detailed info on a script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -1029,7 +1027,7 @@ script_action_show (const char *name, int quiet)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_showdiff: jump to diff on buffer with detail of script
|
||||
* Jumps to diff on buffer with detail of script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -1066,8 +1064,11 @@ script_action_showdiff ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_run: run planned actions
|
||||
* return 1 if an action was executed, otherwise 0
|
||||
* Runs planned actions.
|
||||
*
|
||||
* Returns:
|
||||
* 1: at least an action was executed
|
||||
* 0: no action executed
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1304,7 +1305,7 @@ script_action_run ()
|
||||
|
||||
|
||||
/*
|
||||
* script_action_add: add an action to list of actions
|
||||
* Adds an action to list of actions.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -1332,9 +1333,10 @@ script_action_add (const char *action)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_action_schedule: schedule action
|
||||
* if "need_repository" is 1, then the action will be
|
||||
* executed only when the repository file is up-to-date
|
||||
* Schedules an action.
|
||||
*
|
||||
* If "need_repository" is 1, then the action will be executed only when the
|
||||
* repository file is up-to-date.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -41,7 +41,7 @@ int script_buffer_detail_script_line_diff = -1;
|
||||
|
||||
|
||||
/*
|
||||
* script_buffer_display_line_script: display a line with script
|
||||
* Displays a line with script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -332,8 +332,9 @@ script_buffer_display_line_script (int line, struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_detail_label: get header of a line for detail of script
|
||||
* The returned string is aligned on the right
|
||||
* Gets header of a line for detail of script.
|
||||
*
|
||||
* Returns a string aligned on the right.
|
||||
*/
|
||||
|
||||
const char *
|
||||
@@ -355,7 +356,7 @@ script_buffer_detail_label (const char *text, int max_length)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_display_detail_script: display detail on a script
|
||||
* Displays detail on a script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -481,7 +482,7 @@ script_buffer_display_detail_script (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_refresh: update list of scripts in script buffer
|
||||
* Updates list of scripts in script buffer.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -543,7 +544,7 @@ script_buffer_refresh (int clear)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_set_current_line: set current selected line in script buffer
|
||||
* Sets current selected line.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -564,7 +565,7 @@ script_buffer_set_current_line (int line)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_show_detail_script: show detailed info on a script
|
||||
* Shows detailed info on a script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -586,7 +587,7 @@ script_buffer_show_detail_script (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_get_window_info: get infos about window
|
||||
* Gets info about a window.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -622,8 +623,11 @@ script_buffer_get_window_info (struct t_gui_window *window,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_check_line_outside_window: check if current line is outside
|
||||
* window
|
||||
* Checks if current line is outside window.
|
||||
*
|
||||
* Returns:
|
||||
* 1: line is outside window
|
||||
* 0: line is inside window
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -653,8 +657,7 @@ script_buffer_check_line_outside_window ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_window_scrolled_cb: called when signal "window_scrolled" is
|
||||
* received
|
||||
* Callback for signal "window_scrolled".
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -698,8 +701,7 @@ script_buffer_window_scrolled_cb (void *data, const char *signal,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_input_cb: callback called when user send data to script list
|
||||
* buffer
|
||||
* Callback for user data in script buffer.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -771,7 +773,7 @@ script_buffer_input_cb (void *data, struct t_gui_buffer *buffer,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_close_cb: callback called when script buffer is closed
|
||||
* Callback called when script buffer is closed.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -789,8 +791,8 @@ script_buffer_close_cb (void *data, struct t_gui_buffer *buffer)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_set_callbacks: restore buffers callbacks (input and close) for
|
||||
* buffer created by script plugin
|
||||
* Restore buffer callbacks (input and close) for buffer created by script
|
||||
* plugin.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -808,7 +810,7 @@ script_buffer_set_callbacks ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_set_keys: set keys on script buffer
|
||||
* Sets keys on script buffer.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -845,7 +847,7 @@ script_buffer_set_keys ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_buffer_open: open script buffer (to display list of scripts)
|
||||
* Opens script buffer.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* script_command_action: run action
|
||||
* Runs an action.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -119,7 +119,7 @@ script_command_action (struct t_gui_buffer *buffer, const char *action,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_command_script: command to manage scripts
|
||||
* Callback for command "/script": manages scripts.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -269,7 +269,7 @@ script_command_script (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
}
|
||||
|
||||
/*
|
||||
* scrit_command_init: init script commands (create hooks)
|
||||
* Hook command.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* script_completion_scripts_cb: callback for completion with scripts in
|
||||
* repository
|
||||
* Adds scripts to completion list.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -60,8 +59,7 @@ script_completion_scripts_cb (void *data, const char *completion_item,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_completion_scripts_installed_cb: callback for completion with scripts
|
||||
* installed
|
||||
* Adds installed scripts to completion list.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -91,8 +89,7 @@ script_completion_scripts_installed_cb (void *data, const char *completion_item,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_completion_exec_file_cb: callback called for each file in script
|
||||
* directories
|
||||
* Adds files in script directories to completion list.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -125,8 +122,7 @@ script_completion_exec_file_cb (void *data, const char *filename)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_completion_scripts_files_cb: callback for completion with files in
|
||||
* script directories
|
||||
* Adds files in script directories to completion list.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -174,8 +170,7 @@ script_completion_scripts_files_cb (void *data, const char *completion_item,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_completion_tags_cb: callback for completion with tags from scripts in
|
||||
* repository
|
||||
* Adds tags from scripts in repository to completion list.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -216,7 +211,7 @@ script_completion_tags_cb (void *data, const char *completion_item,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_completion_init: init completion for script plugin
|
||||
* Hooks completions.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -89,10 +89,11 @@ struct t_config_option *script_config_scripts_url;
|
||||
|
||||
|
||||
/*
|
||||
* script_config_get_diff_command: get diff command
|
||||
* if option is "auto", try to find git, and
|
||||
* fallbacks on "diff" if not found
|
||||
* return NULL if no diff command is set
|
||||
* Gets the diff command (option "script.look.diff_command").
|
||||
*
|
||||
* If option is "auto", try to find git, and fallbacks on "diff" if not found.
|
||||
*
|
||||
* Returns NULL if no diff command is set.
|
||||
*/
|
||||
|
||||
const char *
|
||||
@@ -142,8 +143,9 @@ script_config_get_diff_command ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_get_dir: get local directory for script
|
||||
* Note: result must be freed after use
|
||||
* Gets local directory for script.
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
|
||||
char *
|
||||
@@ -173,9 +175,10 @@ script_config_get_dir ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_get_xml_filename: get filename with scripts (by default
|
||||
* "/home/xxx/.weechat/script/plugins.xml.gz")
|
||||
* Note: result must be freed after use
|
||||
* Gets filename with script
|
||||
* (by default "/home/xxx/.weechat/script/plugins.xml.gz").
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
|
||||
char *
|
||||
@@ -194,13 +197,13 @@ script_config_get_xml_filename ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_get_script_download_filename: get filename for a script to
|
||||
* download, for eample:
|
||||
* "/home/xxx/.weechat/script/iset.pl"
|
||||
* (if suffix is not NULL, it is
|
||||
* added to filename)
|
||||
* Note: result must be freed after
|
||||
* use
|
||||
* Gets filename for a script to download.
|
||||
*
|
||||
* If suffix is not NULL, it is added to filename.
|
||||
*
|
||||
* Example: "/home/xxx/.weechat/script/iset.pl"
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
|
||||
char *
|
||||
@@ -227,8 +230,7 @@ script_config_get_script_download_filename (struct t_script_repo *script,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_refresh_cb: callback called when script buffer needs to be
|
||||
* refreshed
|
||||
* Callback for changes on options that require a refresh of script buffer.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -243,8 +245,8 @@ script_config_refresh_cb (void *data, struct t_config_option *option)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_reload_scripts_cb: callback called list of scripts must be
|
||||
* reloaded from file (plugins.xml.gz)
|
||||
* Callback for changes on options that require a reload of list of scripts
|
||||
* (file plugins.xml.gz).
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -263,8 +265,7 @@ script_config_reload_scripts_cb (void *data, struct t_config_option *option)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_change_use_keys_cb: callback called when option "use_keys" is
|
||||
* changed
|
||||
* Callback for changes on option "script.look.use_keys".
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -279,8 +280,7 @@ script_config_change_use_keys_cb (void *data, struct t_config_option *option)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_change_hold_cb: callback called when list of scripts to "hold"
|
||||
* is changed
|
||||
* Callback for changes on option "script.scripts.hold".
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -296,9 +296,10 @@ script_config_change_hold_cb (void *data, struct t_config_option *option)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_hold: hold a script
|
||||
* Note: the option is changed, but the status "held"
|
||||
* in script is NOT updated by this function
|
||||
* Holds a script.
|
||||
*
|
||||
* Note: the option is changed, but the status "held" in script is NOT updated
|
||||
* by this function.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -339,9 +340,10 @@ script_config_hold (const char *name_with_extension)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_unhold: unhold a script
|
||||
* Note: the option is changed, but the status "held"
|
||||
* in script is NOT updated by this function
|
||||
* Unholds a script.
|
||||
*
|
||||
* Note: the option is changed, but the status "held" in script is NOT updated
|
||||
* by this function.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -378,7 +380,7 @@ script_config_unhold (const char *name_with_extension)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_reaload: reload script configuration file
|
||||
* Reloads script configuration file.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -391,8 +393,11 @@ script_config_reload (void *data, struct t_config_file *config_file)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_init: init script configuration file
|
||||
* return: 1 if ok, 0 if error
|
||||
* Initializes script configuration file.
|
||||
*
|
||||
* Returns:
|
||||
* 1: OK
|
||||
* 0: error
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -699,7 +704,7 @@ script_config_init ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_read: read script configuration file
|
||||
* Reads script configuration file.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -709,7 +714,7 @@ script_config_read ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_write: write script configuration file
|
||||
* Writes script configuration file.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -719,7 +724,7 @@ script_config_write ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_config_free: free script configuration file
|
||||
* Frees script configuration file.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* script_info_get_infolist_cb: callback called when script infolist is asked
|
||||
* Returns infolist with script info.
|
||||
*/
|
||||
|
||||
struct t_infolist *
|
||||
@@ -91,7 +91,7 @@ script_info_get_infolist_cb (void *data, const char *infolist_name,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_info_init: initialize info, infolist and hdata hooks for script plugin
|
||||
* Hooks infolist and hdata.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -57,9 +57,11 @@ char *script_repo_filter = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* script_repo_script_valid: check if a script pointer exists
|
||||
* return 1 if script exists
|
||||
* 0 if script is not found
|
||||
* Checks if a script pointer is valid.
|
||||
*
|
||||
* Returns:
|
||||
* 1: script exists
|
||||
* 0: script does not exist
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -82,8 +84,9 @@ script_repo_script_valid (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_search_displayed_by_number: search a script displayed by number
|
||||
* (first script displayed is 0)
|
||||
* Searches for a script displayed by number (first script displayed is 0).
|
||||
*
|
||||
* Returns pointer to script found, NULL if not found.
|
||||
*/
|
||||
|
||||
struct t_script_repo *
|
||||
@@ -112,8 +115,9 @@ script_repo_search_displayed_by_number (int number)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_search_by_name: search a script by name
|
||||
* (example: "iset")
|
||||
* Searches for a script by name (example: "iset").
|
||||
*
|
||||
* Returns pointer to script found, NULL if not found.
|
||||
*/
|
||||
|
||||
struct t_script_repo *
|
||||
@@ -133,8 +137,9 @@ script_repo_search_by_name (const char *name)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_search_by_name_ext: search a script by name/extension
|
||||
* (example: "iset.pl")
|
||||
* Searches for a script by name/extension (example: "iset.pl").
|
||||
*
|
||||
* Returns pointer to script found, NULL if not found.
|
||||
*/
|
||||
|
||||
struct t_script_repo *
|
||||
@@ -154,10 +159,10 @@ script_repo_search_by_name_ext (const char *name_with_extension)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_get_filename_loaded: get filename of a loaded script
|
||||
* (it returns name of file and not the link,
|
||||
* if there is a symbolic to file)
|
||||
* Note: result has to be free() after use
|
||||
* Gets filename of a loaded script (returns name of file and not the link, if
|
||||
* there is a symbolic to file).
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
|
||||
char *
|
||||
@@ -209,9 +214,16 @@ script_repo_get_filename_loaded (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_get_status_for_display: get status for display
|
||||
* list is the codes of status to display
|
||||
* (exemple: "*iaHrN" for all status)
|
||||
* Gets status for display.
|
||||
*
|
||||
* Argument "list" is the codes of status to display:
|
||||
* * popular
|
||||
* i installed
|
||||
* a autoloaded
|
||||
* ? unknown
|
||||
* H held
|
||||
* r running
|
||||
* N obsolete
|
||||
*/
|
||||
|
||||
const char *
|
||||
@@ -267,9 +279,10 @@ script_repo_get_status_for_display (struct t_script_repo *script,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_get_status_desc_for_display: get status description for display
|
||||
* (exemple of string returned:
|
||||
* "popular installed autoloaded loaded")
|
||||
* Gets status description for display.
|
||||
*
|
||||
* Argument "list" is the codes of status to display (see function
|
||||
* script_repo_get_status_for_display() above).
|
||||
*/
|
||||
|
||||
const char *
|
||||
@@ -349,7 +362,9 @@ script_repo_get_status_desc_for_display (struct t_script_repo *script,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_alloc: allocate a script structure
|
||||
* Allocates a script structure.
|
||||
*
|
||||
* Returns pointer to new script, NULL if error.
|
||||
*/
|
||||
|
||||
struct t_script_repo *
|
||||
@@ -389,8 +404,12 @@ script_repo_alloc ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_compare_scripts: compare two scripts using sort key(s)
|
||||
* (from option script.look.sort)
|
||||
* Compares two script using sort key(s) (from option script.look.sort).
|
||||
*
|
||||
* Returns:
|
||||
* < 0: script1 < script2
|
||||
* 0: script1 == script2
|
||||
* > 0: script1 > script2
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -487,7 +506,7 @@ script_repo_compare_scripts (struct t_script_repo *script1,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_find_pos: find position for script in list
|
||||
* Searches for position for script in list (to keep list sorted).
|
||||
*/
|
||||
|
||||
struct t_script_repo *
|
||||
@@ -507,8 +526,7 @@ script_repo_find_pos (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_set_max_length_field: set max length for a field in hashtable
|
||||
* "script_repo_max_length_field"
|
||||
* Sets max length for a field in hashtable "script_repo_max_length_field".
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -522,7 +540,7 @@ script_repo_set_max_length_field (const char *field, int length)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_add: add script to list of scripts
|
||||
* Adds a script to list of scripts.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -589,7 +607,7 @@ script_repo_add (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_free: free data in script
|
||||
* Frees data in a script.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -628,7 +646,7 @@ script_repo_free (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_remove: remove a script from list
|
||||
* Removes a script from list.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -666,7 +684,7 @@ script_repo_remove (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_remove_all: remove all scripts from list
|
||||
* Removes all scripts from list.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -684,7 +702,11 @@ script_repo_remove_all ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_script_is_held: return 1 if script is held, 0 otherwise
|
||||
* Checks if a script is held.
|
||||
*
|
||||
* Returns:
|
||||
* 1: script is held
|
||||
* 0: script is not held
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -713,8 +735,9 @@ script_repo_script_is_held (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_md5sum_file: return MD5 checksum for content of a file
|
||||
* Note: result has to be free() after use
|
||||
* Computes MD5 checksum for the content of a file.
|
||||
*
|
||||
* Note: result has to be freed after use.
|
||||
*/
|
||||
|
||||
char *
|
||||
@@ -763,10 +786,10 @@ script_repo_md5sum_file (const char *filename)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_update_status: update status of a script, which are:
|
||||
* - script installed?
|
||||
* - script running?
|
||||
* - new version available?
|
||||
* Updates following status of a script:
|
||||
* - script installed?
|
||||
* - script running?
|
||||
* - new version available?
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -856,7 +879,7 @@ script_repo_update_status (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_update_status_all: update status of all scripts
|
||||
* Updates status of all scripts.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -872,7 +895,7 @@ script_repo_update_status_all ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_set_filter: set filter for scripts
|
||||
* Sets filter for scripts.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -884,8 +907,11 @@ script_repo_set_filter (const char *filter)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_match_filter: return 1 if script is matching filter string,
|
||||
* otherwise 0
|
||||
* Checks if a script is matching a filter string.
|
||||
*
|
||||
* Returns:
|
||||
* 1: script is matching filter string
|
||||
* 0: script does not match filter string
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -954,10 +980,8 @@ script_repo_match_filter (struct t_script_repo *script)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_filter_scripts: filter scripts (search string in
|
||||
* name/description/tags) and mark scripts found as
|
||||
* "displayed" (0 in displayed for non-matching
|
||||
* scripts)
|
||||
* Filters scripts (search string in name/description/tags) and marks scripts
|
||||
* found as "displayed" (0 in displayed for non-matching scripts).
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -981,8 +1005,11 @@ script_repo_filter_scripts (const char *search)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_file_exists: return 1 if repository file (plugins.xml.gz) exists
|
||||
* otherwise 0
|
||||
* Checks if repository file (plugins.xml.gz) exists.
|
||||
*
|
||||
* Returns:
|
||||
* 1: repository file exists
|
||||
* 0: repository file does not exist
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1006,9 +1033,13 @@ script_repo_file_exists ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_file_is_uptodate: return 1 if repository file (plugins.xml.gz)
|
||||
* is up-to-date (file exists and is not outdated)
|
||||
* otherwise 0 (file has to be downloaded)
|
||||
* Checks if repository file (plugins.xml.gz) is up-to-date (file exists and it
|
||||
* not outdated).
|
||||
*
|
||||
* Returns:
|
||||
* 1: repository file is up-to-date
|
||||
* 0: repository file does not exist or is outdated
|
||||
* (file has to be downloaded)
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1067,8 +1098,11 @@ script_repo_file_is_uptodate ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_file_read: read scripts in repository file (plugins.xml.gz)
|
||||
* return 1 if ok, 0 if error
|
||||
* Reads scripts in repository file (plugins.xml.gz).
|
||||
*
|
||||
* Returns:
|
||||
* 1: OK
|
||||
* 0: error
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1368,8 +1402,7 @@ script_repo_file_read (int quiet)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_file_update_process_cb: callback called when list of scripts is
|
||||
* downloaded
|
||||
* Callback called when list of scripts is downloaded.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1409,7 +1442,7 @@ script_repo_file_update_process_cb (void *data, const char *command,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_file_update: update repository file, and read it
|
||||
* Updates repository file and reads it.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -1458,7 +1491,7 @@ script_repo_file_update (int quiet)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_hdata_script_cb: return hdata for script
|
||||
* Returns hdata for script.
|
||||
*/
|
||||
|
||||
struct t_hdata *
|
||||
@@ -1503,8 +1536,11 @@ script_repo_hdata_script_cb (void *data, const char *hdata_name)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_add_to_infolist: add a script in an infolist
|
||||
* return 1 if ok, 0 if error
|
||||
* Adds a script in an infolist.
|
||||
*
|
||||
* Returns:
|
||||
* 1: OK
|
||||
* 0: error
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1567,7 +1603,7 @@ script_repo_add_to_infolist (struct t_infolist *infolist,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_repo_print_log: print script infos in log (usually for crash dump)
|
||||
* Prints scripts in WeeChat log file (usually for crash dump).
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
+14
-16
@@ -56,8 +56,9 @@ struct t_hook *script_timer_refresh = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* script_language_search: search language and return index
|
||||
* return -1 if not found
|
||||
* Searches for a language.
|
||||
*
|
||||
* Returns index of language, -1 if not found.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -76,9 +77,9 @@ script_language_search (const char *language)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_language_search_by_extension: search language by extension and return
|
||||
* index
|
||||
* return -1 if not found
|
||||
* Searches for a language by extension.
|
||||
*
|
||||
* Returns index of language, -1 if not found.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -97,8 +98,7 @@ script_language_search_by_extension (const char *extension)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_get_loaded_plugins_and_scripts: get loaded plugins (in array of
|
||||
* integers) and scripts (in hashtable)
|
||||
* Gets loaded plugins (in array of integers) and scripts (in hashtable).
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -167,7 +167,7 @@ script_get_loaded_plugins_and_scripts ()
|
||||
}
|
||||
|
||||
/*
|
||||
* script_debug_dump_cb: callback for "debug_dump" signal
|
||||
* Callback for signal "debug_dump".
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -197,7 +197,7 @@ script_debug_dump_cb (void *data, const char *signal, const char *type_data,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_timer_refresh_cb: callback for timer used to refresh list of scripts
|
||||
* Callback for timer to refresh list of scripts.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -217,8 +217,7 @@ script_timer_refresh_cb (void *data, int remaining_calls)
|
||||
}
|
||||
|
||||
/*
|
||||
* script_signal_plugin_cb: callback for signals "plugin_loaded" and
|
||||
* "plugin_unloaded"
|
||||
* Callback for signals "plugin_loaded" and "plugin_unloaded".
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -246,8 +245,7 @@ script_signal_plugin_cb (void *data, const char *signal, const char *type_data,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_signal_script_cb: callback for signals "xxx_script_yyy"
|
||||
* (example: "python_script_loaded")
|
||||
* Callback for signals "xxx_script_yyy" (example: "python_script_loaded").
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -275,7 +273,7 @@ script_signal_script_cb (void *data, const char *signal, const char *type_data,
|
||||
}
|
||||
|
||||
/*
|
||||
* script_focus_chat_cb: callback called when a mouse action occurs in chat area
|
||||
* Callback called when a mouse action occurs in chat area.
|
||||
*/
|
||||
|
||||
struct t_hashtable *
|
||||
@@ -352,7 +350,7 @@ script_focus_chat_cb (void *data, struct t_hashtable *info)
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_plugin_init: initialize script plugin
|
||||
* Initializes script plugin.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -407,7 +405,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_plugin_end: end script plugin
|
||||
* Ends script plugin.
|
||||
*/
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user