Sponsored Content
Top Forums Programming reading the return value from S_ISDR Post 302161870 by shamrock on Saturday 26th of January 2008 04:28:34 PM
Old 01-26-2008
Quote:
Originally Posted by bishweshwar
how to read the return value of S_ISDIR macro.

It works fine when used in if loop, but how to print the returned value.

Thanks
bishweshwar
The return value of S_ISDIR will be the numerical representation of either TRUE or FALSE.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Return value

Hallo I want write a sh script but I have some troubles! How can I write the Return value to a variable? I need an egrep command with the option -c, how many times it give the pattern. This return value shold be written in a variable. Could you help me? (1 Reply)
Discussion started by: raphael.schwend
1 Replies

2. UNIX for Advanced & Expert Users

if (( $# != 1 )) ---- what will this return

Hi this is an existing code written by somebody. Please help me in understanding the meaning of this if (( $# != 1 )) (3 Replies)
Discussion started by: satgur
3 Replies

3. Programming

cp and rm return non zero value

rm and cp return non zero values sometimes. sprintf(tmp, "rm -rf %s/* 2>/dev/null\n", dest); rc = system( tmp ); rc = 1 and errno =0 sprintf(tmp, "cp -r %s/* %s 2>/dev/null", source, dest); rc = system( tmp ); rc = -1 and errno = 2. The files exist and the paths are correct. I can... (7 Replies)
Discussion started by: latitude
7 Replies

4. Programming

reading reading data from webpage

hi iam reading data from web page using request socket and curl socket. now my problem is some the web page containg data as a image so how can i read the data from a image. thank,inadvance. sree (3 Replies)
Discussion started by: phani_sree
3 Replies

5. UNIX for Dummies Questions & Answers

return ${1-0}

Hi, What does the above command means? this is used in the following function function _set_return_code { return ${1-0} } (3 Replies)
Discussion started by: neeto
3 Replies

6. UNIX for Dummies Questions & Answers

to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's

Hi All, Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'. I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies

7. Shell Programming and Scripting

Reading file and return value

Hi guys, I am newbie in unix, so I need your help. I need to right unix function code that can read sample.txt. If sample.txt contains sentence such as "Error due to syntax." then it will return value. I tried below code, but I got errors. if then echo " There are... (4 Replies)
Discussion started by: adamenderik
4 Replies

8. Shell Programming and Scripting

how should I get the return value

ls xx > yy.log echo $? can get the return value of "ls xx" but if I use ls xx |tee -a yy.log I can't get the return value of "ls xx", and I get the return value of the whole cmd "ls xx |tee -a yy.log", it is always "0" my question is how could I get the return value of "ls xx"... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

9. Shell Programming and Scripting

How can i make the current shell return from the middle of a script reading?

I am using the popular bash shell. Under the current interactive shell, i run the script like: ". ./myscript.txt" . After the current shell has finish the script, the shell will continue to work as I did previously. Actually I want the shell can return from the middle of the scripts it is... (1 Reply)
Discussion started by: Bill Zhao
1 Replies

10. Shell Programming and Scripting

Return: can only `return' from a function or sourced script

Not sure where the problem is. I can run the script without any issue using the following command. . /opt/app/scripts/cdc_migration.sh But it fails with the below error when I try it this way /opt/app/scripts/cdc_migration.sh /opt/app/scripts/cdc_migration.sh: line 65: return: can only... (1 Reply)
Discussion started by: svajhala
1 Replies
play_fli(3alleg4)						  Allegro manual						 play_fli(3alleg4)

NAME
play_fli - Plays a FLI or FLC animation from disk. Allegro game programming library. SYNOPSIS
#include <allegro.h> int play_fli(const char *filename, BITMAP *bmp, int loop, int (*callback)()); DESCRIPTION
Plays an Autodesk Animator FLI or FLC animation file on the specified BITMAP, reading the data from disk as it is required. If `loop' is not zero, the player will cycle when it reaches the end of the file, otherwise it will play through the animation once and then return. Read the beginning of chapter "FLIC routines" for a description of the callback parameter. Example: /* Let users skip looped animations. */ int check_escape_key(void) { if (key[KEY_ESC]) return 1; else return 0; } ... int ret = play_fli("animlogo.fli", screen, 1, check_escape_key); if (ret == FLI_ERROR) abort_on_error("Error playing intro!"); RETURN VALUE
The FLI player returns FLI_OK if it reached the end of the file, FLI_ERROR if something went wrong, and the value returned by the callback function if that was what stopped it. SEE ALSO
play_memory_fli(3alleg4), install_timer(3alleg4), fli_frame(3alleg4) Allegro version 4.4.2 play_fli(3alleg4)
All times are GMT -4. The time now is 06:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy