добавлен файл с функциями

This commit is contained in:
Kolan Sh 2011-04-30 17:23:19 +04:00
parent f86b064fff
commit 0af0bf311d
2 changed files with 21 additions and 5 deletions

15
bash/functions/functions.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
function run_cmd()
{
err_code=$(($err_code+1))
if [[ "$1" == "" ]]; then
echo "Error:Need command to run_cmd() function!"
exit -1
fi
$1
if [[ "$?" != "0" ]]; then
echo \"$1\" error >&2
exit $err_code
fi
}

View File

@ -5,14 +5,10 @@
#define TRUE 1
#define FALSE 0
struct object_s {
char val;
};
struct block_s {
struct block_s *next;
struct block_s *prev;
struct object_s obj;
char obj[1];
};
struct block_pool {
@ -112,6 +108,11 @@ void pool_free(struct block_pool *bp, void *p)
bp->busy_pool = b2;
}
struct object_s {
char val;
};
int main()
{
unsigned long long i;