mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
exit if can't open table file; include assert for compile on sarge
This commit is contained in:
parent
936fdc0a6c
commit
588514a6f9
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* -*- compile-command: "g++ -g -o dict2dawg dict2dawg.cpp"; -*- */
|
/* -*- compile-command: "g++ -O -o dict2dawg dict2dawg.cpp"; -*- */
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* adapted from perl code that was itself adapted from C++ code
|
* adapted from perl code that was itself adapted from C++ code
|
||||||
* Copyright (C) 2000 Falk Hueffner
|
* Copyright (C) 2000 Falk Hueffner
|
||||||
|
@ -43,6 +43,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -750,6 +751,9 @@ makeTableHash( void )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
FILE* TABLEFILE = fopen( gTableFile, "r" );
|
FILE* TABLEFILE = fopen( gTableFile, "r" );
|
||||||
|
if ( NULL == TABLEFILE ) {
|
||||||
|
ERROR_EXIT( "unable to open %s\n", gTableFile );
|
||||||
|
}
|
||||||
|
|
||||||
for ( i = 0; ; ++i ) {
|
for ( i = 0; ; ++i ) {
|
||||||
int ch = getc(TABLEFILE);
|
int ch = getc(TABLEFILE);
|
||||||
|
|
Loading…
Reference in a new issue