version 1.2, 2009/10/19 09:56:35 |
version 1.3, 2009/12/22 23:58:00 |
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
#include <assert.h> |
#include <assert.h> |
#include <err.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
|
|
* (they're in-line re-ordered during lookup). |
* (they're in-line re-ordered during lookup). |
*/ |
*/ |
|
|
if (NULL == (tab = malloc(sizeof(struct tbl)))) |
tab = malloc(sizeof(struct tbl)); |
err(1, "malloc"); |
if (NULL == tab) { |
tab->type = type; |
perror(NULL); |
|
exit(EXIT_FAILURE); |
|
} |
|
|
htab = calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **)); |
htab = calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **)); |
if (NULL == htab) |
if (NULL == htab) { |
err(1, "malloc"); |
perror(NULL); |
|
exit(EXIT_FAILURE); |
|
} |
|
|
for (i = 0; i < LINES_MAX; i++) { |
for (i = 0; i < LINES_MAX; i++) { |
hash = (int)lines[i].code[0] - PRINT_LO; |
hash = (int)lines[i].code[0] - PRINT_LO; |
|
|
} |
} |
|
|
tab->htab = htab; |
tab->htab = htab; |
|
tab->type = type; |
return(tab); |
return(tab); |
} |
} |
|
|