I am hoping someone can explain this to me as I am struggling to understand it.
I had a problem today with needing to trace a ksh script that was dotting in a function that was writing to stdout. The problem was it was being run in a sub shell and the output was being parsed by the calling script so I could not have any trace output on stdout.
On a hunch I tried this solution to log the function's trace to file and it worked but I don't know why, can anyone enlighten me?
Hi, Can anyone help me figure out the problem I'm having with a function call?
I have a header file, which sets an enum:
typedef enum {INFO, WARNING, FATAL} Levels;
int log_event (Levels, char *fmt, ...);
..then the function is called this way:
log_event(INFO, "Message text");
... (6 Replies)
I have a function check_ok in my abc.sh. which return me 1 or 0 . I want to call this fuction through other shell script. this shell also send two parameter to calling function.
Can you please tell me how. I am very new in unix.
#!/bin/bash
date_equal()
{
sqlplus -silent... (4 Replies)
hi,
can any one help me to correct this function call.
awk -F "," '{ {first=$1; sec=$2; tro=$3;quat=$4 }
if (tro == "")
{
$3 = search "$file2" "$first" "$file3"
{print $1","$2","$3","$4} }
else
{print $1","$2","$3 $4}}' $file1 > $file
search ()
{ (2 Replies)
hello,
when i call function inside awk traitement it doesn't work, i don't have error execution but i don't get result and if i call the function outside awk traitement it work well..
there's something special in awk call function??
here is the example :
awk -F "," '{ {first=$1; sec=$2;... (3 Replies)
Apart from writing debug and statements in constructors is there any way by which we can trace the function call stack at any depth?
The issue that we always face is that when program crashes (Web Server running on Linux) we have no idea where it crashes and we have to do the hard way of... (1 Reply)
I was searching for a tool to trace the function flow to help me understand the code. I came across the article "visualize function calls with graphviz" by Tim Jones.
Visualize function calls with Graphviz
I was able to obtain the flow diagram for simple programs and also for the example... (0 Replies)
Hello,
I have a problem with package and name space.
require "/Mehran/DSGateEngineLib/general.pl";
use strict;
sub System_Status_Main_Service_Status_Intrusion_Prevention
{
my %idpstatus;
my @result;
&General_ReadHash("/var/dsg/idp/settings",\%idpstatus);
#print... (4 Replies)
Below is my script that is function properly per my conditions but I am facing one problem here that is when one function fails then Iy should not check other functions but it calls the other function too So anyone can help me how could i achieve this?
iNOUT i AM GIVING TO THE... (1 Reply)
Hi
I have created a function in a Shell Script test.sh
function fnTest()
{
echo "My first Method
}
I have called this function in my test.sh
cat abc.txt | grep "test"
echo " test"
fnTest
But while running the shell script i got the following error:
... (2 Replies)
Discussion started by: nanthagopal
2 Replies
LEARN ABOUT FREEBSD
hx509_oid_sprint
hx509 printing functions(3) Heimdalx509library hx509 printing functions(3)NAME
hx509 printing functions -
Functions
void hx509_print_stdout (void *ctx, const char *fmt, va_list va)
int hx509_oid_sprint (const heim_oid *oid, char **str)
void hx509_oid_print (const heim_oid *oid, hx509_vprint_func func, void *ctx)
void hx509_bitstring_print (const heim_bit_string *b, hx509_vprint_func func, void *ctx)
int hx509_cert_keyusage_print (hx509_context context, hx509_cert c, char **s)
int hx509_validate_ctx_init (hx509_context context, hx509_validate_ctx *ctx)
void hx509_validate_ctx_set_print (hx509_validate_ctx ctx, hx509_vprint_func func, void *c)
void hx509_validate_ctx_add_flags (hx509_validate_ctx ctx, int flags)
void hx509_validate_ctx_free (hx509_validate_ctx ctx)
int hx509_validate_cert (hx509_context context, hx509_validate_ctx ctx, hx509_cert cert)
Detailed DescriptionFunction Documentation
void hx509_bitstring_print (const heim_bit_string * b, hx509_vprint_func func, void * ctx)
Print a bitstring using a hx509_vprint_func function. To print to stdout use hx509_print_stdout().
Parameters:
b bit string to print.
func hx509_vprint_func to print with.
ctx context variable to hx509_vprint_func function.
int hx509_cert_keyusage_print (hx509_context context, hx509_cert c, char ** s)
Print certificate usage for a certificate to a string.
Parameters:
context A hx509 context.
c a certificate print the keyusage for.
s the return string with the keysage printed in to, free with hx509_xfree().
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_oid_print (const heim_oid * oid, hx509_vprint_func func, void * ctx)
Print a oid using a hx509_vprint_func function. To print to stdout use hx509_print_stdout().
Parameters:
oid oid to print
func hx509_vprint_func to print with.
ctx context variable to hx509_vprint_func function.
int hx509_oid_sprint (const heim_oid * oid, char ** str)
Print a oid to a string.
Parameters:
oid oid to print
str allocated string, free with hx509_xfree().
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_print_stdout (void * ctx, const char * fmt, va_list va)
Helper function to print on stdout for:
o hx509_oid_print(),
o hx509_bitstring_print(),
o hx509_validate_ctx_set_print().
Parameters:
ctx the context to the print function. If the ctx is NULL, stdout is used.
fmt the printing format.
va the argumet list.
int hx509_validate_cert (hx509_context context, hx509_validate_ctx ctx, hx509_cert cert)
Validate/Print the status of the certificate.
Parameters:
context A hx509 context.
ctx A hx509 validation context.
cert the cerificate to validate/print.
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_validate_ctx_add_flags (hx509_validate_ctx ctx, int flags)
Add flags to control the behaivor of the hx509_validate_cert() function.
Parameters:
ctx A hx509 validation context.
flags flags to add to the validation context.
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_validate_ctx_free (hx509_validate_ctx ctx)
Free an hx509 validate context.
Parameters:
ctx the hx509 validate context to free.
int hx509_validate_ctx_init (hx509_context context, hx509_validate_ctx * ctx)
Allocate a hx509 validation/printing context.
Parameters:
context A hx509 context.
ctx a new allocated hx509 validation context, free with hx509_validate_ctx_free().
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_validate_ctx_set_print (hx509_validate_ctx ctx, hx509_vprint_func func, void * c)
Set the printing functions for the validation context.
Parameters:
ctx a hx509 valication context.
func the printing function to usea.
c the context variable to the printing function.
Returns:
An hx509 error code, see hx509_get_error_string().
Version 1.5.2 11 Jan 2012 hx509 printing functions(3)