~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to erts/etc/ose/drivers/erl_stat_portdrv_ex.c

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-07 15:07:37 UTC
  • mfrom: (1.2.1 upstream) (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090507150737-i4yb5elwinm7r0hc
Tags: 1:13.b-dfsg1-1
* Removed another bunch of non-free RFCs from original tarball
  (closes: #527053).
* Fixed build-dependencies list by adding missing comma. This requires
  libsctp-dev again. Also, added libsctp1 dependency to erlang-base and
  erlang-base-hipe packages because the shared library is loaded via
  dlopen now and cannot be added using dh_slibdeps (closes: #526682).
* Weakened dependency of erlang-webtool on erlang-observer to recommends
  to avoid circular dependencies (closes: #526627).
* Added solaris-i386 to HiPE enabled architectures.
* Made script sources in /usr/lib/erlang/erts-*/bin directory executable,
  which is more convenient if a user wants to create a target Erlang system.
* Shortened extended description line for erlang-dev package to make it
  fit 80x25 terminals.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <stdio.h>
2
 
#include "ose.h"
3
 
#include "ose_erl_driver.h"
4
 
 
5
 
 
6
 
 
7
 
/* -------------------------------------------------------------------------
8
 
** Data types
9
 
**/
10
 
 
11
 
typedef struct _erl_drv_data EchoDrvData;
12
 
 
13
 
 
14
 
 
15
 
/* -------------------------------------------------------------------------
16
 
** Entry struct
17
 
**/
18
 
 
19
 
static EchoDrvData *echo_drv_start(ErlDrvPort port, char *command);
20
 
static void         echo_drv_stop(EchoDrvData *data_p);
21
 
static void         echo_drv_output(EchoDrvData *data_p, char *buf, int len);
22
 
static void         echo_drv_finish(void);
23
 
static int          echo_drv_control(EchoDrvData *data_p, unsigned int command,
24
 
                                     char *buf, int len,
25
 
                                     char **rbuf, int rlen);
26
 
 
27
 
static ErlDrvEntry echo_drv_entry = { 
28
 
    NULL, /* init */
29
 
    echo_drv_start,
30
 
    echo_drv_stop,
31
 
    echo_drv_output,
32
 
    NULL, /* ready_input */
33
 
    NULL, /* ready_output */
34
 
    "erl_stat_portdrv_ex",
35
 
    echo_drv_finish,
36
 
    NULL, /* handle */
37
 
    echo_drv_control,
38
 
    NULL, /* timeout */
39
 
    NULL, /* outputv */
40
 
    NULL  /* ready_async */
41
 
};
42
 
 
43
 
 
44
 
 
45
 
/* -------------------------------------------------------------------------
46
 
** Entry functions
47
 
**/
48
 
 
49
 
ERL_DRIVER_INIT(erl_stat_portdrv_ex)
50
 
{
51
 
  DRIVER_INTERFACE_INIT();
52
 
  return &echo_drv_entry;
53
 
}
54
 
 
55
 
static EchoDrvData *echo_drv_start(ErlDrvPort port, char *command) {
56
 
    void *void_ptr;
57
 
    
58
 
    return void_ptr = port;
59
 
}
60
 
 
61
 
static void echo_drv_stop(EchoDrvData *data_p) {
62
 
}
63
 
 
64
 
static void echo_drv_output(EchoDrvData *data_p, char *buf, int len) {
65
 
    void *void_ptr;
66
 
    ErlDrvPort port = void_ptr = data_p;
67
 
    
68
 
    driver_output(port, buf, len);
69
 
}
70
 
 
71
 
static void echo_drv_finish() {
72
 
}
73
 
 
74
 
static int echo_drv_control(EchoDrvData *data_p, unsigned int command,
75
 
                            char *buf, int len,
76
 
                            char **rbuf, int rlen) {
77
 
    return 0;
78
 
}