Project

General

Profile

1
/*
2
This source file is part of Scol
3
For the latest info, see http://www.scolring.org
4

    
5
Copyright (c) 2010 Stephane Bisaro, aka Iri <iri@irizone.net>
6

    
7
This program is free software; you can redistribute it and/or modify it under
8
the terms of the GNU Lesser General Public License as published by the Free Software
9
Foundation; either version 2 of the License, or (at your option) any later
10
version.
11

    
12
This program is distributed in the hope that it will be useful, but WITHOUT
13
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15

    
16
You should have received a copy of the GNU Lesser General Public License along with
17
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
19
http://www.gnu.org/copyleft/lesser.txt
20

    
21
For others informations, please contact us from http://www.scolring.org/
22
*/
23

    
24

    
25
#ifndef __SCOL_GLIB_MISC_H__
26
#define __SCOL_GLIB_MISC_H__
27

    
28
#include <glib.h>
29

    
30

    
31
gboolean scol_glib_isabsolutepath (const gchar * p); /* return TRUE if a path is an absolute path */
32

    
33
/* The result of these functions should NOT be freed ! */
34
const gchar * scol_glib_name_scolexe (); /* return the name of the executable (must not be modified or freed) */
35
const gchar * scol_glib_get_env (const gchar *v); /* return the value of an environment variable */
36
const gchar * scol_glib_get_hostname (); /* return the host name  (must not be modified or freed) */
37
const gchar * scol_glib_get_username (); /* return the name of the current user */
38

    
39
/* The result of these functions should be freed when it is no longer needed ! */
40
gchar * scol_glib_filename_scol ();      /* return the absolute path of the current Scol. Use g_free */
41
gchar * scol_glib_dirname_scol ();       /* return the absolute path of the directory of Scol. Use g_free */
42
gchar * scol_glib_basename (const gchar *f); /* return the basename (the file) of any path. Use g_free */
43
char * scol_glib_get_sizefordisplay (int v);    /* return a comprehensive size string. Use g_free */
44

    
45
#endif  /* __SCOL_GLIB_MISC_H__ */
(5-5/8)