diff src/text/gftp-text.c @ 374:d207b8241e96

2003-1-21 Brian Masney <masneyb@gftp.org> * lib/config_file.c lib/gftp.h - set the character string arguments to const for the following functions: gftp_lookup_global_option(), gftp_lookup_request_option(), gftp_lookup_bookmark_option(), gftp_set_global_option(), gftp_set_request_option(), gftp_set_bookmark_option() * lib/misc.c lib/gftp.h - set the character string arguments to const for the function gftp_match_filespec() * src/gtk/gftp-gtk.c src/gtk/menu-items.c src/uicommon/gftpui.c - moved more UI independant parts to the uicommon directory. Moved some GUI specific functionality into gftp-gtk.c * src/text/gftp-text.c src/gtk/gftp-gtk.c src/uicommon/gftpui.c - pass the local/remote uidata/request structures to process_command(). Removed old function gftpui_common_init(). Added new gftpui_common_init() that sets up common functionality for a port. * src/gtk/gtkui.c src/gtk/gtkui_transfer.c - moved gftpui_add_file_to_transfer() to gtkui_transfer.c * src/gtk/gtkui_transfer.c - cleaned up these functions some and made them more modular * src/uicommon/gftpui.c src/uicommon/gftpui.h - for all of the command line functions, make the command argument a constant
author masneyb
date Wed, 21 Jan 2004 23:35:40 +0000
parents 7cb3327f96f7
children 14da115b149b
line wrap: on
line diff
--- a/src/text/gftp-text.c	Wed Jan 21 16:46:01 2004 +0000
+++ b/src/text/gftp-text.c	Wed Jan 21 23:35:40 2004 +0000
@@ -39,12 +39,6 @@
 
 
 void
-sig_child (int signo)
-{
-}
-
-
-void
 gftp_text_log (gftp_logging_level level, gftp_request * request, 
                const char *string, ...)
 {
@@ -191,15 +185,7 @@
   char tempstr[512];
 #endif
 
-  gftp_locale_init ();
-
-  signal (SIGCHLD, sig_child);
-  signal (SIGPIPE, SIG_IGN); 
-
-  gftp_read_config_file (SHARE_DIR);
-
-  if (gftp_parse_command_line (&argc, &argv) != 0)
-    exit (0);
+  gftpui_common_init (&argc, &argv, gftp_text_log);
 
   /* SSH doesn't support reading the password with askpass via the command 
      line */
@@ -248,14 +234,12 @@
     gftp_text_open (gftp_text_remreq, argv[1], NULL);
 */
 
-  gftpui_common_init (NULL, gftp_text_locreq,
-                      NULL, gftp_text_remreq);
-
 #if HAVE_LIBREADLINE
   g_snprintf (prompt, sizeof (prompt), "%sftp%s> ", GFTPUI_COMMON_COLOR_BLUE, GFTPUI_COMMON_COLOR_DEFAULT);
   while ((tempstr = readline (prompt)))
     {
-      if (gftpui_common_process_command (tempstr) == 0)
+      if (gftpui_common_process_command (NULL, gftp_text_locreq,
+                                         NULL, gftp_text_remreq, tempstr) == 0)
         break;
    
       add_history (tempstr);