Sindbad~EG File Manager

Current Path : /usr/home/beeson/MathXpert/Localizer/english/
Upload File :
Current File : /usr/home/beeson/MathXpert/Localizer/english/english_2let.c

/* M. Beeson, for MathXpert.
2.17.98 extracted from symsout.c
5.3.13  changed names of exported functions
5.17.24  added "OK"
7.27.24  added "he"

To the translator:  Do not translate this file directly.  It is being
sent to you for information purposes only.  What we need from you to
construct a version of this file for your language is simply a complete
list of all two-letter words used in translating mtext.c, ophelp1.c,
and ophelp2.c.  The text enclosed in quotation marks below is essentially
such a list for the English version, but organized as program code.
You can just supply the list as text, we will organize it into code like this.
*/

#include <string.h>
#include <strings.h>
#include "english1.h"


/*_______________________________________________________________________*/
int English_two_letter_word(char *buffer)
/* return 0 if buffer contains a two-letter word that
occurs in MathXpert's menus or status line text.
Return 1 otherwise.  Buffer is presumed to contain
two characters at least.
*/
{ switch(buffer[0])
    { case 'a':
      case 'A':
         if(!strcasecmp(buffer,"an") ||
            !strcasecmp(buffer,"as") ||
            !strcasecmp(buffer,"at")
                )
            return 0;
         return 1;
      case 'b':
      case 'B':
         if(!strcasecmp(buffer,"by") || !strcasecmp(buffer,"be"))
            return 0;
         return 1;
      case 'd':
      case 'D':
         if(!strcasecmp(buffer,"do"))
            return 0;
         if(!strcasecmp(buffer,"de"))
            return 0;  /* occurs in 'de Moivre' */
         return 1;
      case 'g':
      case 'G':
         if(!strcasecmp(buffer,"go"))
            return 0;
         return 1;
      case 'h':
      case 'H':
         if(!strcasecmp(buffer,"he"))
            return 0;
         return 1;
      case 'i':
      case 'I':
         if(!strcasecmp(buffer,"in") ||
            !strcasecmp(buffer,"if") ||
            !strcasecmp(buffer,"it") ||
            !strcasecmp(buffer,"is")
           )
            return 0;
         return 1;
      case 'l':
         if(!strcasecmp(buffer,"ln"))
            return 0;
         return 1;
      case 'n':
      case 'N':
         if(!strcasecmp(buffer,"no"))
            return 0;
         return 1;
      case 'o':
      case 'O':
         if(!strcasecmp(buffer,"on") || !strcasecmp(buffer,"of")
            || !strcasecmp(buffer,"ok") || !strcasecmp(buffer, "or"))
            return 0;
         return 1;
      case 's':
      case 'S':
         if(!strcasecmp(buffer,"so"))
            return 0;
         return 1;
      case 't':
      case 'T':
         if(!strcasecmp(buffer,"to"))
            return 0;
         return 1;
      case 'u':
      case 'U':
         if(!strcasecmp(buffer,"up"))
            return 0;
         return 1;
      case 'w':
      case 'W':
         if(!strcasecmp(buffer,"we"))
            return 0;
         return 1;
      default:
         return 1;
    }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists