source: trunk/mindi/Mindi/DiskSize/DiskSize.xs @ 30

Last change on this file since 30 was 30, checked in by bcornec, 14 years ago

Id property added on files to allow for better conf. management

  • Property svn:keywords set to Id
File size: 574 bytes
Line 
1#include "EXTERN.h"
2#include "perl.h"
3#include "XSUB.h"
4
5#include "lib/DiskSize.h"
6
7static int
8not_here(char *s)
9{
10    croak("%s not implemented on this architecture", s);
11    return -1;
12}
13
14static double
15constant(char *name, int len, int arg)
16{
17    errno = EINVAL;
18    return 0;
19}
20
21MODULE = Mindi::DiskSize        PACKAGE = Mindi::DiskSize       
22
23
24double
25constant(sv,arg)
26    PREINIT:
27    STRLEN      len;
28    INPUT:
29    SV *        sv
30    char *      s = SvPV(sv, len);
31    int     arg
32    CODE:
33    RETVAL = constant(s,len,arg);
34    OUTPUT:
35    RETVAL
36
37long
38get_size_of_disk(disk)
39    const char *    disk
40    OUTPUT:
41    RETVAL
Note: See TracBrowser for help on using the repository browser.