mp3splt-gtk 0.9.3.1519
Loading...
Searching...
No Matches
utilities.c File Reference
#include "utilities.h"
Include dependency graph for utilities.c:

Go to the source code of this file.

Functions

void append_point_to_pat (splt_point *point, points_and_tags *pat)
 
void append_tags_to_pat (splt_tags *tags, points_and_tags *pat)
 
void build_path (GString *path, const gchar *dir, const gchar *filename)
 
gint directory_exists (const gchar *directory)
 
gboolean double_equals (gdouble double_to_compare, gdouble compared_value)
 
gint file_exists (const gchar *fname)
 
void free_points_and_tags (points_and_tags **pat)
 
points_and_tagsnew_points_and_tags ()
 
void print_processing_file (gchar *filename, ui_state *ui)
 
void remove_end_slash_n_r_from_filename (char *filename)
 
gchar * transform_to_utf8 (gchar *text, gint free_or_not, gint *must_be_freed)
 

Detailed Description


miscellaneous utilities

Miscellaneous utilities like the check if a string may contain a valid file- or directory name.

Definition in file utilities.c.

Function Documentation

◆ append_point_to_pat()

void append_point_to_pat ( splt_point * point,
points_and_tags * pat )

Definition at line 202 of file utilities.c.

◆ append_tags_to_pat()

void append_tags_to_pat ( splt_tags * tags,
points_and_tags * pat )

Definition at line 207 of file utilities.c.

◆ build_path()

void build_path ( GString * path,
const gchar * dir,
const gchar * filename )

Definition at line 156 of file utilities.c.

◆ directory_exists()

gint directory_exists ( const gchar * directory)

check if specified directory exists

Definition at line 44 of file utilities.c.

◆ double_equals()

gboolean double_equals ( gdouble double_to_compare,
gdouble compared_value )

Definition at line 176 of file utilities.c.

◆ file_exists()

gint file_exists ( const gchar * fname)

check if specified file exists

Definition at line 62 of file utilities.c.

Referenced by add_playlist_file(), and disconnect_button_event().

Here is the caller graph for this function:

◆ free_points_and_tags()

void free_points_and_tags ( points_and_tags ** pat)

Definition at line 191 of file utilities.c.

◆ new_points_and_tags()

points_and_tags * new_points_and_tags ( )

Definition at line 183 of file utilities.c.

◆ print_processing_file()

void print_processing_file ( gchar * filename,
ui_state * ui )

Issues the message "Processing file <filename>" into the message bar.

Parameters
filenameThe filename that has to be printed.

Definition at line 82 of file utilities.c.

◆ remove_end_slash_n_r_from_filename()

void remove_end_slash_n_r_from_filename ( char * filename)

Removes trailing \r or \n characters from a filename.

Definition at line 97 of file utilities.c.

◆ transform_to_utf8()

gchar * transform_to_utf8 ( gchar * text,
gint free_or_not,
gint * must_be_freed )

transform text to utf8

Parameters
textThe text thet has to be converted
free_or_notTRUE if this function has to g_free() the text if during conversion it has to copy the text to a new (e.G. larger) buffer.
must_be_freedreads true, if this function has allocated a new chunk of memory to have somewhere to put the output string in - which means that the memory the output string is in has to be freed after usage.
Returns

Definition at line 131 of file utilities.c.

Referenced by update_splitpoints_from_mp3splt_state().

Here is the caller graph for this function: