Browse Source

* key_nt.c (define_sequence): Adjust for declaration.
* util_nt.c (close_error_pipe): Likewise.
(tilde_expand): Likewise.

Andrew V. Samoilov 23 years ago
parent
commit
64f48bbb34
3 changed files with 15 additions and 5 deletions
  1. 6 0
      pc/ChangeLog
  2. 1 1
      pc/key_nt.c
  3. 8 4
      pc/util_nt.c

+ 6 - 0
pc/ChangeLog

@@ -1,3 +1,9 @@
+2002-06-04  Andrew V. Samoilov  <kai@cmail.ru>
+
+	* key_nt.c (define_sequence): Adjust for declaration.
+	* util_nt.c (close_error_pipe): Likewise.
+	(tilde_expand): Likewise.
+
 2002-03-18  Pavel Roskin  <proski@gnu.org>
 
 	* Makefile.am: Remove regex.h and regex.c.

+ 1 - 1
pc/key_nt.c

@@ -307,7 +307,7 @@ int get_modifier()
 }
 
 /* void functions for UNIX compatibility */
-void define_sequence (int code, char* vkcode, int action) {}
+int define_sequence (int code, char* vkcode, int action) { return 1; }
 void channels_up() {}
 void channels_down() {}
 void init_key_input_fd (void) {}

+ 8 - 4
pc/util_nt.c

@@ -74,7 +74,10 @@ void open_error_pipe (void)
     close (error_pipe[1]);
 }
 
-void close_error_pipe (int error, char *text)
+/*
+ * Returns true if an error was displayed
+ */
+int close_error_pipe (int error, char *text)
 {
     char *title;
     char msg[MAX_PIPE_SIZE];
@@ -95,9 +98,9 @@ void close_error_pipe (int error, char *text)
 	close (error_pipe[0]);
     }
     if (error < 0)
-	return;		/* Just ignore error message */
+	return 0;		/* Just ignore error message */
     if (text == NULL){
-	if (len == 0) return;	/* Nothing to show */
+	if (len == 0) return 0;	/* Nothing to show */
 
 	/* Show message from pipe */
 	message (error, title, msg);
@@ -105,6 +108,7 @@ void close_error_pipe (int error, char *text)
 	/* Show given text and possible message from pipe */
 	message (error, title, " %s \n %s ", text, msg);
     }
+    return 1;
 }
 
 void check_error_pipe (void)
@@ -186,7 +190,7 @@ char* get_default_shell()
 	return "command.com";
 }
 
-char *tilde_expand (char *directory)
+char *tilde_expand (const char *directory)
 {
     return strdup (directory);
 }