New version numbering.
[unix-history] / usr / src / usr.bin / tn3270 / tools / mkhits / dohits.c
index 7bc87b8..6d00446 100644 (file)
@@ -1,3 +1,28 @@
+/*
+ *     Copyright (c) 1984-1987 by the Regents of the
+ *     University of California and by Gregory Glenn Minshall.
+ *
+ *     Permission to use, copy, modify, and distribute these
+ *     programs and their documentation for any purpose and
+ *     without fee is hereby granted, provided that this
+ *     copyright and permission appear on all copies and
+ *     supporting documentation, the name of the Regents of
+ *     the University of California not be used in advertising
+ *     or publicity pertaining to distribution of the programs
+ *     without specific prior permission, and notice be given in
+ *     supporting documentation that copying and distribution is
+ *     by permission of the Regents of the University of California
+ *     and by Gregory Glenn Minshall.  Neither the Regents of the
+ *     University of California nor Gregory Glenn Minshall make
+ *     representations about the suitability of this software
+ *     for any purpose.  It is provided "as is" without
+ *     express or implied warranty.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)dohits.c   3.1 (Berkeley) %G%";
+#endif /* not lint */
+
 /*
  * This program scans a file which describes a keyboard.  The output
  * of the program is a series of 'C' declarations which describe a
 /*
  * This program scans a file which describes a keyboard.  The output
  * of the program is a series of 'C' declarations which describe a
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
+#if    defined(unix)
+#include <strings.h>
+#else  /* defined(unix) */
 #include <string.h>
 #include <string.h>
+#endif /* defined(unix) */
 #include <ctype.h>
 #include <ctype.h>
-#include "../ascii/ascebc.h"
-#include "../ctlr/ebc_disp.h"
+#include "../general/general.h"
+#include "../api/asc_ebc.h"
+#include "../api/ebc_disp.h"
 #include "../ctlr/function.h"
 
 #include "dohits.h"
 #include "../ctlr/function.h"
 
 #include "dohits.h"
@@ -41,7 +71,7 @@ char *string;
 
     while (c = *string++) {
        if (c >= 0x60) {
 
     while (c = *string++) {
        if (c >= 0x60) {
-           c - = (0x60+0x20);
+           c -= (0x60+0x20);
        } else {
            c -= 0x20;
        }
        } else {
            c -= 0x20;
        }
@@ -164,7 +194,7 @@ struct Hits *hits;
     }
     if (type[1] == 0) {                /* character */
        hit->ctlrfcn = FCN_CHARACTER;
     }
     if (type[1] == 0) {                /* character */
        hit->ctlrfcn = FCN_CHARACTER;
-       hit->code = ebc_disp[ascebc[AE_IN][type[0]]];
+       hit->code = ebc_disp[asc_ebc[type[0]]];
        return savechr(*type);          /* The character is the name */
     } else {
        for (this = firstentry(type); this; this = this->next) {
        return savechr(*type);          /* The character is the name */
     } else {
        for (this = firstentry(type); this; this = this->next) {