~ubuntu-branches/ubuntu/edgy/curl/edgy

« back to all changes in this revision

Viewing changes to tests/server/testpart.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2005-07-26 19:03:01 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20050726190301-x2m2vmjgc8fwnic5
Tags: 7.14.0-2ubuntu1
Synchronize with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *                                  _   _ ____  _
 
3
 *  Project                     ___| | | |  _ \| |
 
4
 *                             / __| | | | |_) | |
 
5
 *                            | (__| |_| |  _ <| |___
 
6
 *                             \___|\___/|_| \_\_____|
 
7
 *
 
8
 * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
 
9
 *
 
10
 * This software is licensed as described in the file COPYING, which
 
11
 * you should have received as part of this distribution. The terms
 
12
 * are also available at http://curl.haxx.se/docs/copyright.html.
 
13
 *
 
14
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 
15
 * copies of the Software, and permit persons to whom the Software is
 
16
 * furnished to do so, under the terms of the COPYING file.
 
17
 *
 
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 
19
 * KIND, either express or implied.
 
20
 *
 
21
 * $Id: testpart.c,v 1.1 2005/04/18 06:57:44 bagder Exp $
 
22
 ***************************************************************************/
 
23
 
 
24
#include "setup.h"
 
25
 
 
26
#include <stdio.h>
 
27
#include <ctype.h>
 
28
#include <string.h>
 
29
#include <stdlib.h>
 
30
#include "getpart.h"
 
31
 
 
32
#define _MPRINTF_REPLACE /* use our functions only */
 
33
#include <curl/mprintf.h>
 
34
 
 
35
/* include memdebug.h last */
 
36
#include "memdebug.h"
 
37
 
 
38
int main(int argc, char **argv)
 
39
{
 
40
  if(argc< 3) {
 
41
    printf("./testpart main sub\n");
 
42
  }
 
43
  else {
 
44
    size_t size;
 
45
    unsigned int i;
 
46
    const char *buffer = spitout(stdin, argv[1], argv[2], &size);
 
47
    for(i=0; i< size; i++)
 
48
      printf("%c", buffer[i]);
 
49
  }
 
50
  return 0;
 
51
}
 
52