Cryptography Reference
In-Depth Information
{
if (strncmp (str, "0b", 2) == 0 || strncmp (str, "0B", 2) == 0)
{
error = str2clint_l (n_l, (char*)str+2, 2);
}
else
{
error = str2clint_l (n_l, (char*)str, 10);
}
}
switch (error) {
case E_CLINT_OK:
status = E_LINT_OK;
break;
case E_CLINT_NPT:
status = E_LINT_INV;
panic (E_LINT_NPT, "constructor 4", 1, __LINE__);
break;
case E_CLINT_OFL:
status = E_LINT_OFL;
panic (E_LINT_OFL, "constructor 4", 1, __LINE__);
break;
default:
status = E_LINT_INV;
panic (E_LINT_ERR, "constructor 4", error, __LINE__);
}
}
Constructors make possible the initialization of LINT objects among
themselvesaswellas LINT objects with standard types, constants, and character
strings, as the following examples demonstrate:
LINT a;
LINT one (1);
int i = 2147483647;
LINT b (i);
LINT c (one);
LINT d ("0x123456789abcdef0");
The constructor functions are called explicitly to generate objects of type LINT
from the specified arguments. The LINT constructor, which, for example, changes
unsigned long values into LINT objects, is embodied in the following function:
 
Search WWH ::




Custom Search