]> granicus.if.org Git - yasm/commitdiff
Initialize BitVector framework.
authorPeter Johnson <peter@tortall.net>
Thu, 27 Sep 2001 07:52:57 +0000 (07:52 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 27 Sep 2001 07:52:57 +0000 (07:52 -0000)
svn path=/trunk/yasm/; revision=246

frontends/yasm/yasm.c
src/main.c

index 11ece76aba4f671ca613543156e98ceaddc1b0cb..1e869dff26c7a818a663458728658bd64fe5e8e3 100644 (file)
 # include <string.h>
 #endif
 
+#include <libintl.h>
+#define _(String)      gettext(String)
+#ifdef gettext_noop
+#define N_(String)     gettext_noop(String)
+#else
+#define N_(String)     (String)
+#endif
+
+#include "bitvect.h"
+
 #include "globals.h"
 #include "errwarn.h"
 
@@ -48,6 +58,12 @@ main(int argc, char *argv[])
 {
     FILE *in;
 
+    /* Initialize BitVector (needed for floating point). */
+    if (BitVector_Boot() != ErrCode_Ok) {
+       fprintf(stderr, _("Could not initialize BitVector"));
+       return EXIT_FAILURE;
+    }
+
     if (argc == 2) {
        in = fopen(argv[1], "rt");
        if (!in) {
index 11ece76aba4f671ca613543156e98ceaddc1b0cb..1e869dff26c7a818a663458728658bd64fe5e8e3 100644 (file)
 # include <string.h>
 #endif
 
+#include <libintl.h>
+#define _(String)      gettext(String)
+#ifdef gettext_noop
+#define N_(String)     gettext_noop(String)
+#else
+#define N_(String)     (String)
+#endif
+
+#include "bitvect.h"
+
 #include "globals.h"
 #include "errwarn.h"
 
@@ -48,6 +58,12 @@ main(int argc, char *argv[])
 {
     FILE *in;
 
+    /* Initialize BitVector (needed for floating point). */
+    if (BitVector_Boot() != ErrCode_Ok) {
+       fprintf(stderr, _("Could not initialize BitVector"));
+       return EXIT_FAILURE;
+    }
+
     if (argc == 2) {
        in = fopen(argv[1], "rt");
        if (!in) {