| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #ifndef _VAPBSHAL_H_ |
| #define _VAPBSHAL_H_ |
|
|
| #include "stdio.h" |
|
|
| |
| |
| |
| |
| |
| |
| enum eVrc_Codes { |
|
|
| VRC_WARNING=-1, |
| VRC_FAILURE=0, |
| VRC_SUCCESS=1 |
|
|
| }; |
| typedef enum eVrc_Codes Vrc_Codes; |
|
|
| |
| |
| |
| |
| |
| |
| enum eVsol_Meth { |
|
|
| VSOL_CGMG, |
| VSOL_Newton, |
| VSOL_MG, |
| VSOL_CG, |
| VSOL_SOR, |
| VSOL_RBGS, |
| VSOL_WJ, |
| VSOL_Richardson, |
| VSOL_CGMGAqua, |
| VSOL_NewtonAqua |
|
|
| }; |
| typedef enum eVsol_Meth Vsol_Meth; |
|
|
| |
| |
| |
| |
| |
| enum eVsurf_Meth { |
| VSM_MOL=0, |
| |
| |
| |
| VSM_MOLSMOOTH=1, |
| |
| VSM_SPLINE=2, |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| VSM_SPLINE3=3, |
| |
| |
| |
| VSM_SPLINE4=4 |
| |
| |
| |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVsurf_Meth Vsurf_Meth; |
|
|
| |
| |
| |
| |
| enum eVhal_PBEType { |
| PBE_LPBE, |
| PBE_NPBE, |
| PBE_LRPBE, |
| PBE_NRPBE, |
| PBE_SMPBE |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVhal_PBEType Vhal_PBEType; |
|
|
| |
| |
| |
| |
| enum eVhal_IPKEYType { |
| IPKEY_SMPBE = -2, |
| IPKEY_LPBE, |
| IPKEY_NPBE |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVhal_IPKEYType Vhal_IPKEYType; |
|
|
| |
| |
| |
| |
| enum eVhal_NONLINType { |
| NONLIN_LPBE = 0, |
| NONLIN_NPBE, |
| NONLIN_SMPBE, |
| NONLIN_LPBEAQUA, |
| NONLIN_NPBEAQUA |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVhal_NONLINType Vhal_NONLINType; |
|
|
| |
| |
| |
| |
| enum eVoutput_Format { |
| OUTPUT_NULL, |
| OUTPUT_FLAT, |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVoutput_Format Voutput_Format; |
|
|
| |
| |
| |
| |
| |
| enum eVbcfl { |
| BCFL_ZERO=0, |
| BCFL_SDH=1, |
| |
| BCFL_MDH=2, |
| |
| BCFL_UNUSED=3, |
| BCFL_FOCUS=4, |
| BCFL_MEM=5, |
| BCFL_MAP=6 |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVbcfl Vbcfl; |
|
|
| |
| |
| |
| |
| |
| enum eVchrg_Meth { |
| VCM_TRIL=0, |
| |
| |
| VCM_BSPL2=1, |
| |
| |
| VCM_BSPL4=2 |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVchrg_Meth Vchrg_Meth; |
|
|
| |
| |
| |
| |
| |
| enum eVchrg_Src { |
| VCM_CHARGE=0, |
| VCM_PERMANENT=1, |
| VCM_INDUCED=2, |
| VCM_NLINDUCED=3 |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVchrg_Src Vchrg_Src; |
|
|
| |
| |
| |
| |
| |
| enum eVdata_Type { |
| VDT_CHARGE, |
| VDT_POT, |
| VDT_ATOMPOT, |
| VDT_SMOL, |
| |
| VDT_SSPL, |
| |
| VDT_VDW, |
| |
| VDT_IVDW, |
| |
| VDT_LAP, |
| VDT_EDENS, |
| |
| VDT_NDENS, |
| |
| VDT_QDENS, |
| |
| VDT_DIELX, |
| |
| VDT_DIELY, |
| |
| VDT_DIELZ, |
| |
| VDT_KAPPA |
| |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVdata_Type Vdata_Type; |
|
|
| |
| |
| |
| |
| |
| enum eVdata_Format { |
| VDF_DX=0, |
| VDF_UHBD=1, |
| VDF_AVS=2, |
| VDF_MCSF=3, |
| VDF_GZ=4, |
| VDF_FLAT=5, |
| VDF_DXBIN=6 |
| }; |
|
|
| |
| |
| |
| |
| typedef enum eVdata_Format Vdata_Format; |
|
|
| |
| |
| |
| |
| #define APBS_TIMER_WALL_CLOCK 26 |
|
|
| |
| |
| |
| |
| #define APBS_TIMER_SETUP 27 |
|
|
| |
| |
| |
| |
| #define APBS_TIMER_SOLVER 28 |
|
|
| |
| |
| |
| |
| #define APBS_TIMER_ENERGY 29 |
|
|
| |
| |
| |
| |
| #define APBS_TIMER_FORCE 30 |
|
|
| |
| |
| |
| |
| #define APBS_TIMER_TEMP1 31 |
|
|
| |
| |
| |
| |
| #define APBS_TIMER_TEMP2 32 |
|
|
| |
| |
| |
| |
| #define MAXMOL 5 |
|
|
| |
| |
| |
| |
| #define MAXION 10 |
|
|
| |
| |
| |
| #define MAXFOCUS 5 |
|
|
| |
| |
| |
| #define VMGNLEV 4 |
|
|
| |
| |
| |
| #define VREDFRAC 0.25 |
|
|
| |
| |
| |
| #define VAPBS_NVS 4 |
|
|
| |
| |
| |
| #define VAPBS_DIM 3 |
|
|
| |
| |
| |
| |
| #define VAPBS_RIGHT 0 |
|
|
| |
| |
| |
| |
| #define VAPBS_FRONT 1 |
|
|
| |
| |
| |
| |
| #define VAPBS_UP 2 |
|
|
| |
| |
| |
| |
| #define VAPBS_LEFT 3 |
|
|
| |
| |
| |
| |
| #define VAPBS_BACK 4 |
|
|
| |
| |
| |
| |
| #define VAPBS_DOWN 5 |
|
|
| |
| |
| |
| |
| #define VPMGSMALL 1e-12 |
|
|
| |
| |
| |
| |
| #define SINH_MIN -85.0 |
|
|
| |
| |
| |
| |
| #define SINH_MAX 85.0 |
|
|
| #define MAX_HASH_DIM 75 |
|
|
| #if defined(VDEBUG) |
| # if !defined(APBS_NOINLINE) |
| # define APBS_NOINLINE 1 |
| # endif |
| #endif |
|
|
| #if !defined(APBS_NOINLINE) |
|
|
| |
| |
| |
| # define VINLINE_VACC |
|
|
| |
| |
| |
| # define VINLINE_VATOM |
|
|
| |
| |
| |
| # define VINLINE_VCSM |
|
|
| |
| |
| |
| # define VINLINE_VPBE |
|
|
| |
| |
| |
| # define VINLINE_VPEE |
|
|
| |
| |
| |
| # define VINLINE_VGREEN |
|
|
| |
| |
| |
| # define VINLINE_VFETK |
|
|
| |
| |
| |
| # define VINLINE_VPMG |
|
|
| |
| |
| |
|
|
| #endif |
|
|
| |
| #if defined(VF77_UPPERCASE) |
| # if defined(VF77_NOUNDERSCORE) |
| # define VF77_MANGLE(name,NAME) NAME |
| # elif defined(VF77_ONEUNDERSCORE) |
| # define VF77_MANGLE(name,NAME) NAME ## _ |
| # else |
| # define VF77_MANGLE(name,NAME) name |
| # endif |
| #else |
| # if defined(VF77_NOUNDERSCORE) |
| # define VF77_MANGLE(name,NAME) name |
| # elif defined(VF77_ONEUNDERSCORE) |
| # define VF77_MANGLE(name,NAME) name ## _ |
| # else |
| |
| |
| |
| # define VF77_MANGLE(name,NAME) name |
| # endif |
| #endif |
|
|
| |
| #if defined(FLOAT_EPSILON) |
| # define VFLOOR(value) \ |
| ((floor(value) != floor(value + FLOAT_EPSILON)) ? \ |
| floor(value + FLOAT_EPSILON) : floor(value)) |
| #else |
| |
| |
| |
| |
| |
| # define VFLOOR(value) floor(value) |
| #endif |
|
|
| |
| #if defined(HAVE_EMBED) |
| |
| |
| |
| |
| # define VEMBED(rctag) \ |
| VPRIVATE const char* rctag; \ |
| static void* use_rcsid=(0 ? &use_rcsid : (void**)&rcsid); |
| #else |
| |
| |
| |
| |
| # define VEMBED(rctag) |
| #endif |
|
|
|
|
|
|
| |
| #if !defined(_WIN32) || defined(__MINGW32__) |
| #define PRINT_FUNC __PRETTY_FUNCTION__ |
| #define OS_SEP_STR "/" |
| #define OS_SEP_CHAR '/' |
| #else |
| #define OS_SEP_STR "\\" |
| #define OS_SEP_CHAR '\\' |
| #define PRINT_FUNC __FUNCSIG__ |
| #define snprintf sprintf_s |
| #endif |
|
|
| #ifdef VERGBOSE_DEBUG |
| #define ANNOUNCE_FUNCTION \ |
| do { \ |
| Vnm_prrint(2, "%s() [%s:%d]\n", \ |
| PRINT_FUNC, __FILE__, __LINE__ ); \ |
| } while(0) |
|
|
| #define WARN_UNTESTED \ |
| do { \ |
| Vnm_print(2, "%s() [%s:%d]: Untested Translation!\n", \ |
| __FUNCTION__, __FILE__, __LINE__); \ |
| } while(0) |
|
|
| #define WARN_PARTTESTED \ |
| do{ \ |
| Vnm_print(2, "%s() [%s:%d]: Partially Tested Translation.\n", \ |
| __FUNCTION__, __FILE__, __LINE__); \ |
| } while(0) |
| #else |
| #define ANNOUNCE_FUNCTION |
| #define WARN_UNTESTED |
| #define WARN_PARTTESTED |
| #endif |
|
|
|
|
|
|
| |
| #ifdef DEBUG |
| #define VCHANNELEDMESSAGE0(channel, msg) \ |
| do { \ |
| Vnm_print(channel, "%s:%d [%s()]: MESSAGE:\n" \ |
| " %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, msg); \ |
| } while(0) |
|
|
| #define VCHANNELEDMESSAGE1(channel, msg, arg) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg ); \ |
| Vnm_print(channel, "%s:%d [%s()]: MESSAGE:\n" \ |
| " %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, buff); \ |
| } while(0) |
|
|
| #define VCHANNELEDMESSAGE2(channel, msg, arg0, arg1) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg0, arg1 ); \ |
| Vnm_print(channel, "%s:%d [%s()]: MESSAGE:\n" \ |
| " %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, buff); \ |
| } while(0) |
|
|
| #define VCHANNELEDMESSAGE3(channel, msg, arg0, arg1, arg2) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf(buff, 1000, msg, arg0, arg1, arg2); \ |
| Vnm_print(channel, "%s:%d [%s()]: MESSAGE:\n" \ |
| " %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, buff); \ |
| } while(0) |
|
|
| #define VMESSAGE0(msg) VCHANNELEDMESSAGE0(2, msg) |
| #define VMESSAGE1(msg, arg0) VCHANNELEDMESSAGE1(2, msg, arg0) |
| #define VMESSAGE2(msg, arg0, arg1) VCHANNELEDMESSAGE2(2, msg, arg0, arg1) |
| #define VMESSAGE3(msg, arg0, arg1, arg2) VCHANNELEDMESSAGE3(2, msg, arg0, arg1, arg2) |
|
|
| #define VERRMSG0(msg) VMESSAGE0(msg) |
| #define VERRMSG1(msg, arg0) VMESSAGE1(msg, arg0) |
| #define VERRMSG2(msg, arg0, arg1) VMESSAGE2(msg, arg0, arg1) |
| #define VERRMSG3(msg, arg0, arg1, arg2) VMESSAGE3(msg, arg0, arg1, arg2) |
| #else |
| #define VCHANNELEDMESSAGE0(channel, msg) \ |
| do { \ |
| Vnm_print(channel, "%s: %s\n", __FUNCTION__, msg); \ |
| } while(0) |
|
|
| #define VCHANNELEDMESSAGE1(channel, msg, arg0) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg0 ); \ |
| Vnm_print(channel, "%s: %s\n", __FUNCTION__, buff); \ |
| } while(0) |
|
|
| #define VCHANNELEDMESSAGE2(channel, msg, arg0, arg1) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg0, arg1 ); \ |
| Vnm_print(channel, "%s: %s\n", __FUNCTION__, buff); \ |
| } while(0) |
|
|
| #define VCHANNELEDMESSAGE3(channel, msg, arg0, arg1, arg2) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf(buff, 1000, msg, arg0, arg1, arg2); \ |
| Vnm_print(channel, "%s: %s\n", __FUNCTION__, buff); \ |
| } while(0) |
|
|
| #define VMESSAGE0(msg) VCHANNELEDMESSAGE0(0, msg) |
| #define VMESSAGE1(msg, arg0) VCHANNELEDMESSAGE1(0, msg, arg0) |
| #define VMESSAGE2(msg, arg0, arg1) VCHANNELEDMESSAGE2(0, msg, arg0, arg1) |
| #define VMESSAGE3(msg, arg0, arg1, arg2) VCHANNELEDMESSAGE3(0, msg, arg0, arg1, arg2) |
|
|
| #define VERRMSG0(msg) VCHANNELEDMESSAGE0(2, msg) |
| #define VERRMSG1(msg, arg0) VCHANNELEDMESSAGE1(2, msg, arg0) |
| #define VERRMSG2(msg, arg0, arg1) VCHANNELEDMESSAGE2(2, msg, arg0, arg1) |
| #define VERRMSG3(msg, arg0, arg1, arg2) VCHANNELEDMESSAGE3(2, msg, arg0, arg1, arg2) |
| #endif |
|
|
|
|
|
|
| |
| |
| |
| |
| #ifdef DEBUG |
| #define VASSERT_MSG0(cnd, msg) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| Vnm_print(2, "%s:%d [%s()]: ERROR:\n" \ |
| " Assertion Failed (%s): %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, #cnd, msg); \ |
| abort(); \ |
| } \ |
| } while(0) |
|
|
| #define VASSERT_MSG1(cnd, msg, arg) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg ); \ |
| Vnm_print(2, "%s:%d [%s()]: ERROR:\n" \ |
| " Assertion Failed (%s): %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, #cnd, buff); \ |
| abort(); \ |
| } \ |
| } while(0) |
|
|
| #define VASSERT_MSG2(cnd, msg, arg0, arg1) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg0, arg1 ); \ |
| Vnm_print(2, "%s:%d [%s()]: ERROR:\n" \ |
| " Assertion Failed (%s): %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, #cnd, buff); \ |
| abort(); \ |
| } \ |
| } while(0) |
| #else |
| #define VASSERT_MSG0(cnd, msg) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| Vnm_print(2, "%[%s()]: ERROR:\n" \ |
| " Assertion Failed (%s): %s\n\n", \ |
| __FUNCTION__, #cnd, msg); \ |
| abort(); \ |
| } \ |
| } while(0) |
|
|
| #define VASSERT_MSG1(cnd, msg, arg) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg ); \ |
| Vnm_print(2, "[%s()]: ERROR:\n" \ |
| " Assertion Failed (%s): %s\n\n", \ |
| __FUNCTION__, #cnd, buff); \ |
| abort(); \ |
| } \ |
| } while(0) |
|
|
| #define VASSERT_MSG2(cnd, msg, arg0, arg1) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg0, arg1 ); \ |
| Vnm_print(2, "[%s()]: ERROR:\n" \ |
| " Assertion Failed (%s): %s\n\n", \ |
| __FUNCTION__, #cnd, buff); \ |
| abort(); \ |
| } \ |
| } while(0) |
| #endif |
|
|
|
|
|
|
| |
| |
| |
| |
| #ifdef DEBUG |
| #define VWARN_MSG0(cnd, msg) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| Vnm_print( \ |
| 2, \ |
| "%s:%d [%s()]: WARNING:\n" \ |
| " Condition Failed (%s):\n %s\n\n", \ |
| __FILE__, \ |
| __LINE__, \ |
| __FUNCTION__, \ |
| #cnd, \ |
| msg \ |
| ); \ |
| } \ |
| } while(0) |
|
|
| #define VWARN_MSG1(cnd, msg, arg0) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| char buff[1000]; \ |
| snprintf(buff, 1000, msg, arg0); \ |
| Vnm_print( \ |
| 2, \ |
| "%s:%d [%s()]: WARNING:\n" \ |
| " Condition Failed (%s):\n %s\n\n", \ |
| __FILE__, \ |
| __LINE__, \ |
| __FUNCTION__, \ |
| #cnd, \ |
| buff \ |
| ); \ |
| } \ |
| } while(0) |
|
|
| #define VWARN_MSG2(cnd, msg, arg0, arg1) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| char buff[1000]; \ |
| snprintf(buff, 1000, msg, arg0, arg1); \ |
| Vnm_print( \ |
| 2, \ |
| "%s:%d [%s()]: WARNING:\n" \ |
| " Condition Failed (%s):\n %s\n\n", \ |
| __FILE__, \ |
| __LINE__, \ |
| __FUNCTION__, \ |
| #cnd, \ |
| buff \ |
| ); \ |
| } \ |
| } while(0) |
| #else |
| #define VWARN_MSG0(cnd, msg) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| Vnm_print( \ |
| 2, \ |
| "[%s()]: WARNING:\n" \ |
| " %s\n\n", \ |
| __FUNCTION__, \ |
| msg \ |
| ); \ |
| } \ |
| } while(0) |
|
|
| #define VWARN_MSG1(cnd, msg, arg0) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| char buff[1000]; \ |
| snprintf(buff, 1000, msg, arg0); \ |
| Vnm_print( \ |
| 2, \ |
| "[%s()]: WARNING:\n" \ |
| " %s\n\n", \ |
| __FUNCTION__, \ |
| buff \ |
| ); \ |
| } \ |
| } while(0) |
|
|
| #define VWARN_MSG2(cnd, msg, arg0, arg1) \ |
| do { \ |
| if( (cnd) == 0 ) { \ |
| char buff[1000]; \ |
| snprintf(buff, 1000, msg, arg0, arg1); \ |
| Vnm_print( \ |
| 2, \ |
| "[%s()]: WARNING:\n" \ |
| " %s\n\n", \ |
| __FUNCTION__, \ |
| buff \ |
| ); \ |
| } \ |
| } while(0) |
| #endif |
|
|
| |
| #ifdef DEBUG |
| #define VABORT_MSG0(msg) \ |
| do { \ |
| Vnm_print(2, "%s:%d [%s()]: ABORTING:\n" \ |
| " %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, msg); \ |
| abort(); \ |
| } while(0) |
|
|
| #define VABORT_MSG1(msg, arg) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg ); \ |
| Vnm_print(2, "%s:%d [%s()]: ABORTING:\n" \ |
| " %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, buff); \ |
| abort(); \ |
| } while(0) |
|
|
| #define VABORT_MSG2(msg, arg0, arg1) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg0, arg1); \ |
| Vnm_print(2, "%s:%d [%s()]: ABORTING:\n" \ |
| " %s\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, buff); \ |
| abort(); \ |
| } while(0) |
| #else |
| #define VABORT_MSG0(msg) \ |
| do { \ |
| Vnm_print(2, "%[%s()]: ABORTING:\n" \ |
| " %s\n\n", \ |
| __FUNCTION__, msg); \ |
| abort(); \ |
| } while(0) |
|
|
| #define VABORT_MSG1(msg, arg) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg ); \ |
| Vnm_print(2, "[%s()]: ABORTING:\n" \ |
| " %s\n\n", \ |
| __FUNCTION__, buff); \ |
| abort(); \ |
| } while(0) |
|
|
| #define VABORT_MSG2(msg, arg0, arg1) \ |
| do { \ |
| char buff[1000]; \ |
| snprintf( buff, 1000, msg, arg0, arg1); \ |
| Vnm_print(2, "[%s()]: ABORTING:\n" \ |
| " %s\n\n", \ |
| __FUNCTION__, buff); \ |
| abort(); \ |
| } while(0) |
| #endif |
|
|
|
|
|
|
| |
| #ifdef DEBUG |
| #define PRINT_INT(expr) \ |
| do { \ |
| Vnm_print(2, "%s:%d [%s()]: %s == %d\n", \ |
| __FILE__, __LINE__, __FUNCTION__, #expr, expr); \ |
| } while(0) |
|
|
| #define PRINT_DBL(expr) \ |
| do { \ |
| Vnm_print(2, "%s:%d [%s()]: %s == %f\n\n", \ |
| __FILE__, __LINE__, __FUNCTION__, #expr, expr); \ |
| } while(0) |
| #else |
| #define PRINT_INT(expr) |
| #define PRINT_DBL(expr) |
| #endif |
|
|
| #define VMALLOC(vmem, n, type) ((type*)Vmem_malloc(vmem, n, sizeof(type))) |
|
|
| #define VFREE(vmem, n, type, ptr) (Vmem_free(vmem, n, sizeof(type), (void **)&(ptr))) |
|
|
| #define VFILL(vec, n, val) \ |
| do { \ |
| int fill_idx; \ |
| for (fill_idx = 0; fill_idx < n; fill_idx++) \ |
| vec[fill_idx] = val; \ |
| } while(0) |
|
|
| #define VCOPY(srcvec, dstvec, i, n) \ |
| do { \ |
| for (i = 0; i < n; i++) \ |
| dstvec[i] = srcvec[i]; \ |
| } while(0) |
|
|
|
|
| char* wrap_text( char* str, int right_margin, int left_padding ); |
|
|
| #define VAT(array, i) ((array)[(i) - 1]) |
| #define RAT(array, i) ((array) + i - 1) |
|
|
| #endif |
|
|