diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-06-04 22:13:59 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-06-04 22:13:59 +0000 |
commit | b45f21075d51b6b20a1e2a7ae6ba14fae3935fad (patch) | |
tree | 458ea103fc6d8064de4af1b1e2d55d435e7106f7 /mixlib | |
parent | 601909353d10fe67c7fc84a9198348a6f4de00e2 (diff) | |
download | mdk-b45f21075d51b6b20a1e2a7ae6ba14fae3935fad.tar.gz mdk-b45f21075d51b6b20a1e2a7ae6ba14fae3935fad.tar.bz2 |
edit and compile commands added to gmixvm
Diffstat (limited to 'mixlib')
-rw-r--r-- | mixlib/mix_file.c | 10 | ||||
-rw-r--r-- | mixlib/mix_file.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/mixlib/mix_file.c b/mixlib/mix_file.c index ac623f6..816a380 100644 --- a/mixlib/mix_file.c +++ b/mixlib/mix_file.c @@ -133,6 +133,16 @@ mix_file_to_FILE(const mix_file_t *file) return io_get_FILE_(file); } +/* complete a name with an extension, if needed */ +gchar * +mix_file_complete_name (const gchar *name, const gchar *extension) +{ + if (!name) return NULL; + if (!extension || !needs_completion_ (name, extension)) + return g_strdup (name); + return add_completion_ (name, extension); +} + /* Get the base name and extension of file */ const gchar * mix_file_base_name(const mix_file_t *file) diff --git a/mixlib/mix_file.h b/mixlib/mix_file.h index a4bac12..bb9e7e3 100644 --- a/mixlib/mix_file.h +++ b/mixlib/mix_file.h @@ -49,6 +49,10 @@ mix_file_to_FILE(const mix_file_t *file); /* standard default extensions */ extern const gchar *MIX_SRC_DEFEXT, *MIX_LIST_DEFEXT, *MIX_CODE_DEFEXT; +/* complete a name with an extension, if needed */ +extern gchar * +mix_file_complete_name (const gchar *name, const gchar *extension); + /* Get the base name and extension of file */ extern const gchar * mix_file_base_name(const mix_file_t *file); |