Fixing the eina_prefix example

Patch by: Guilherme Iscaro <iscaro@profusion.mobi>

SVN revision: 70279
This commit is contained in:
Guilherme Iscaro 2012-04-17 17:18:58 +00:00 committed by Jonas M. Gastal
parent ac06f667ec
commit 0e7939a89a
1 changed files with 13 additions and 6 deletions

View File

@ -106,11 +106,12 @@ typedef struct _Eina_Prefix Eina_Prefix;
* *
* Compile the following defining at compile time your prefixes like (example): * Compile the following defining at compile time your prefixes like (example):
* *
* gcc appname.c -o appname \ * gcc appname.c -o appname
* -DPACKAGE_BIN_DIR=/usr/local/bin \ * -DPACKAGE_BIN_DIR=\\"/usr/local/bin\"
* -DPACKAGE_LIB_DIR=/usr/local/lib \ * -DPACKAGE_LIB_DIR=\\"/usr/local/lib\"
* -DPACKAGE_DATA_DIR=/usr/local/share/appname \ * -DPACKAGE_DATA_DIR=\\"/usr/local/share/appname\"
* -DLOCALE_DIR=/usr/local/share/locale * -DLOCALE_DIR=\\"/usr/local/share/locale\"
* `pkg-config --cflags --libs eina`
* *
* (of course add appropriate compile flags to linking etc. etc. and note that * (of course add appropriate compile flags to linking etc. etc. and note that
* locale dir is optional. if you don't need it provide data dir as the * locale dir is optional. if you don't need it provide data dir as the
@ -120,10 +121,14 @@ typedef struct _Eina_Prefix Eina_Prefix;
* to using a unix-style relative path from that dir, eg directory/filename.png) * to using a unix-style relative path from that dir, eg directory/filename.png)
* *
* @code * @code
* #include <Eina.h>
*
* static Eina_Prefix *pfx = NULL; * static Eina_Prefix *pfx = NULL;
* *
* int main(argc, char **argv) * int main(int argc, char **argv)
* { * {
* eina_init();
*
* pfx = eina_prefix_new(argv[0], main, "APPNAME", "appname", NULL, * pfx = eina_prefix_new(argv[0], main, "APPNAME", "appname", NULL,
* PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, * PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
* PACKAGE_DATA_DIR, LOCALE_DIR); * PACKAGE_DATA_DIR, LOCALE_DIR);
@ -133,6 +138,8 @@ typedef struct _Eina_Prefix Eina_Prefix;
* printf("libraries are in: %s\n", eina_prefix_lib_get(pfx)); * printf("libraries are in: %s\n", eina_prefix_lib_get(pfx));
* printf("data files are in: %s\n", eina_prefix_data_get(pfx)); * printf("data files are in: %s\n", eina_prefix_data_get(pfx));
* eina_prefix_free(pfx); * eina_prefix_free(pfx);
*
* eina_shutdown();
* } * }
* @endcode * @endcode
* *