Re: how to send parameters which are numeroc in system function
- From: Ayose <zubzet yahoo es>
- To: nilesh <nlpawar rediffmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: how to send parameters which are numeroc in system function
- Date: Sun, 10 Nov 2002 13:42:25 +0000
On Sun, Nov 10, 2002 at 12:32:42PM -0000, nilesh wrote:
i m writting an application in gtk 1.2. here, i want to
script using system function call but, this function takes only
character variables and i want to pass integer to this script and
the same script is also not accepting it, but instead if values
are given directly then that script get's executed. here i m
giving my function:
void ok_pressed(GtkWidget *window, gpointer *data)
{
gchar *ent1;
gchar *ent2;
ent1 = gtk_get_textentry(GTK_ENTRY(txt_ent));
ent1 = gtk_get_textentry(GTK_ENTRY(txt_ent));
system("./script ent2 ent1");
}
Try
{
gchar *ent1;
gchar *ent2;
gchat *called;
ent1 = gtk_get_textentry(GTK_ENTRY(txt_ent));
ent1 = gtk_get_textentry(GTK_ENTRY(txt_ent));
called = g_strdup_printf("./script %s %s", ent1, ent2);
system(called);
g_free(called);
}
--
Ayose Cazorla León
Debian GNU/Linux - setepo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]