~ubuntu-branches/ubuntu/natty/curl/natty-proposed

« back to all changes in this revision

Viewing changes to tests/libtest/first.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-05-24 21:12:19 UTC
  • mfrom: (1.1.12 upstream)
  • mto: (3.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: james.westby@ubuntu.com-20090524211219-7jgcwuhl04ixuqsm
Tags: upstream-7.19.5
ImportĀ upstreamĀ versionĀ 7.19.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * $Id: first.c,v 1.17 2007-10-02 16:05:28 yangtse Exp $
 
8
 * $Id: first.c,v 1.20 2009-01-21 04:30:05 danf Exp $
9
9
 */
10
10
 
11
11
#include "test.h"
12
12
 
 
13
#ifdef HAVE_LOCALE_H
 
14
#include <locale.h> /* for setlocale() */
 
15
#endif
 
16
 
13
17
#ifdef CURLDEBUG
14
 
/* provide a proto for this debug function */
15
 
extern void curl_memdebug(const char *);
16
 
extern void curl_memlimit(int);
 
18
#  define MEMDEBUG_NODEFINES
 
19
#  include "memdebug.h"
17
20
#endif
18
21
 
19
 
/* test is provided in the test code file */
20
 
int test(char *url);
21
 
 
22
22
int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
23
23
                 struct timeval *tv)
24
24
{
64
64
    curl_free(env);
65
65
  }
66
66
#endif
 
67
 
 
68
  /*
 
69
   * Setup proper locale from environment. This is needed to enable locale-
 
70
   * specific behaviour by the C library in order to test for undesired side
 
71
   * effects that could cause in libcurl.
 
72
   */
 
73
#ifdef HAVE_SETLOCALE
 
74
  setlocale(LC_ALL, "");
 
75
#endif
 
76
 
67
77
  if(argc< 2 ) {
68
78
    fprintf(stderr, "Pass URL as argument please\n");
69
79
    return 1;