view release on metacpan or search on metacpan
lib/AC/Daemon.pm view on Meta::CPAN
sub debugmsg {
my $msg = shift;
syslog( 'debug', '%s', $msg ) if $syslog;
_to_stderr( $msg ) if $verbose;
}
sub verbose {
my $msg = shift;
syslog( 'info', '%s', $msg ) if $syslog;
_to_stderr( $msg ) if $verbose;
}
sub problem {
my $msg = shift;
daemon_error( $msg ) unless $nomail;
syslog( 'err', '%s', $msg ) if $syslog;
_to_stderr( $msg );
}
sub fatal {
my $msg = shift;
daemon_error( $msg ) unless $nomail;
syslog( 'err', '%s', $msg ) if $syslog;
_to_stderr( $msg );
exit -1;
}
sub _to_stderr {
my $msg = shift;
my $tx = Time::HiRes::time();
my $f = $tx - int($tx);
$f = sprintf('%.6f', $f);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AC/MrGamoo/Client.pm view on Meta::CPAN
recv $fd, $buf, 65535, 0;
my $proto = AC::MrGamoo::Protocol->decode_header($buf);
my $data = substr($buf, AC::MrGamoo::Protocol->header_size());
my $req = AC::MrGamoo::Protocol->decode_request($proto, $data);
last if $req->{type} eq 'finish';
print STDERR "$req->{msg}" if $req->{type} eq 'stderr';
print "$req->{msg}" if $req->{type} eq 'stdout';
$me->{fdebug}->("$req->{server_id}\t$req->{msg}") if $req->{type} eq 'debug';
}
}
lib/AC/MrGamoo/Client.pm view on Meta::CPAN
my $me = shift;
my $seed = shift; # [ "ipaddr:port", ... ]
my $mr = $me->{program};
my $r = AC::MrGamoo::Submit::Request->new( $mr );
$r->{eu_print_stderr} = sub { print STDERR "@_\n" };
$r->{eu_print_stdout} = sub { print STDERR "@_\n" };
# run init section
my $h_init = $mr->get_code( 'init' );
my $initres = ($h_init ? $h_init->{code}() : undef) || {};
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
my @warnings;
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { require blib; blib->VERSION('1.01') };
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
my @warnings;
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
my @warnings;
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
view all matches for this distribution
view release on metacpan or search on metacpan
PerlIO_save_errno|||
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
whichsig_sv||5.015004|
whichsig|||
win32_croak_not_implemented|||n
with_queued_errors|||
wrap_op_checker||5.015008|
write_to_stderr|||
xs_boot_epilog|||
xs_handshake|||vn
xs_version_bootcheck|||
yyerror_pvn|||
yyerror_pv|||
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AFS/Command/BOS.pm view on Meta::CPAN
my $directory = $args{dir} || '/usr/afs/bin';
return unless $self->_parse_arguments(%args);
return unless $self->_save_stderr();
my $errors = 0;
$errors++ unless $self->_exec_cmds();
lib/AFS/Command/BOS.pm view on Meta::CPAN
$result->_addFile($file);
}
$errors++ unless $self->_reap_cmds();
$errors++ unless $self->_restore_stderr();
return if $errors;
return $result;
}
lib/AFS/Command/BOS.pm view on Meta::CPAN
};
}
return unless $self->_parse_arguments(%args);
return unless $self->_save_stderr();
my $errors = 0;
$errors++ unless $self->_exec_cmds();
lib/AFS/Command/BOS.pm view on Meta::CPAN
} else {
$result->_setAttribute( log => $log );
}
$errors++ unless $self->_reap_cmds();
$errors++ unless $self->_restore_stderr();
return if $errors;
return $result;
}
lib/AFS/Command/BOS.pm view on Meta::CPAN
$self->{operation} = "getrestart";
return unless $self->_parse_arguments(%args);
return unless $self->_save_stderr();
my $errors = 0;
$errors++ unless $self->_exec_cmds();
lib/AFS/Command/BOS.pm view on Meta::CPAN
}
}
$errors++ unless $self->_reap_cmds();
$errors++ unless $self->_restore_stderr();
return if $errors;
return $result;
}
lib/AFS/Command/BOS.pm view on Meta::CPAN
$self->{operation} = "listhosts";
return unless $self->_parse_arguments(%args);
return unless $self->_save_stderr();
my $errors = 0;
$errors++ unless $self->_exec_cmds();
lib/AFS/Command/BOS.pm view on Meta::CPAN
}
$result->_setAttribute( hosts => \@hosts );
$errors++ unless $self->_reap_cmds();
$errors++ unless $self->_restore_stderr();
return if $errors;
return $result;
}
lib/AFS/Command/BOS.pm view on Meta::CPAN
$self->{operation} = "listkeys";
return unless $self->_parse_arguments(%args);
return unless $self->_save_stderr();
my $errors = 0;
$errors++ unless $self->_exec_cmds();
lib/AFS/Command/BOS.pm view on Meta::CPAN
}
}
$errors++ unless $self->_reap_cmds();
$errors++ unless $self->_restore_stderr();
return if $errors;
return $result;
}
lib/AFS/Command/BOS.pm view on Meta::CPAN
$self->{operation} = "listusers";
return unless $self->_parse_arguments(%args);
return unless $self->_save_stderr();
my $errors = 0;
$errors++ unless $self->_exec_cmds();
lib/AFS/Command/BOS.pm view on Meta::CPAN
}
}
$errors++ unless $self->_reap_cmds();
$errors++ unless $self->_restore_stderr();
return if $errors;
return $result;
}
lib/AFS/Command/BOS.pm view on Meta::CPAN
# $self->{operation} = "salvage";
# return unless $self->_parse_arguments(%args);
# return unless $self->_save_stderr();
# my $errors = 0;
# $errors++ unless $self->_exec_cmds();
lib/AFS/Command/BOS.pm view on Meta::CPAN
# }
# $errors++ unless $self->_reap_cmds();
# $errors++ unless $self->_restore_stderr();
# return if $errors;
# return $result;
# }
lib/AFS/Command/BOS.pm view on Meta::CPAN
$self->{operation} = "status";
return unless $self->_parse_arguments(%args);
return unless $self->_save_stderr();
my $errors = 0;
$errors++ unless $self->_exec_cmds();
lib/AFS/Command/BOS.pm view on Meta::CPAN
if ( defined $instance ) {
$result->_addInstance($instance);
}
$errors++ unless $self->_reap_cmds();
$errors++ unless $self->_restore_stderr();
return if $errors;
return $result;
}
view all matches for this distribution
view release on metacpan or search on metacpan
static int32 raise_exception = 0;
void safe_hv_store (HV* ahv,char * key ,int i ,SV * asv,int j) {
if (! hv_store(ahv, key, i, asv, j)) {
fprintf(stderr,"Panic ... internal error. hv_store failed.\n");
exit(1);
}
return;
}
strcpy(sname.cell, info.name);
sname.instance[0] = 0;
strcpy(sname.name, "afs");
code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
if (code) { /* did not get ticket */
fprintf(stderr,
"%s: Could not get afs tokens, running unauthenticated.\n",
funcName);
scIndex = 0;
} else { /* got a ticket */
scIndex = 2;
if ((ttoken.kvno < 0) || (ttoken.kvno > 256)) {
fprintf(stderr,
"%s: funny kvno (%d) in ticket, proceeding\n",
funcName, ttoken.kvno);
}
}
}
if (!noauth) { /* not -noauth */
if (localauth) { /* -localauth */
*code = afsconf_GetLatestKey(cdir, 0, 0);
if (*code)
fprintf(stderr, "AFS::BOS %d (getting key from local KeyFile)", *code);
else {
if (aencrypt)
*code = afsconf_ClientAuthSecure(cdir, &sc[2], &scIndex);
else
*code = afsconf_ClientAuth(cdir, &sc[2], &scIndex);
if (*code)
fprintf(stderr, "AFS::BOS %d (calling ClientAuth)", *code);
else if (scIndex != 2) /* this shouldn't happen */
sc[scIndex] = sc[2];
}
}
else { /* not -localauth, check for tickets */
*code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
if (*code == 0) {
/* have tickets, will travel */
if (ttoken.kvno >= 0 && ttoken.kvno <= 256);
else {
fprintf(stderr,
"AFS::BOS: funny kvno (%d) in ticket, proceeding\n",
ttoken.kvno);
}
/* kerberos tix */
if (aencrypt)
(encryptLevel, &ttoken.sessionKey,
ttoken.kvno, ttoken.ticketLen, ttoken.ticket);
scIndex = 2;
}
else
fprintf(stderr, "AFS::BOS %d (getting tickets)", *code);
}
if ((scIndex == 0) || (sc[scIndex] == 0)) {
fprintf(stderr, "AFS::BOS: running unauthenticated\n");
scIndex = 0;
}
}
tconn = rx_NewConnection(addr, htons(AFSCONF_NANNYPORT), 1, sc[scIndex], scIndex);
if (!tconn) {
for (i = 0;; i++) {
tp = buffer;
code = BOZO_GetInstanceParm(aconn, aname, i, &tp);
if (code)
break;
/* fprintf(stderr, " Command %d is '%s'\n", i+1, buffer); */
av_push(av, newSVpv(buffer, strlen(buffer)));
}
safe_hv_store(stats, "command", 7, newRV_inc((SV *) (av)), 0);
tp = buffer;
#endif /* AFS_PTHREAD_ENV*/
tp = tbuffer;
code = BOZO_GetInstanceInfo(aconn, "salvage-tmp", &tp, &istatus);
if (code)
break;
/* fprintf(stderr, "AFS::BOS: waiting for salvage to complete.\n"); */
}
if (code != BZNOENT) {
char buffer[256];
sprintf(buffer, "AFS::BOS: salvage failed (%s)\n", em(code));
BSETCODE(code, buffer);
goto done;
}
code = 0;
/* now print the log file to the output file */
/* fprintf(stderr, "AFS::BOS: salvage completed\n"); */
if (aoutName || showlog) {
fprintf(outFile, "SalvageLog:\n");
tcall = rx_NewCall(aconn);
/* MUST pass canonical (wire-format) salvager log path to bosserver */
code = StartBOZO_GetLog(tcall, AFSDIR_CANONICAL_SERVER_SLVGLOG_FILEPATH);
}
else if ((!ireadonly && Lp_GetRwIndex(&entry) == -1) /* RW volume does not exist - do a full */
||(ireadonly && !Lp_ROMatch(0, 0, &entry))) { /* RO volume does not exist - do a full */
restoreflags = RV_FULLRST;
if ((aoverwrite == AFS_INC) || (aoverwrite == AFS_ABORT))
fprintf(stderr, "%s Volume does not exist; Will perform a full restore\n",
ireadonly ? "RO" : "RW");
if (avolid == 0) {
avolid = entry.volumeId[voltype];
}
char buffer[256];
sprintf(buffer,
"The volume %s %u already exists on a different server/part\n",
volname, entry.volumeId[voltype]);
VSETCODE(-1, buffer);
fprintf(stderr, "Do you want to do a full restore or abort? [fa](a): ");
}
else {
char buffer[256];
sprintf(buffer, "The volume %s %u already exists in the VLDB\n",
volname, entry.volumeId[voltype]);
VSETCODE(-1, buffer);
fprintf(stderr,
"Do you want to do a full/incremental restore or abort? [fia](a): ");
}
dc = c = getchar();
while (!(dc == EOF || dc == '\n'))
dc = getchar(); /* goto end of line */
RETVAL = 0;
goto done;
}
else if (aoverwrite == AFS_FULL) {
restoreflags = RV_FULLRST;
fprintf(stderr, "Volume exists; Will delete and perform full restore\n");
}
else if (aoverwrite == AFS_INC) {
restoreflags = 0;
if (vol_elsewhere) {
char buffer[256];
}
code = VLDB_GetEntryByID(volid, -1, &entry);
if (!code) {
if (volid == entry.volumeId[RWVOL])
backupid = entry.volumeId[BACKVOL];
#fprintf(stderr,
# "Warning: Entry for volume number %u exists in VLDB (but we're zapping it anyway!)\n",
# volid);
}
if (zapbackupid) {
volintInfo *pntr = (volintInfo *) 0;
/* printf("vos-backupsys DEBUG-19\n"); */
if (aserver) {
same = VLDB_IsSameAddrs(aserver, aserver1, &error);
if (error) {
av_push(av2, newSVpv(vllist->name, strlen(vllist->name)));
fprintf(stderr,
"Failed to get info about server's %d address(es) from vlserver (err=%d); aborting call!\n",
aserver, error);
totalFail++;
continue;
}
sprintf(index, "%d", kvno);
safe_hv_store(list, index, strlen(index), newRV_inc((SV *) (key)), 0);
} /* for loop */
if (everWorked) {
/* fprintf(stderr, "Keys last changed on %d.\n", keyInfo.mod_sec); */
EXTEND(sp, 2);
PUSHs(sv_2mortal(newSViv(keyInfo.mod_sec)));
PUSHs(newRV_inc((SV *) (list)));
}
if (code != BZDOM) {
if (all) {
/* salvage whole enchilada */
curGoal = GetServerGoal(self, "fs");
if (curGoal == BSTAT_NORMAL) {
fprintf(stderr, "AFS::BOS: shutting down fs.\n");
code = BOZO_SetTStatus(self, "fs", BSTAT_SHUTDOWN);
if (code) {
char buffer[256];
sprintf(buffer, "AFS::BOS: failed to stop 'fs' (%s)\n", em(code));
BSETCODE(code, buffer);
"AFS::BOS: failed to wait for file server shutdown, continuing.\n");
BSETCODE(code, buffer);
}
}
/* now do the salvage operation */
/* fprintf(stderr, "Starting salvage of everything.\n"); */
rc = DoSalvage(self, (char *) 0, (char *) 0, outName, showlog, parallel, tmpDir,
orphans);
if (curGoal == BSTAT_NORMAL) {
/* fprintf(stderr, "AFS::BOS: restarting fs.\n"); */
code = BOZO_SetTStatus(self, "fs", BSTAT_NORMAL);
if (code) {
char buffer[256];
sprintf(buffer, "AFS::BOS: failed to restart 'fs' (%s)\n", em(code));
BSETCODE(code, buffer);
goto done;
}
curGoal = GetServerGoal(self, "fs");
/* salvage a whole partition (specified by parms[1]) */
if (curGoal == BSTAT_NORMAL) {
/* fprintf(stderr, "AFS::BOS: shutting down fs.\n"); */
code = BOZO_SetTStatus(self, "fs", BSTAT_SHUTDOWN);
if (code) {
char buffer[256];
sprintf(buffer, "AFS::BOS: can't stop 'fs' (%s)\n", em(code));
BSETCODE(code, buffer);
"AFS::BOS: failed to wait for file server shutdown, continuing.\n");
BSETCODE(code, buffer);
}
}
/* now do the salvage operation */
/* fprintf(stderr, "Starting salvage of partition %s.\n", partition); */
rc = DoSalvage(self, partition, (char *) 0,
outName, showlog, parallel, tmpDir, orphans);
if (curGoal == BSTAT_NORMAL) {
/* fprintf(stderr, "AFS::BOS: restarting fs.\n"); */
code = BOZO_SetTStatus(self, "fs", BSTAT_NORMAL);
if (code) {
char buffer[256];
sprintf(buffer, "AFS::BOS: failed to restart 'fs' (%s)\n", em(code));
BSETCODE(code, buffer);
char buffer[256];
sprintf(buffer, "AFS::BOS: can't interpret %s as partition ID.\n", partition);
BSETCODE(-1, buffer);
goto done;
}
/* fprintf(stderr, "Starting salvage of volume %d on partition %s.\n",
newID, partition); */
rc = DoSalvage(self, partition, tname, outName, showlog, parallel, tmpDir, orphans);
if (rc) {
code = rc;
goto done;
view all matches for this distribution
view release on metacpan or search on metacpan
PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
warner|5.006000|5.004000|pv
warn|||v
watch|||
whichsig|||
write_no_mem|||
write_to_stderr|||
xmldump_all|||
xmldump_attr|||
xmldump_eval|||
xmldump_form|||
xmldump_indent|||v
view all matches for this distribution
view release on metacpan or search on metacpan
Matrix *mini_batch(Matrix *m, int start, int size, int axis){
Matrix *r;
int end;
if(start < 0){
fprintf(stderr, "start index need to be bigger or equal index 0\n");
exit(1);
}
end = start + size - 1;
if(axis == 0) // every training example is a column
{
if(end >= m->columns){
fprintf(stderr, "Out of index of columns\n");
exit(1);
}
r = slice(m, -1, -1, start, end);
}
else if(axis == 1){
if(end >= m->rows){
fprintf(stderr, "Out of index of rows\n");
exit(1);
}
r = slice(m, start, end, -1, -1);
}
else{
fprintf(stderr, "Invalid axis\n");
exit(1);
}
return r;
}
rows = m->rows;
cols = m->columns;
size = rows * cols;
NEW_MATRIX(REAL, yatt, rows, cols);
for( i = 0; i < size; i++ ){
//fprintf(stderr, "%f\n", m->values[i]);
if(m->values[i] >= threshold){
yatt->values[i] = 1;
}
else{
yatt->values[i] = 0;
}
//fprintf(stderr, "%f -> %f\n", m->values[i], yatt->values[i]);
}
return yatt;
}
view all matches for this distribution
view release on metacpan or search on metacpan
PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
warner_nocontext|||vn
warner||5.006000|v
warn|||v
watch|||
whichsig|||
write_to_stderr|||
yyerror|||
yylex|||
yyparse|||
yywarn|||
);
view all matches for this distribution
view release on metacpan or search on metacpan
libmegahal.c view on Meta::CPAN
None.
*/
void megahal_initialize(void)
{
errorfp = stderr;
statusfp = stdout;
// initialize_error(errorfilename);
// initialize_status(statusfilename);
ignore(0);
libmegahal.c view on Meta::CPAN
*
* Purpose: Close the current error file pointer, and open a new one.
*/
bool initialize_error(char *filename)
{
if(errorfp!=stderr) fclose(errorfp);
if(filename==NULL) return(TRUE);
errorfp = fopen(filename, "a");
if(errorfp==NULL) {
errorfp=stderr;
return(FALSE);
}
return(print_header(errorfp));
}
libmegahal.c view on Meta::CPAN
vfprintf(errorfp, fmt, argp);
va_end(argp);
fprintf(errorfp, ".\n");
fflush(errorfp);
// fprintf(stderr, "MegaHAL died for some reason; check the error log.\n");
exit(1);
}
/*---------------------------------------------------------------------------*/
libmegahal.c view on Meta::CPAN
vfprintf(errorfp, fmt, argp);
va_end(argp);
fprintf(errorfp, ".\n");
fflush(errorfp);
// fprintf(stderr, "MegaHAL emitted a warning; check the error log.\n");
return(TRUE);
}
/*---------------------------------------------------------------------------*/
libmegahal.c view on Meta::CPAN
* Nothing has changed since the last time this function was called,
* so do nothing, unless it's the first time!
*/
if(done*100/total==last) {
if((done==0)&&(first==FALSE)) {
// fprintf(stderr, "%s: %3d%%", message, done*100/total);
first=TRUE;
}
return(TRUE);
}
/*
* Erase what we printed last time, and print the new percentage.
*/
last=done*100/total;
//if(done>0) fprintf(stderr, "%c%c%c%c", 8, 8, 8, 8);
//fprintf(stderr, "%3d%%", done*100/total);
/*
* We have hit 100%, so reset static variables and print a newline.
*/
if(last==100) {
first=FALSE;
last=0;
//fprintf(stderr, "\n");
}
return(TRUE);
}
view all matches for this distribution
view release on metacpan or search on metacpan
xt/99-compile.t view on Meta::CPAN
my $last_version = undef;
sub check {
#return if (! m{(\.pm|\.pl) \z}xmsi);
my ($stdout, $stderr, $exit) = capture(sub {
system( $^X, '-Mblib', '-c', $_ );
});
s!\s*\z!!
for ($stdout, $stderr);
if( $exit ) {
diag $stderr;
diag "Exit code: ", $exit;
fail($_);
} elsif( $stderr ne "$_ syntax OK") {
diag $stderr;
fail($_);
} else {
pass($_);
};
}
view all matches for this distribution
view release on metacpan or search on metacpan
void dumpBDD_info(int bdd)
{
BddNode *node;
node = &bddnodes[bdd];
fprintf (stderr,
"BDD %d: RefCount %d, Level %-3d, IF %-3d, ELSE %-3d, HASH %d\n",
bdd, node->refcou, node->level, node->high, node->low, node->hash);
fflush(stderr);
}
long createPair(int *old, int *new_, int size) {
bddPair *pair = bdd_newpair ();
int checkBuddy() {
int i;
if (!checkBDD (0))
{
fprintf (stderr, "bdd FALSE failed sanity check\n");
dumpBDD_info (0);
return 0;
}
if (!checkBDD (1))
{
fprintf (stderr, "bdd TRUE failed sanity check\n");
dumpBDD_info (1);
return 0;
}
for (i = bddvarnum; i < bddvarnum; i++)
return 0;
}
if (bddnodes[bdd].refcou == 0)
{
fprintf (stderr, "ERROR: refcount is zero\n");
return 0;
}
// refcount for TRUE and FALSE is saturated by default, ignore them!
if (bdd > 2 && bddnodes[bdd].refcou == MAXREF)
{
fprintf (stderr, "ERROR: refcount is saturated\n");
return 0;
}
return 1;
}
if (node_count < MIN_NODES)
node_count = MIN_NODES;
else if (node_count > MAX_NODES)
{
fprintf (stderr,
"[JBDD:init()] Number of nodes should be between %d and %d nodes\n",
MIN_NODES, MAX_NODES);
exit (20);
}
cachesize = nodenum / 8; // WAS: 10
if (has_bdd)
{
fprintf (stderr,
"A BDD package exist while you are trying to create another one\n"
"The BDD package is SINGLETON!\n");
exit (20);
}
has_bdd = 1;
if (bdd_false () != 0 || bdd_true () != 1)
{
fprintf (stderr, " INTERNAL ERROR : false = %d, true = %d\n",
bdd_false (), bdd_true ());
exit (20);
}
}
else
{
fprintf (stderr, "bdd_init(%ld,%ld) Failed\n (error code %d)\n",
nodenum, cachesize, ok);
exit (20);
}
}
{
bdd_done ();
has_bdd = 0;
}
else
fprintf (stderr, "Killing already dead BDD class :(\n");
}
int getOne()
CODE:
{
BDD ret;
if (varcount >= varnum)
{
fprintf (stderr, "Maximum var count (%d) reached!!\n", varnum);
exit (20);
}
ret = bdd_ithvar (varcount++);
// bddnodes[ret].refcou = 1; // why does BuDDy sets the initial
int index
CODE:
{
if (index < 0 || index >= varcount)
{
fprintf (stderr, "[JBUDDY.getBDD] requested bad BDD: %d\n", index);
RETVAL=bdd_false();
}
RETVAL=bdd_ithvar (index);
}
OUTPUT:
// See init for a explaination about 2 + varnum...
div = pow (2, 2 + varnum);
sat = bdd_satcount (bdd);
// fprintf(stderr, "sat = %lf, div = %lf or 2^%ld\n", sat, div, ( 2 +
// varnum));
sat /= div;
RETVAL=sat;
view all matches for this distribution
view release on metacpan or search on metacpan
Rectangle.xs view on Meta::CPAN
goto last_op;
}
weigth+= path_weigths[ *position - '0' ];
++position;
}
// fprintf( stderr, "ok");
gimme = GIMME_V;
if (gimme == G_ARRAY){
int x,y;
int norm;
norm = offset ;
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
my @warnings;
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
t/00-compile.t view on Meta::CPAN
@switches = (@switches, split(' ', $1)) if $1;
close $fh and skip("$file uses -T; not testable with PERL5LIB", 1)
if grep { $_ eq '-T' } @switches and $ENV{PERL5LIB};
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AI/TensorFlow/Libtensorflow/Manual/Notebook/InferenceUsingTFHubCenterNetObjDetect.pod view on Meta::CPAN
use File::Which ();
use List::Util 1.56 qw(mesh);
use Data::Printer ( output => 'stderr', return_value => 'void', filters => ['PDL'] );
use Data::Printer::Filter::PDL ();
use Text::Table::Tiny qw(generate_table);
use Imager;
lib/AI/TensorFlow/Libtensorflow/Manual/Notebook/InferenceUsingTFHubCenterNetObjDetect.pod view on Meta::CPAN
use File::Which ();
use List::Util 1.56 qw(mesh);
use Data::Printer ( output => 'stderr', return_value => 'void', filters => ['PDL'] );
use Data::Printer::Filter::PDL ();
use Text::Table::Tiny qw(generate_table);
use Imager;
view all matches for this distribution
view release on metacpan or search on metacpan
PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
warner_nocontext|||vn
warner||5.006000|v
warn|||v
watch|||
whichsig|||
write_to_stderr|||
yyerror|||
yylex|||
yyparse|||
yywarn|||
);
view all matches for this distribution
view release on metacpan or search on metacpan
PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
warner_nocontext|||vn
warner||5.006000|v
warn|||v
watch|||
whichsig|||
write_to_stderr|||
yyerror|||
yylex|||
yyparse|||
yywarn|||
);
view all matches for this distribution
view release on metacpan or search on metacpan
PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
warner|5.006000|5.004000|pv
warn|||v
watch|||
whichsig|||
write_no_mem|||
write_to_stderr|||
xmldump_all|||
xmldump_attr|||
xmldump_eval|||
xmldump_form|||
xmldump_indent|||v
view all matches for this distribution
view release on metacpan or search on metacpan
my($fh) = @_;
print $fh "Usage:\n"
. " $me [-v] [-d] [-i <tunnelif>] [-a <localaddrs>] [-p <password>]\n"
. "Options:\n"
. " -v increase verbosity slightly to print error messages on stderr\n"
. " -d increase verbosity greatly (debug mode)\n"
. " -i <tunnelinterface>\n"
. " use the specified tunnel interface, defaults to tunl0\n"
. " -a <comma-separated-ip-list>\n"
. " ignore routes pointing to these (local) gateways\n"
view all matches for this distribution
view release on metacpan or search on metacpan
t/00.compile.t view on Meta::CPAN
my @warnings;
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { require blib; blib->VERSION('1.01') };
t/00.compile.t view on Meta::CPAN
my $line = <$fh>;
close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/;
@switches = (@switches, split(' ', $1)) if $1;
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { require blib; blib->VERSION('1.01') };
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
my @warnings;
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
if (@_warnings)
{
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
my @warnings;
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/MikroTik.pm view on Meta::CPAN
C<ping>. Should be terminated with L</cancel>.
=head1 DEBUGGING
You can set the API_MIKROTIK_DEBUG environment variable to get some debug output
printed to stderr.
Also, you can change connection timeout with the API_MIKROTIK_CONNTIMEOUT variable.
=head1 COPYRIGHT AND LICENSE
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/ParallelsWPB.pm view on Meta::CPAN
API version, used in API url constructing. Optional parameter.
=item debug
Debug flag, requests will be loogged to stderr. Optional parameter.
=item timeout
Connection timeout. Optional parameter.
view all matches for this distribution
view release on metacpan or search on metacpan
_error => undef, # contains the error message
_syslog => 1, # log to syslog or to STDERR
# public:
loglevel => 7, # loglevel is combination of bits (1=AUTH,2=USER,4=ERR,8=CMDDEBUG,16=VERBSIDE,32=DEBUG) see _Log method
logfileprefix => "", # Prepended to every log entry
logdestination => 'syslog', # Where should all the log output go to ('stderr','syslog')
};
}
## Constructor.
## Initializes the object and returns it blessed.
croak("Ignored values at object-creation (this is probably not what you want): ",join(" ",keys (%values))) if keys %values;
# loglevel
$this->{loglevel} = 4 if not defined $this->{loglevel};
$this->{_syslog} = ! (defined $this->{logdestination} && $this->{logdestination} eq "stderr");
openlog("arcv2","cons,pid","user") if $this->{_syslog};
1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
applications/archive.pl view on Meta::CPAN
if ($datum le get_yearMonthDay($gzipEpoch)) {
if ($debug) {
print "C+ <$datum><", get_yearMonthDay($gzipEpoch), "><$path><$filename>\n";
} else {
print EMAILREPORT "C+ <$datum><", get_yearMonthDay($gzipEpoch), "> gzip <$path><$filename>\n";
my ($status, $stdout, $stderr) = call_system ('gzip --force '.$path.'/'.$filename, $debug);
print EMAILREPORT "C+ E R R O R: <$stderr>\n" unless ( $status );
}
}
} elsif ( $staart eq "$command-$catalogID_uKey-csv.txt.gz" ) {
if ($datum le get_yearMonthDay($removeGzipEpoch)) {
if ($debug) {
applications/archive.pl view on Meta::CPAN
if ( $jaarWeekFilename lt $jaarWeekYesterday ) {
if ($debug) {
print "CW+<$jaarWeekYesterday><$jaarWeekFilename><$path><$filename>\n";
} else {
print EMAILREPORT "CW+<$jaarWeekYesterday><$jaarWeekFilename> gzip <$path><$filename>\n";
my ($status, $stdout, $stderr) = call_system ('gzip --force '.$path.'/'.$filename, $debug);
print EMAILREPORT "CW+ E R R O R: <$stderr>\n" unless ( $status );
}
}
} elsif ( $staart eq "$command-$catalogID_uKey-csv-week.txt.gz" ) {
my ($jaar, $week) = split(/w/, $datum);
my $jaarWeekFilename = int($jaar.$week);
applications/archive.pl view on Meta::CPAN
# my $mysqlInfo = $dbh->{mysql_info};
# my ($records, $deleted, $skipped, $warnings) = ($mysqlInfo =~ /^Records:\s+(\d+)\s+Deleted:\s+(\d+)\s+Skipped:\s+(\d+)\s+Warnings: (\d+)$/);
# if ($deleted eq '0' and $skipped eq '0' and $warnings eq '0') {
# print EMAILREPORT "S+ LOAD DATA ... : $records record(s) added for $filename\n";
# my ($status, $stdout, $stderr) = call_system ('gzip --force '.$path.'/'.$filename, $debug);
# print EMAILREPORT "S+ E R R O R: <$stderr>\n" unless ( $status );
# } else {
# print EMAILREPORT "S+ LOAD DATA ... WARNING for $filename: $mysqlInfo, <$records> <$deleted> <$skipped> <$warnings>\n";
# rename("$path/$filename", "$path/$filename-LOAD-DATA-FAILED");
# }
# }
applications/archive.pl view on Meta::CPAN
if ( $rv ) {
if ($debug) {
print "S+ IMPORT CSV DATA ... OK: ALL records imported from $path/$filename\n";
} else {
print EMAILREPORT "S+ IMPORT CSV DATA ... OK: ALL records imported from $path/$filename\n";
my ($status, $stdout, $stderr) = call_system ('gzip --force '.$path.'/'.$filename, $debug);
print EMAILREPORT "S+ E R R O R: <$stderr>\n" unless ( $status );
}
} else {
if ($debug) {
print "S- IMPORT CSV DATA ... CRITICAL: ZERO records imported from $path/$filename\n";
} else {
applications/archive.pl view on Meta::CPAN
if ($datum le get_yearMonthDay($gzipDebugEpoch)) {
if ($debug) {
print "HT+<$datum><".get_yearMonthDay($gzipDebugEpoch)."><$debugPath><$debugFilename>\n";
} else {
print EMAILREPORT "HT+<$datum><".get_yearMonthDay($gzipDebugEpoch)."> gzip <$debugPath><$debugFilename>\n";
my ($status, $stdout, $stderr) = call_system ('gzip --force '.$debugPath.'/'.$debugFilename, $debug);
print EMAILREPORT "HT+ E R R O R: <$stderr>\n" unless ( $status );
}
}
} elsif ( $extentie eq 'htm.gz' ) {
if ($datum le get_yearMonthDay($removeDebugEpoch)) {
if ($debug) {
applications/archive.pl view on Meta::CPAN
if ($removeCgisessEpoch > $session{_SESSION_CTIME}) {
if ($debug) {
print "CS <$cgisessPathFilename><" .$session{_SESSION_CTIME}. ">\n";
} else {
print EMAILREPORT "CS unlink <$cgisessPathFilename><" .$session{_SESSION_CTIME}. ">\n";
my ($status, $stdout, $stderr) = call_system ('rm -f '.$cgisessPathFilename, $debug); # unlink ($cgisessPathFilename);
}
} else {
print "CS-<$cgisessPathFilename><$removeCgisessEpoch><" .$session{_SESSION_CTIME}. ">\n" if ($debug >= 2);
}
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
2012-02-12 1.080
- Added support for multiple external "routes.json" files.
2012-02-07 1.079
- Errors output to the stderr are now derived directly from $@ not from any
parsed version of it.
2012-02-02 1.078
- Fixed installation problem that came up in v1.075
(compilation root was missing leading forward slash on non-windows systems).
view all matches for this distribution