From e7aef2a74556095c076f41ba1910ce8c83a09bda Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Mon, 3 Oct 2005 12:35:14 +0000 Subject: [PATCH 1/1] Remove OS/X warning re: get_string git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@843 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/humperdink/client.c | 2 +- src/humperdink/io.c | 2 +- src/humperdink/io.h | 2 +- src/humperdink/remote.c | 2 +- src/inigo/io.c | 13 ------------- 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/humperdink/client.c b/src/humperdink/client.c index b5ace3d..4f93f2c 100644 --- a/src/humperdink/client.c +++ b/src/humperdink/client.c @@ -423,7 +423,7 @@ valerie_error_code dv_demo_execute( dv_demo demo ) terminated = 1; printf( "Command> " ); - if ( chomp( get_string( command, 10240, "" ) ) != NULL ) + if ( chomp( io_get_string( command, 10240, "" ) ) != NULL ) { if ( strcmp( command, "" ) ) { diff --git a/src/humperdink/io.c b/src/humperdink/io.c index 90999cc..a9bcf41 100644 --- a/src/humperdink/io.c +++ b/src/humperdink/io.c @@ -72,7 +72,7 @@ char *strip_quotes( char *input ) return input; } -char *get_string( char *output, int maxlength, char *use ) +char *io_get_string( char *output, int maxlength, char *use ) { char *value = NULL; strcpy( output, use ); diff --git a/src/humperdink/io.h b/src/humperdink/io.h index 6c4b609..c5ad812 100644 --- a/src/humperdink/io.h +++ b/src/humperdink/io.h @@ -24,7 +24,7 @@ extern char *chomp( char * ); extern char *trim( char * ); extern char *strip_quotes( char * ); -extern char *get_string( char *, int, char * ); +extern char *io_get_string( char *, int, char * ); extern int *get_int( int *, int ); extern void term_init( ); extern int term_read( ); diff --git a/src/humperdink/remote.c b/src/humperdink/remote.c index 9306b21..cdcad06 100644 --- a/src/humperdink/remote.c +++ b/src/humperdink/remote.c @@ -42,7 +42,7 @@ static valerie_parser create_parser( ) printf( "Server [localhost]: " ); - if ( get_string( server, sizeof( server ), "localhost" ) != NULL ) + if ( io_get_string( server, sizeof( server ), "localhost" ) != NULL ) { printf( "Port [5250]: " ); diff --git a/src/inigo/io.c b/src/inigo/io.c index 271f771..06acc37 100644 --- a/src/inigo/io.c +++ b/src/inigo/io.c @@ -76,19 +76,6 @@ char *strip_quotes( char *input ) return input; } -char *get_string( char *output, int maxlength, char *use ) -{ - char *value = NULL; - strcpy( output, use ); - if ( trim( chomp( fgets( output, maxlength, stdin ) ) ) != NULL ) - { - if ( !strcmp( output, "" ) ) - strcpy( output, use ); - value = output; - } - return value; -} - int *get_int( int *output, int use ) { int *value = NULL; -- 1.7.4.4