/*
*
* File.xs contains XS code for exacct file manipulation.
*/
#include <pwd.h>
#include "../exacct_common.xh"
/* Pull in the file generated by extract_defines. */
#include "FileDefs.xi"
/*
* The XS code exported to perl is below here. Note that the XS preprocessor
* has its own commenting syntax, so all comments from this point on are in
* that form.
*/
#
#
BOOT:
{
init_stashes();
}
#
#
char *class;
char *name;
int oflags;
int i;
/* Assume usernames are <= 32 chars (pwck(1M) assumes <= 8) */
char user[33];
int aflags = -1;
CODE:
/*
* Account for the mandatory parameters,
* and the rest must be an even number.
*/
i = items - 3;
if ((i % 2) != 0) {
croak("Usage: Sun::Solaris::Exacct::File::new"
"(class, name, oflags, ...)");
}
/* Process any optional parameters. */
} else {
}
}
/* Check and default the creator parameter. */
} else {
}
}
/* Check and default the aflags parameter. */
if (aflags == -1) {
} else {
}
}
}
void
CODE:
#
#
SV*
const char *creator;
CODE:
RETVAL = &PL_sv_undef;
} else {
}
#
#
SV*
const char *hostname;
CODE:
RETVAL = &PL_sv_undef;
} else {
}
#
#
void
previous = 1
const char *type_str;
static const char *const type_map[] =
{ "EO_NONE", "EO_GROUP", "EO_ITEM" };
if (ix == 0) {
} else {
}
/* Work out the call context. */
switch (GIMME_V) {
case G_SCALAR:
/* In a scalar context, just return the type. */
PUSHs(&PL_sv_undef);
} else {
}
break;
case G_ARRAY:
/* In a list contect, return the type and catalog. */
PUSHs(&PL_sv_undef);
PUSHs(&PL_sv_undef);
} else {
}
break;
case G_VOID:
default:
/* In a void context, return nothing. */
break;
}
#
#
SV*
CODE:
} else {
RETVAL = &PL_sv_undef;
}
#
#
SV*
int i;
CODE:
for (i = 1; i < items; i++) {
/* Check the value is either an ::Item or a ::Group. */
if (stash != Sun_Solaris_Exacct_Object_Item_stash &&
}
/* Deflate and write the object. */
}
}