Commit 0b51ec23 authored by Niels Möller's avatar Niels Möller
Browse files

(lsftp_unqoute): #if:ed out, this function

isn't used anywhere.
Constified, now	uses const char * for most strings.

Rev: src/sftp/str_utils.c:1.2
Rev: src/sftp/str_utils.h:1.2
parent 33fa5902
......@@ -67,7 +67,10 @@ char* lsftp_quote( const char* s )
return news;
}
char* lsftp_unqoute( char* s )
/* Not used anywhere */
#if 0
char *
lsftp_unqoute( char* s )
{
char* news = strdup( s );
int i = 0;
......@@ -132,8 +135,11 @@ char* lsftp_unqoute( char* s )
return news;
}
char* lsftp_s_strtok( char* s, char* sep, char* store, int storelen )
#endif
const char *
lsftp_s_strtok(const char* s, const char* sep,
char *store, int storelen )
{
/* TODO: should we do this different to support char-types with more than eight bits? */
......@@ -166,7 +172,8 @@ char* lsftp_s_strtok( char* s, char* sep, char* store, int storelen )
}
char* lsftp_s_skip( char* s, char* sep )
const char *
lsftp_s_skip(const char *s, const char *sep)
{
/* Return a pointer into s, skipping by any charaters in sep */
......@@ -200,9 +207,8 @@ char* lsftp_s_skip( char* s, char* sep )
return NULL; /* We didn't find any non separator */
}
char* lsftp_s_skipn( char* s, char* sep )
const char *
lsftp_s_skipn(const char *s, const char *sep )
{
/* Negated version of lsftp_s_skip,
* skip by s until we find a charater
......@@ -251,6 +257,7 @@ char* lsftp_s_skipn( char* s, char* sep )
break;
default:
;
}
else
{
......
......@@ -40,8 +40,10 @@ char* lsftp_quote( const char* s );
char* lsftp_unquote( const char* s );
/* Given a string and a set of tokens, place in store (is of size storelen) */
char* lsftp_s_strtok( char* s, char* tok, char* store, int storelen );
char* lsftp_s_skip( char* s, char* sep );
char* lsftp_s_skipn( char* s, char* sep );
const char *lsftp_s_strtok(const char *s, const char* tok,
char *store, int storelen);
const char *lsftp_s_skip(const char *s, const char *sep);
const char* lsftp_s_skipn(const char *s, const char *sep );
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment