добавлен файл с функциями
This commit is contained in:
parent
f86b064fff
commit
0af0bf311d
|
@ -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
|
||||
}
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue