General advice on type casting
- From: Olivier <Olve@xxxxxxxxxx>
- Date: Thu, 31 Aug 2006 11:57:38 +0200
Dear all,
Here is a sample of my code:
----------------------------------------------
void message_is(gchar *ff, int d, gchar *o){
gchar *texte = NULL;
texte = g_malloc(256);
g_snprintf(texte, 256, ff, d, o);
Sol_print_infos(texte); /* g_free(texte) */;
}
void message_sd(gchar *ff, gchar *d, double o){
gchar *texte = NULL;
texte = g_malloc(256);
g_snprintf(texte, 256, ff, d, o);
Sol_print_infos(texte); /* g_free(texte) */;
}
void message_iii(gchar *ff, int d, int o, int t){
gchar *texte = NULL;
texte = g_malloc(256);
g_snprintf(texte, 256, ff, d, o ,t);
Sol_print_infos(texte); /* g_free(texte) */;
}
----------------------------------------------
where you can guess that Sol_print_infos is the
guy that does the actual printing with style
and all.
I haven't been able to put all of them in one
piece of code. (And I have more !!). Efficiency
in terms of time is faily irrelevant at this
level.
Thanks in advance !
Amities,
Olivier
.
- Follow-Ups:
- Re: General advice on type casting
- From: "Nils O. Selåsdal"
- Re: General advice on type casting
- Prev by Date: Re: Info
- Next by Date: Re: compiling service ?
- Previous by thread: Info
- Next by thread: Re: General advice on type casting
- Index(es):
Relevant Pages
|