MtCmd
view release on metacpan or search on metacpan
else {
blok_reset (errP);
err_rtn = cmdout;
}
imsg_set_app_name("ClearCase::MtCmd");
imsg_redirect_output (out_rtn, outP, err_rtn, errP);
return
(
cmdsyn_execv_dispatch (
argc,
argv,
area,
a_cmdsyn_cmdflags,
a_cmdsyn_proc_table
) ==
T_OK
);
}
int status;
MODULE = ClearCase::MtCmd PACKAGE = ClearCase::MtCmd PREFIX=cmd_
PROTOTYPES: ENABLE
int
unsetview(...)
CODE:
int n_ok = 0;
if (items > 0) {
if(sv_isobject(ST(0)) && items == 1) {
/* OK */
}
else {
fprintf(stderr,"WARNING: View was not unset. Usage: unsetview()\n");
n_ok = 1;
}
};
if (n_ok) {
RETVAL = 1;
} else {
#ifndef ATRIA_WIN32_COMMON
RETVAL = view_set_current_view(NULL);
#else
fprintf(stderr,"ERROR: unsetview() not available in Win32\n");
RETVAL = 1;
#endif
}
OUTPUT:
RETVAL
int
cmdstat()
CODE:
RETVAL = status;
OUTPUT:
RETVAL
int
exec(...)
PPCODE:
int gimme = GIMME_V;
int debug = 0;
int is_object;
SV* sv;
HV* myhash;
SV** out_p;
SV** err_p;
BLOK out;
BLOK err;
BLOK * blok_out_p;
BLOK * blok_err_p;
gen_t area = stg_create_area ( 2048 );
#ifdef ATRIA_WIN32_COMMON
WORD VersionRequested;
WSADATA wsaData;
int myerr;
#endif
int StdOut = 1;
int StdErr = 1;
int i = 1;
int offset=1;
const char *pkg_p = (char *)SvPV(ST(0),PL_na);
int argc = items + 1;
char ** argv;
blok_init (&out);
blok_out_p = &out;
blok_init (&err);
blok_err_p = &err;
if(sv_isobject(ST(0))){
is_object=1;
myhash = (HV*)SvRV(ST(0));
out_p = hv_fetch(myhash, "debug", 5, 0);
if(out_p == NULL ){}
else{ debug = (int)SvIV(*out_p);}
argc--;
offset--;
if(debug){
printf("Object\t%s\n",pkg_p);
if (sv_derived_from(ST(0), "ClearCase::MtCmd")) {
printf("Derived from ClearCase::MtCmd\n");
}
}
}
if ( sv_isa(ST(0), "ClearCase::MtCmd") ||
sv_derived_from(ST(0), "ClearCase::MtCmd") ){
out_p = hv_fetch(myhash, "outfunc", 7, 0);
err_p = hv_fetch(myhash, "errfunc", 7, 0);
if(out_p == NULL ){}
else{
StdOut=(int)SvIV(*out_p);
if (StdOut == 0){
blok_out_p = STANDARD;
}else{
StdOut = 1;
}
}
if(err_p == NULL ){}
( run in 2.224 seconds using v1.01-cache-2.11-cpan-71847e10f99 )