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

Improve documentation two functions

Namely `cmd_process_input()` and `files_get_data_path()`.

Edited by @jubalh.
This commit is contained in:
John Hernandez 2023-07-05 18:40:18 +02:00
parent e1d137f4e6
commit 00bea804e2
2 changed files with 18 additions and 2 deletions

View File

@ -188,6 +188,13 @@ _string_matches_one_of(const char* what, const char* is, bool is_can_be_null, co
return ret;
}
/**
* @brief Processes a line of input and determines if profanity should continue.
*
* @param window
* @param inp The input string to process.
* @return Returns TRUE if profanity is to continue, FALSE otherwise.
*/
gboolean
cmd_process_input(ProfWin* window, char* inp)
{

View File

@ -155,11 +155,20 @@ files_get_config_path(const char* const config_base)
return result;
}
/**
* Get the full path by appending the given location to the project base path.
*
* @param location The location (directory or file) to append to the project base path.
* @return The full path obtained by appending the location to the project base path.
*
* @note The returned value must be freed using g_free when it is no longer needed
* to prevent memory leaks.
*/
gchar*
files_get_data_path(const char* const data_base)
files_get_data_path(const char* const location)
{
auto_gchar gchar* xdg_data = _files_get_xdg_data_home();
gchar* result = g_strdup_printf("%s/profanity/%s", xdg_data, date_base);
gchar* result = g_strdup_printf("%s/profanity/%s", xdg_data, location);
return result;
}