version 1.4.6.1, 2014/01/29 14:15:58
|
version 1.7.6.1, 2019/01/21 11:56:39
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004 - 2014 | Copyright 2004 - 2019 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 60 typedef struct _tagArray {
|
Line 60 typedef struct _tagArray {
|
|
|
#define array_Ptr(_arr, _d) ((_arr) ? (_arr)->arr_data[_d] : NULL) |
#define array_Ptr(_arr, _d) ((_arr) ? (_arr)->arr_data[_d] : NULL) |
#define array_Get2(_arr, _d) (assert((_arr) && (_arr)->arr_num > _d), ((_arr)->arr_data + _d)) |
#define array_Get2(_arr, _d) (assert((_arr) && (_arr)->arr_num > _d), ((_arr)->arr_data + _d)) |
#define array_Get(_arr, _d) (assert((_arr) && (_arr)->arr_num > _d), (_arr)->arr_data[_d]) | #define array_Get(_arr, _d) (assert((_arr)), (_arr)->arr_data[_d]) |
#define array(_arr, _d, _type) (assert((_arr) && (_arr)->arr_num > _d), \ | #define array(_arr, _d, _type) (assert((_arr)), ((_type) (_arr)->arr_data[_d])) |
((_type) (_arr)->arr_data[_d])) | #define array_Set(_arr, _d, _ptr) do { int __d = _d; assert((_arr) && (_arr)->arr_num > __d); \ |
#define array_Set(_arr, _d, _ptr) do { assert((_arr) && (_arr)->arr_num > _d); \ | if ((_arr)->arr_last < __d) \ |
if ((_arr)->arr_last < _d) \ | (_arr)->arr_last = __d; \ |
(_arr)->arr_last = _d; \ | (_arr)->arr_data[__d] = (void*) (_ptr); \ |
(_arr)->arr_data[_d] = (void*) (_ptr); \ | |
} while (0) |
} while (0) |
#define array_Del(_arr, _d, _fri) do { assert((_arr) && (_arr)->arr_num > _d); \ | #define array_Del(_arr, _d, _fri) do { int __d = _d; assert((_arr) && (_arr)->arr_num > __d); \ |
if (_fri && (_arr)->arr_data[_d]) \ | if (_fri && (_arr)->arr_data[__d]) \ |
e_free((_arr)->arr_data[_d]); \ | e_free((_arr)->arr_data[__d]); \ |
(_arr)->arr_data[_d] = NULL; \ | (_arr)->arr_data[__d] = NULL; \ |
} while (0) |
} while (0) |
|
|
/* |
/* |
Line 96 void array_Destroy(array_t ** __restrict parr);
|
Line 95 void array_Destroy(array_t ** __restrict parr);
|
* return: none |
* return: none |
*/ |
*/ |
void array_Free(array_t * __restrict arr); |
void array_Free(array_t * __restrict arr); |
|
/* |
|
* array_Reset() - Reset array to initial state |
|
* |
|
* @parr = Array |
|
* @purge = Purge data, if <>0 then will be free entire data memory |
|
* return: none |
|
*/ |
|
void array_Reset(array_t * __restrict arr, int purge); |
|
|
/* |
/* |
* array_From() - Create and fill array from array with pointers |
* array_From() - Create and fill array from array with pointers |