mirror of
https://github.com/curl/curl.git
synced 2026-06-18 01:55:43 +03:00
Added support for running on Symbian OS.
This commit is contained in:
parent
ad1dd08693
commit
1960eebc2d
25 changed files with 1158 additions and 16 deletions
|
|
@ -95,9 +95,18 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
|||
#define DONE
|
||||
#endif /* VMS */
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
/* Windows implementation */
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
#define getch() getchar()
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) || defined(__SYMBIAN32__)
|
||||
|
||||
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
||||
{
|
||||
size_t i;
|
||||
|
|
@ -105,7 +114,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
|||
|
||||
for(i=0; i<buflen; i++) {
|
||||
buffer[i] = getch();
|
||||
if ( buffer[i] == '\r' ) {
|
||||
if ( buffer[i] == '\r' || buffer[i] == '\n' ) {
|
||||
buffer[i] = 0;
|
||||
break;
|
||||
}
|
||||
|
|
@ -115,8 +124,10 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
|||
previous one as well */
|
||||
i = i - (i>=1?2:1);
|
||||
}
|
||||
#ifndef __SYMBIAN32__
|
||||
/* since echo is disabled, print a newline */
|
||||
fputs("\n", stderr);
|
||||
#endif
|
||||
/* if user didn't hit ENTER, terminate buffer */
|
||||
if (i==buflen)
|
||||
buffer[buflen-1]=0;
|
||||
|
|
@ -124,7 +135,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
|||
return buffer; /* we always return success */
|
||||
}
|
||||
#define DONE
|
||||
#endif /* WIN32 */
|
||||
#endif /* WIN32 || __SYMBIAN32__ */
|
||||
|
||||
#ifdef NETWARE
|
||||
/* NetWare implementation */
|
||||
|
|
|
|||
17
src/main.c
17
src/main.c
|
|
@ -124,6 +124,15 @@
|
|||
#include "memdebug.h"
|
||||
#endif
|
||||
|
||||
#if defined(NETWARE)
|
||||
#define PRINT_LINES_PAUSE 23
|
||||
#endif
|
||||
|
||||
#if defined(__SYMBIAN32__)
|
||||
#define PRINT_LINES_PAUSE 16
|
||||
#define pressanykey() getchar()
|
||||
#endif
|
||||
|
||||
#define DEFAULT_MAXREDIRS 50L
|
||||
|
||||
#if defined(O_BINARY) && defined(HAVE_SETMODE)
|
||||
|
|
@ -787,8 +796,8 @@ static void help(void)
|
|||
};
|
||||
for(i=0; helptext[i]; i++) {
|
||||
puts(helptext[i]);
|
||||
#ifdef NETWARE
|
||||
if (i && ((i % 23) == 0))
|
||||
#ifdef PRINT_LINES_PAUSE
|
||||
if (i && ((i % PRINT_LINES_PAUSE) == 0))
|
||||
pressanykey();
|
||||
#endif
|
||||
}
|
||||
|
|
@ -4988,6 +4997,10 @@ int main(int argc, char *argv[])
|
|||
checkfds();
|
||||
|
||||
res = operate(&config, argc, argv);
|
||||
#ifdef __SYMBIAN32__
|
||||
if (config.showerror)
|
||||
pressanykey();
|
||||
#endif
|
||||
free_config_fields(&config);
|
||||
|
||||
#ifdef __NOVELL_LIBC__
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
* Define WIN32 when build target is Win32 API
|
||||
*/
|
||||
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__)
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
|
|
@ -58,6 +58,10 @@
|
|||
#include "config-amigaos.h"
|
||||
#endif
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
#include "config-symbian.h"
|
||||
#endif
|
||||
|
||||
#ifdef TPF
|
||||
#include "config-tpf.h"
|
||||
/* change which select is used for the curl command line tool */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue