~ubuntu-branches/debian/sid/c2hs/sid

« back to all changes in this revision

Viewing changes to c2hs/examples/libghttpHS/ghttpHS.c

  • Committer: Bazaar Package Importer
  • Author(s): Ian Lynagh (wibble)
  • Date: 2003-11-18 21:24:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20031118212411-dp4vz3f1stpkxmk2
Tags: 0.12.0-1
* NMU (with maintainer's permission).
* New upstream version. Closes: #202458.
* Tarball is repacked to avoid problems with some files being in the
  tarball twice. Closes: #182548.
* Removed "Recommends: ghc | ghc5" (seems redundant as ghc5 is being
  depended on and no other GHC is useful).
* Force dependency to be on ghc5 rather than any other ghc (doesn't
  get ghc6 dependencies right currently).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Auxiliary C code for Ghttp.
2
 
 *
3
 
 * Copyright (c) 1999 Manuel M. T. Chakravarty
4
 
 *
5
 
 * This is required due to the inability of GHC's FFI to pass structures from C
6
 
 * to Haskell.
7
 
 */
8
 
 
9
 
#include "ghttpHS.h"
10
 
 
11
 
ghttp_current_status *ghttpHS_get_status (ghttp_request *a_request)
12
 
{
13
 
  ghttp_current_status *status;
14
 
 
15
 
  status = (ghttp_current_status *) malloc (sizeof (ghttp_current_status));
16
 
  if (!status) {
17
 
    printf ("Ghttp: ghttpHS_get_status: Out of memory!");
18
 
    exit (1);
19
 
  }
20
 
  *status = ghttp_get_status (a_request);
21
 
  return status;
22
 
}