diff --git a/src/anal/GetSel.c b/src/anal/GetSel.c index d6c2760..e9e5f4d 100644 --- a/src/anal/GetSel.c +++ b/src/anal/GetSel.c @@ -21,4 +21,4 @@ char *s2; } } -} \ No newline at end of file +} diff --git a/src/anal/MorphWind.c b/src/anal/MorphWind.c index 772840d..7dc6298 100644 --- a/src/anal/MorphWind.c +++ b/src/anal/MorphWind.c @@ -1100,4 +1100,4 @@ SKErrMess(void) SelectWindow(ErrWindow); DisplayText(ErrMess,(long)strlen(ErrMess)); -} \ No newline at end of file +} diff --git a/src/anal/betamorph.c b/src/anal/betamorph.c index 5abced6..f0a699f 100644 --- a/src/anal/betamorph.c +++ b/src/anal/betamorph.c @@ -23,4 +23,4 @@ _main(void) if( ++nverbs > 10 ) break; } -} \ No newline at end of file +} diff --git a/src/anal/chckcmpstem.c b/src/anal/chckcmpstem.c index 42cb723..9f347ab 100644 --- a/src/anal/chckcmpstem.c +++ b/src/anal/chckcmpstem.c @@ -11,13 +11,13 @@ FILE * f; char stemkeys[LONGSTRING]; int rval = 0; - strcpy(tmp,s); + Xstrcpy(tmp,s); p = tmp; while(*p) p++; p--; if( isdigit(*s) ) return; - strcpy(endkeys,"os_ou os_h_on os_on h_hs a_hs"); + Xstrcpy(endkeys,"os_ou os_h_on os_on h_hs a_hs"); while(p>tmp) { if( *p == 'o' || *p == 'h' ) { *p = 0; diff --git a/src/anal/checkdict.c b/src/anal/checkdict.c index ae399ce..82e98fb 100644 --- a/src/anal/checkdict.c +++ b/src/anal/checkdict.c @@ -46,7 +46,7 @@ checkdict(gk_word *Gkword, gk_string *stem, char *stemkeys) } else zap_morphflag(morphflags_of(Gkword),SYLL_AUGMENT); - strcpy(keyp , GetLemmStem(curkeys,lemma_of(Gkword),stem_of(Gkword))); + Xstrcpy(keyp , GetLemmStem(curkeys,lemma_of(Gkword),stem_of(Gkword))); pbptr = is_substring("pb:",keyp); /* * @@ -85,7 +85,7 @@ fprintf(stderr,"checkdict: stem [%s] endstring [%s] keyp [%s]\n", stem_of(Gkword else { char tmppb[LONGSTRING]; - strcpy(tmppb,pbptr+3); + Xstrcpy(tmppb,pbptr+3); if( *(lastn(tmppb,1)) == ':' ) *(lastn(tmppb,1)) = 0; /* * grc 6/29/89 diff --git a/src/anal/checkgenwds.c b/src/anal/checkgenwds.c index b9147a8..292f80c 100644 --- a/src/anal/checkgenwds.c +++ b/src/anal/checkgenwds.c @@ -86,7 +86,7 @@ printf("\nin checkgenword accword [%s]\n", accword ); if( (prntflags_of(Gkword) & IGNORE_ACCENTS) ) { char wordnoacc[MAXWORDSIZE]; - strcpy(wordnoacc,wordnoacute); + Xstrcpy(wordnoacc,wordnoacute); stripacc(wordnoacc); checks = wordnoacc; @@ -246,7 +246,7 @@ printf("tmphalf1 [%s] s [%s]\n", tmphalf1, s ); if( tmphalf1[0] ) { strcat(tmphalf1,"-"); strcat(tmphalf1,cmplem); - strcpy(cmplem,tmphalf1); + Xstrcpy(cmplem,tmphalf1); } break; } @@ -259,7 +259,7 @@ printf("s [%s] tmplem [%s] tmphalf1 [%s] t [%s] cmplem[%s]\n", s , tmplem , tmph if(!s ) { if( tmphalf1[0] ) strcat(tmphalf1,","); strcat(tmphalf1,t); - strcpy(tmplem,tmphalf1); + Xstrcpy(tmplem,tmphalf1); break; } *s++ = 0; diff --git a/src/anal/checkhalf1.c b/src/anal/checkhalf1.c index 3b63f32..3b78053 100644 --- a/src/anal/checkhalf1.c +++ b/src/anal/checkhalf1.c @@ -21,7 +21,7 @@ checkhalf1(gk_word *Gkword, char *endkeys) /* printf("half1 stem preverb [%s] stem [%s] end [%s]\n", preverb_of(Gkword) , stem_of(Gkword), endstring_of(Gkword)); */ - strcpy(savestem,stem); + Xstrcpy(savestem,stem); if( *stem == 'r' && getbreath(stem) == NOBREATH && cur_lang() == GREEK) { char tmp[MAXWORDSIZE]; @@ -123,7 +123,7 @@ printf("half1 stem preverb [%s] stem [%s] end [%s]\n", preverb_of(Gkword) , stem stripbreath(stem); diaerstem[0] = *stem; diaerstem[1] = DIAERESIS; - strcpy(diaerstem+2,stem+1); + Xstrcpy(diaerstem+2,stem+1); addbreath(diaerstem,cbreath); set_stem(Gkword,diaerstem); rval+=checkhalf2(Gkword,endkeys); @@ -134,7 +134,7 @@ printf("half1 stem preverb [%s] stem [%s] end [%s]\n", preverb_of(Gkword) , stem (AndDialect(dialect_of(Gkword),(Dialect)IONIC)>=0) && cur_lang() != LATIN ) { add_morphflag(morphflags_of(Gkword),UNASP_PREVERB); - strcpy(stem,savestem); + Xstrcpy(stem,savestem); stripbreath(stem); addbreath(stem,ROUGHBR); rval+=checkhalf2(Gkword,endkeys); diff --git a/src/anal/checkstem.c b/src/anal/checkstem.c index 8a85791..8cae273 100644 --- a/src/anal/checkstem.c +++ b/src/anal/checkstem.c @@ -250,13 +250,13 @@ char * s; char stemkeys[1024]; int rval = 0; - strcpy(tmp,s); + Xstrcpy(tmp,s); stemkeys[0] = 0; p = tmp; while(*p) p++; p--; while(p>=tmp) { - strcpy(tmp2,p); + Xstrcpy(tmp2,p); *p = 0; if( (rval += chckstem(tmp,stemkeys,1)) ) { printf("%s-%s\tn\t%s\n", tmp, tmp2, stemkeys ); diff --git a/src/anal/checkstring.c b/src/anal/checkstring.c index 7ff90f8..af49b06 100644 --- a/src/anal/checkstring.c +++ b/src/anal/checkstring.c @@ -71,7 +71,7 @@ cntlems(gk_word *Gkword ) if( strcmp(prevlem,lemma_of(Anal))) { cnt++; } - strcpy(prevlem,lemma_of(Anal)); + Xstrcpy(prevlem,lemma_of(Anal)); } return(cnt); } @@ -110,7 +110,7 @@ checkstring1(gk_word *Gkword) if( ! n /* && ! hasaccent(savework) */) { char tmp[MAXWORDSIZE]; - strcpy(tmp,savework); + Xstrcpy(tmp,savework); if( hasaccent(tmp) ) stripacc(tmp); set_workword(Gkword,"e)/"); Xstrncat(workword_of(Gkword),tmp+1,MAXWORDSIZE); @@ -437,7 +437,7 @@ checkstring3(gk_word *Gkword) cmpend(workword_of(Gkword),"emst",workword) || cmpend(workword_of(Gkword),"omst",workword)) { - strcpy(workword,workword_of(Gkword)); + Xstrcpy(workword,workword_of(Gkword)); workword[strlen(workword)-2] = 0; set_workword(Gkword,workword); rval = checkstring3(Gkword); @@ -451,7 +451,7 @@ checkstring3(gk_word *Gkword) /* ...us + est written as ...ust */ if (cmpend(workword_of(Gkword), "ust", workword)) { - strcpy(workword, workword_of(Gkword)); + Xstrcpy(workword, workword_of(Gkword)); workword[strlen(workword) - 1] = 0; set_workword(Gkword,workword); rval = checkstring3(Gkword); @@ -467,7 +467,7 @@ checkstring3(gk_word *Gkword) if (cmpend(workword_of(Gkword), "ist", workword) || cmpend(workword_of(Gkword), "ost", workword)) { - strcpy(workword, workword_of(Gkword)); + Xstrcpy(workword, workword_of(Gkword)); workword[strlen(workword) - 1] = 0; /* try -is first */ set_workword(Gkword,workword); workval = checkstring3(Gkword); @@ -495,7 +495,7 @@ checkstring3(gk_word *Gkword) { if (cmpend(workword_of(Gkword), "n", workword)) { - strcpy(workword, workword_of(Gkword)); + Xstrcpy(workword, workword_of(Gkword)); workword[strlen(workword) - 1] = 's'; /* ...s-ne -> ...n */ set_workword(Gkword, workword); workval = checkstring3(Gkword); @@ -575,7 +575,7 @@ checkstring3(gk_word *Gkword) */ if( cur_lang() == LATIN ) { char * a = workword; - strcpy(workword,saveword); + Xstrcpy(workword,saveword); if( u2v(workword) ) { set_workword(Gkword,workword); rval = checkstring3(Gkword); @@ -584,13 +584,13 @@ checkstring3(gk_word *Gkword) return(rval); } } - strcpy(workword,saveword); + Xstrcpy(workword,saveword); } /* If we're out of ideas in Italian, turn all u's to v's. */ else if ( (cur_lang() == ITALIAN) && !totanal_of(Gkword)) { char *a; - strcpy(workword,saveword); + Xstrcpy(workword,saveword); for (a = workword, acount = 0; *a != '\0'; a++) { if (*a == 'U') { @@ -612,7 +612,7 @@ checkstring3(gk_word *Gkword) } } - strcpy(workword,saveword); + Xstrcpy(workword,saveword); } /* @@ -627,7 +627,7 @@ checkstring3(gk_word *Gkword) */ if( cur_lang() == LATIN ) { char * a = workword; - strcpy(workword,saveword); + Xstrcpy(workword,saveword); if( *a == 'I' ) { *a = 'J'; @@ -671,7 +671,7 @@ checkstring3(gk_word *Gkword) char* p_word = NULL; char* p_tail = NULL; char* p_start = NULL; - strcpy(workword, workword_of(Gkword)); + Xstrcpy(workword, workword_of(Gkword)); p_word = workword; p_word += 2; switch (*p_word) diff --git a/src/anal/deverb.c b/src/anal/deverb.c index 8fbff51..ccc9251 100644 --- a/src/anal/deverb.c +++ b/src/anal/deverb.c @@ -33,15 +33,15 @@ main() line[lastchar] = '\0'; transkeys[0] = keys[0] = reskeys[0] = 0; - strcpy(tmp,line); + Xstrcpy(tmp,line); s = line; - strcpy(curlemma,line); + Xstrcpy(curlemma,line); firstkey(curlemma); while(*s&&!isspace(*s)) s++; while(isspace(*s)) *s++ = 0; - strcpy(needlemma,s); + Xstrcpy(needlemma,s); firstkey(needlemma); while(*s&&!isspace(*s)) s++; while(isspace(*s)) *s++ = 0; @@ -54,10 +54,10 @@ main() while(*s&&!isspace(*s)) s++; if(*s) *s++ = 0; while(isspace(*s)) s++; - strcpy(keys,s); + Xstrcpy(keys,s); stripquant(p); stripstemsep(p); - strcpy(tmpstem,p); + Xstrcpy(tmpstem,p); /*printf("curlemma [%s] needlemma [%s] tmpstem [%s] keys [%s]\n", curlemma, needlemma, tmpstem, keys );*/ rval = testcmpstem(needlemma,tmpstem,reskeys,keys,transkeys); @@ -95,8 +95,8 @@ testcmpstem(char *needlemma,char *stem,char * stemkeys,char* matchkeys,char * tr while(s>stem) { Gstr = BlankGstr; fullprevb[0] = 0; - strcpy(half2,s); - strcpy(rawprvb,stem); + Xstrcpy(half2,s); + Xstrcpy(rawprvb,stem); rawprvb[strlen(rawprvb) - strlen(s)] = 0; set_gkstring(&Gstr,half2); if( is_preverb(rawprvb,fullprevb,&Gstr) ) { @@ -134,7 +134,7 @@ testcmpstem2(char *needlemma,char *stem,char * stemkeys,char* matchkeys,char * t if( ! rval ) { char tmpstem[BUFSIZ]; if( *stem == 'h' ) { - strcpy(tmpstem,stem); + Xstrcpy(tmpstem,stem); tmpstem[0] = 'e'; rval=testcmpstem3(needlemma,tmpstem, stemkeys, matchkeys,transkeys); if(rval) { @@ -162,7 +162,7 @@ testcmpstem3(char*needlemma,char *stem,char * stemkeys,char* matchkeys,char*tran if( *stem == 'r' && getbreath(stem) == NOBREATH ) { - if( *(stem+1) == 'r' ) strcpy(stem,stem+1); /* rr --> r */ + if( *(stem+1) == 'r' ) Xstrcpy(stem,stem+1); /* rr --> r */ Xstrncpy(tmp,"r(",(int)sizeof tmp); Xstrncat(tmp,stem+1,(int)sizeof tmp); Xstrncpy(stem,tmp,BUFSIZ); @@ -173,7 +173,7 @@ testcmpstem3(char*needlemma,char *stem,char * stemkeys,char* matchkeys,char*tran if( Is_vowel(*stem) && getbreath(stem) == NOBREATH && cur_lang() != LATIN ) { - strcpy(savestem,stem); + Xstrcpy(savestem,stem); /* * check for rough breathing */ @@ -182,11 +182,11 @@ testcmpstem3(char*needlemma,char *stem,char * stemkeys,char* matchkeys,char*tran rval = checkvcomp(needlemma,stem, stemkeys,matchkeys); if( rval ) return(rval); - strcpy(stem,savestem); + Xstrcpy(stem,savestem); addbreath(stem,SMOOTHBR); rval = checkvcomp(needlemma,stem, stemkeys,matchkeys); if( rval ) return(rval); - strcpy(stem,savestem); + Xstrcpy(stem,savestem); } rval = checkvcomp(needlemma,stem, stemkeys,matchkeys); /*if( rval ) printf("%d:[%s] [%s] [%s]\n", rval, stem, stemkeys, matchkeys);*/ @@ -200,18 +200,18 @@ checkvcomp(char * needlemma,char * stem,char * stemkeys,char * matchkeys) *stemkeys = 0; - strcpy(mbuf,matchkeys); + Xstrcpy(mbuf,matchkeys); rval = chcknstem(stem,stemkeys); if( rval ) rval = comNomstemtypes(needlemma,stem,stemkeys,matchkeys); if( rval ) return(rval); - strcpy(matchkeys,mbuf); + Xstrcpy(matchkeys,mbuf); *stemkeys = 0; rval = chckvstem(stem,stemkeys); if( rval ) rval = comstemtypes1(needlemma,stem,stemkeys,matchkeys); if( rval ) return(NOMMATCH); - strcpy(matchkeys,mbuf); + Xstrcpy(matchkeys,mbuf); *stemkeys = 0; if( ! rval ) rval = checkforderiv(stem, stemkeys); @@ -219,7 +219,7 @@ checkvcomp(char * needlemma,char * stem,char * stemkeys,char * matchkeys) if( rval ) rval = comstemtypes1(needlemma,stem,stemkeys,matchkeys); if( rval ) return(NOMMATCH); stemkeys[0] = 0; - strcpy(matchkeys,mbuf); + Xstrcpy(matchkeys,mbuf); return(0); } @@ -240,109 +240,109 @@ comNomstemtypes(char * needlemma,char * stem,char * stemkeys,char * matchkeys) int rval = 0; tmpkeys[0] = tmpstem[0] = 0; - strcpy(mbuf,matchkeys); - strcpy(tmpstem,stemkeys); + Xstrcpy(mbuf,matchkeys); + Xstrcpy(tmpstem,stemkeys); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if( rval ) return( NOMMATCH ); /*printf("stem [%s] stemkeys [%s] mbuf [%s]\n", stem,stemkeys,mbuf );*/ if( !strncmp("os_h_on",matchkeys,strlen("os_h_on"))) { - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"os_ou"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"os_ou"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH); } if( !strncmp("os_on",matchkeys,strlen("os_on"))) { - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"h_hs os_ou a_hs"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"h_hs os_ou a_hs"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH); - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"os_h_on"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"os_h_on"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(ADJMATCH); - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"hs_ou"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"hs_ou"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH); - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"hs_eos"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"hs_eos"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH); if( stem[strlen(stem)-1] == 'm' ) { char tmps[BUFSIZ]; - strcpy(tmps,stem); - strcpy(stemkeys,tmpstem); + Xstrcpy(tmps,stem); + Xstrcpy(stemkeys,tmpstem); tmps[strlen(tmps)-1] = 0; - strcpy(mbuf,"ma_matos"); + Xstrcpy(mbuf,"ma_matos"); rval = comstemtypes1(needlemma,tmps,stemkeys,mbuf); if(rval) return(MAMATCH); } } if( !strncmp("os_h_on",matchkeys,strlen("os_h_on"))) { - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"os_on"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"os_on"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(ADJMATCH); - strcpy(stemkeys,tmpstem); + Xstrcpy(stemkeys,tmpstem); } if( !strncmp("hs_es",matchkeys,strlen("hs_es"))) { - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"hs_eos os_ou h_hs a_hs ws_oos"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"hs_eos os_ou h_hs a_hs ws_oos"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH2); - strcpy(stemkeys,tmpstem); + Xstrcpy(stemkeys,tmpstem); } if( !strncmp("wn_on",matchkeys,strlen("wn_on"))) { - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"wn_onos"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"wn_onos"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH2); - strcpy(stemkeys,tmpstem); + Xstrcpy(stemkeys,tmpstem); } if( !strncmp("is_idos",matchkeys,strlen("is_idos"))) { - strcpy(stemkeys,tmpstem); + Xstrcpy(stemkeys,tmpstem); /* * grc 9/7/94 * note: this allows us to go from is_idos_adj --> is_idos * as in dusmhn is_idos_adj --> mhn is_idos */ - strcpy(mbuf,"is_idos is_ews"); + Xstrcpy(mbuf,"is_idos is_ews"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH2); - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"h_hs"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"h_hs"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH2); - strcpy(stemkeys,tmpstem); + Xstrcpy(stemkeys,tmpstem); } if( !strncmp("us_eia_u",matchkeys,strlen("us_eia_u"))) { - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"us_uos uLs_uos us_ews"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"us_uos uLs_uos us_ews"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH2); - strcpy(stemkeys,tmpstem); + Xstrcpy(stemkeys,tmpstem); } if( !strncmp("oos_oon",matchkeys,strlen("oos_oon"))) { - strcpy(stemkeys,tmpstem); - strcpy(mbuf,"oos_oou"); + Xstrcpy(stemkeys,tmpstem); + Xstrcpy(mbuf,"oos_oou"); rval = comstemtypes1(needlemma,stem,stemkeys,mbuf); if(rval) return(NOMMATCH2); - strcpy(stemkeys,tmpstem); + Xstrcpy(stemkeys,tmpstem); } return(0); @@ -368,7 +368,7 @@ printf("needlemma [%s] stemkeys [%s] match [%s]\n", needlemma, stemkeys , matchk if(rval && *needlemma) { char * sp; char curbuf[BUFSIZ]; - strcpy(tmp,needlemma); + Xstrcpy(tmp,needlemma); strcat(tmp,":"); curbuf[0] = 0; @@ -389,7 +389,7 @@ printf("needlemma [%s] stemkeys [%s] match [%s]\n", needlemma, stemkeys , matchk if( !curbuf[0] ) { return(0); } - strcpy(stemkeys,curbuf); + Xstrcpy(stemkeys,curbuf); } return(rval); } diff --git a/src/anal/digmain.c b/src/anal/digmain.c index b341eeb..e7c38bd 100644 --- a/src/anal/digmain.c +++ b/src/anal/digmain.c @@ -26,7 +26,7 @@ main(void) if(line[0] == 'y' ) { fprintf(stderr,"type in forms\n"); - strcpy(outname,"out.morph"); + Xstrcpy(outname,"out.morph"); finput = stdin; } else { if((finput=MorphFopen(NOMINDEX,"r")) == NULL) { @@ -37,10 +37,10 @@ main(void) fprintf(stderr,"word file? "); gets(fname); - strcpy(inpname,fname); + Xstrcpy(inpname,fname); strcat(inpname,".words"); - strcpy(outname,fname); + Xstrcpy(outname,fname); strcat(outname,".morph"); if((finput=fopen(inpname,"r")) == NULL) { diff --git a/src/anal/digstring.c b/src/anal/digstring.c index 0e0668e..6c6bb8b 100644 --- a/src/anal/digstring.c +++ b/src/anal/digstring.c @@ -57,7 +57,7 @@ digstring1(gk_word *Gkword) if( ! n /* && ! hasaccent(savework) */) { char tmp[MAXWORDSIZE]; - strcpy(tmp,savework); + Xstrcpy(tmp,savework); if( hasaccent(tmp) ) stripacc(tmp); set_workword(Gkword,"e)/"); Xstrncat(workword_of(Gkword),tmp+1,MAXWORDSIZE); diff --git a/src/anal/docrasis.c b/src/anal/docrasis.c index b315dd0..4eaa61f 100644 --- a/src/anal/docrasis.c +++ b/src/anal/docrasis.c @@ -45,7 +45,7 @@ do_crasis(gk_string *gstring, char *crasis) if( !strcmp(crasis, CrasTab[i].crasis ) ) { saw_this_crasis++; if( num == CrasTab[i].w_number && (gend & CrasTab[i].w_gender) && (wcase & CrasTab[i].w_case) ) { - strcpy(crasis,CrasTab[i].curstring); + Xstrcpy(crasis,CrasTab[i].curstring); return(1); } } @@ -65,13 +65,13 @@ do_crasis(gk_string *gstring, char *crasis) /* if( ! strcmp(crasis,"o(")) { if( num == PLURAL && gend == FEMININE && wcase == NOMINATIVE ) { - strcpy(crasis,"ai("); + Xstrcpy(crasis,"ai("); return(1); } else if( num == PLURAL && gend == MASCULINE && wcase == NOMINATIVE ) { - strcpy(crasis,"oi("); + Xstrcpy(crasis,"oi("); return(1); } else if( num == SINGULAR && gend == FEMININE && wcase == NOMINATIVE ) { - strcpy(crasis,"h("); + Xstrcpy(crasis,"h("); return(1); } else if( num == SINGULAR && gend == MASCULINE && wcase == NOMINATIVE ) { return(1); @@ -80,4 +80,4 @@ do_crasis(gk_string *gstring, char *crasis) } */ return(1); -} \ No newline at end of file +} diff --git a/src/anal/findbase.c b/src/anal/findbase.c index f528a8a..7f38467 100644 --- a/src/anal/findbase.c +++ b/src/anal/findbase.c @@ -14,7 +14,7 @@ main() if (line[lastchar] == '\n') line[lastchar] = '\0'; - strcpy(line,line+4); + Xstrcpy(line,line+4); if( is_substring("ew_",line) || is_substring("aw_",line)) { check_ew(line); } else if( is_substring("i h_hs",line)) { @@ -34,7 +34,7 @@ char *p; char *s; int rval = 0; - strcpy(workstem,p); + Xstrcpy(workstem,p); stripmetachars(workstem); s=workstem; while(*s&&!isspace(*s)) s++; @@ -66,7 +66,7 @@ char * p; while(*s&&!isspace(*s)) s++; if(isspace(*s)&&s!=p) s--; *s = 0; - strcpy(stembuf,p); + Xstrcpy(stembuf,p); stripmetachars(stembuf); rval = chckstem(stembuf,stemkeys,1); if( rval ) rval = 2; diff --git a/src/anal/multstdiomorph.c b/src/anal/multstdiomorph.c index a738acb..24ed6ef 100644 --- a/src/anal/multstdiomorph.c +++ b/src/anal/multstdiomorph.c @@ -32,10 +32,10 @@ char *s; long nhits = 0; char * p; - strcpy(inpname,s); + Xstrcpy(inpname,s); strcat(inpname,".words"); - strcpy(outname,s); + Xstrcpy(outname,s); strcat(outname,".morph"); if((finput=fopen(inpname,"r")) == NULL) { @@ -54,7 +54,7 @@ char *s; while(fgets(line,(int)sizeof line,finput)) { /* printf("%s %s %d\n", line, prevl , dictstrcmp(line,prevl) ); - strcpy(prevl,line); + Xstrcpy(prevl,line); continue; */ trimwhite(line); diff --git a/src/anal/nextgkword.c b/src/anal/nextgkword.c index a771263..1bd03e5 100644 --- a/src/anal/nextgkword.c +++ b/src/anal/nextgkword.c @@ -75,4 +75,4 @@ printdump(char *s) } if( ! fdumpout ) return; fprintf(fdumpout,"%s\r", s ); -} \ No newline at end of file +} diff --git a/src/anal/np_scan.c b/src/anal/np_scan.c index c7656b0..8e97655 100644 --- a/src/anal/np_scan.c +++ b/src/anal/np_scan.c @@ -42,23 +42,23 @@ printf("%d:[%s] [%s]\n", rval, line ,destPath ); foutput = stdout; ffailed = stdout; } else { - strcpy(fname,argv[1]); - strcpy(inpname,fname); + Xstrcpy(fname,argv[1]); + Xstrcpy(inpname,fname); strcat(inpname,".words"); /* fprintf(stderr,"destination directory? (press return for same as source)"); */ if (argc == 3) { - strcpy(destPath,argv[2]); - strcpy(outname,destPath); + Xstrcpy(destPath,argv[2]); + Xstrcpy(outname,destPath); strcat(outname,":"); strcat(outname,fname); strcat(outname,".morph"); } else { - strcpy(outname,fname); + Xstrcpy(outname,fname); strcat(outname,".morph"); - strcpy(failedname,fname); + Xstrcpy(failedname,fname); strcat(failedname,".failed"); } @@ -96,7 +96,7 @@ printf("%d:[%s] [%s]\n", rval, line ,destPath ); */ /* printf("%s %s %d\n", line, prevl , dictstrcmp(line,prevl) ); - strcpy(prevl,line); + Xstrcpy(prevl,line); continue; */ @@ -133,7 +133,7 @@ printf("%d:[%s] [%s]\n", rval, line ,destPath ); if( string_time >= long_time && nwords > 0 && rval ) { long_time = string_time; - strcpy(long_string,line); + Xstrcpy(long_string,line); fprintf(stderr,":longtime\t%.2f\t%s\n", long_time, long_string ); } } diff --git a/src/anal/prntalph.c b/src/anal/prntalph.c index d258c69..d9d823d 100644 --- a/src/anal/prntalph.c +++ b/src/anal/prntalph.c @@ -121,7 +121,7 @@ void alpheiosDumpWord(gk_word* gkword, PrntFlags prntflags, FILE* fout) if (*curlem) fprintf(fout, "\n"); - strcpy(curlem, lemma_of(nxtAnalysis)); + Xstrcpy(curlem, lemma_of(nxtAnalysis)); /* start new entry */ fprintf(fout, "\n"); diff --git a/src/anal/prntanal.c b/src/anal/prntanal.c index 61de3fc..6770a6c 100644 --- a/src/anal/prntanal.c +++ b/src/anal/prntanal.c @@ -93,7 +93,7 @@ int lemmflag; Anal = analysis_of(Gkword)+i; if( strcmp(curlem,lemma_of(Anal) ) ) { difflems ++; - strcpy(curlem,lemma_of(Anal)); + Xstrcpy(curlem,lemma_of(Anal)); } if( (strchr(lemma_of(Anal),'-') == NULL ) ) { goodanals++; @@ -127,7 +127,7 @@ DumpLemmaInfo(gk_word *Gkword, PrntFlags prntflags, FILE *f) if( (strchr(lemma_of(Anal),'-') == NULL ) || (goodanals == totanal_of(Gkword)) ) { fprintf(f,"%s\n", lemma_of(Anal) ); } - strcpy(curlem,lemma_of(Anal)); + Xstrcpy(curlem,lemma_of(Anal)); } } } @@ -161,7 +161,7 @@ PrntOneAnalysis(gk_analysis *Gkanal, PrntFlags prntflags, FILE *f) sprintf(wtmp,"%s\t%s %d\t", rawword_of(Gkanal), lemma_of(Gkanal) ,curan ); Xstrncat(pbuf,wtmp,MAXANALYSES * 128); curan = 0; - strcpy(wtmp,"\n"); + Xstrcpy(wtmp,"\n"); } goto finish; } @@ -286,7 +286,7 @@ dump_all_anals(gk_word *Gkword, PrntFlags prntflags, FILE *fout) if( strcmp(rawword_of(Anal),workword_of(Anal)) ) { char tmp[MAXWORDSIZE]; - strcpy(tmp,workword_of(Anal)); + Xstrcpy(tmp,workword_of(Anal)); stripquant(tmp); fprintf(fout,"%s", strcmp(rawword_of(Anal),tmp) ? tmp : "" ); @@ -299,7 +299,7 @@ dump_all_anals(gk_word *Gkword, PrntFlags prntflags, FILE *fout) fprintf(fout,"%s\n",printedwork ? "\t" : "", lemma_of(Anal) ); */ DumpPerseusAnalysis(Gkword,prntflags,Anal,fout,i+1); - strcpy(curlem,lemma_of(Anal)); + Xstrcpy(curlem,lemma_of(Anal)); } continue; } @@ -373,7 +373,7 @@ DumpPerseusAnalysis( if( strcmp(rawword_of(anal),workword_of(anal)) ) { char tmp[MAXWORDSIZE]; - strcpy(tmp,workword_of(anal)); + Xstrcpy(tmp,workword_of(anal)); /* grc 2/7/97 -- don't punt the quantity stripquant(tmp); */ @@ -542,7 +542,7 @@ DumpOneAnalysis(gk_word *Gkword, PrntFlags prntflags, gk_analysis *anal, FILE *f JakeSprintGkFlags(anal,tmp," "," ",1); if(preverb_of(anal)[0] ) { - strcpy(workw,preverb_of(anal) ); + Xstrcpy(workw,preverb_of(anal) ); strcat(workw,"-"); } if(aug1_of(anal)[0] ) { diff --git a/src/anal/proclems.c b/src/anal/proclems.c index 129bda8..0842d53 100644 --- a/src/anal/proclems.c +++ b/src/anal/proclems.c @@ -25,7 +25,7 @@ getlem(char *s, char *lem) char *p; if(*s == '-' ) { - strcpy(lem,firsthalf); + Xstrcpy(lem,firsthalf); while(*lem) lem++; } else *lem = 0; @@ -33,7 +33,7 @@ getlem(char *s, char *lem) *lem = 0; if((p=strchr(savelem,'-')) && *savelem != '-') { - strcpy(firsthalf,savelem); + Xstrcpy(firsthalf,savelem); *(strchr(firsthalf,'-')) = 0; } } diff --git a/src/anal/propname.c b/src/anal/propname.c index 896f3e0..57bdfd6 100644 --- a/src/anal/propname.c +++ b/src/anal/propname.c @@ -34,7 +34,7 @@ main(void) if(line[0] == 'y' ) { fprintf(stderr,"type in forms\n"); - strcpy(outname,"out.morph"); + Xstrcpy(outname,"out.morph"); finput = stdin; } else { fprintf(stderr,"word file? "); @@ -45,13 +45,13 @@ main(void) if (fname[lastchar] == '\n') fname[lastchar] = '\0'; - strcpy(inpname,fname); + Xstrcpy(inpname,fname); strcat(inpname,".words"); - strcpy(outname,fname); + Xstrcpy(outname,fname); strcat(outname,".morph"); - strcpy(newname,fname); + Xstrcpy(newname,fname); strcat(newname,".nstem"); if((finput=fopen(inpname,"r")) == NULL) { @@ -79,7 +79,7 @@ main(void) if (fname[lastchar] == '\n') fname[lastchar] = '\0'; } - strcpy(tmp,fname); + Xstrcpy(tmp,fname); strcat(tmp,".enames"); fpnames = fopen(tmp,"r"); if( !fpnames ) { @@ -97,7 +97,7 @@ main(void) while(fgets(line,sizeof line,finput)) { /* printf("%s %s %d\n", line, prevl , dictstrcmp(line,prevl) ); - strcpy(prevl,line); + Xstrcpy(prevl,line); continue; */ trimwhite(line); @@ -155,7 +155,7 @@ checkpropname(char *s, FILE *f) char xlit[BUFSIZ]; int rval = 0; - strcpy(tmpname,s); + Xstrcpy(tmpname,s); endkeys[0] = 0; /* printf("%s\n", s); @@ -163,7 +163,7 @@ printf("%s\n", s); wp = tmpname; while( *wp ) { - strcpy(curend,wp); + Xstrcpy(curend,wp); stripacc(curend); stripdiaer(curend); Xstrncpy(half1,tmpname,sizeof half1); @@ -190,7 +190,7 @@ tryxlits(FILE *f, char *xlit, char *keys, char *fulls, char *half1, char *ends) char workkey[BUFSIZ]; int rval = 0; - strcpy(workkey,keys); + Xstrcpy(workkey,keys); possbuf[0] = 0; while(nextkey(workkey,curkey) ) { @@ -206,12 +206,12 @@ Xliterate(char *s1, char *s2) char tmp[BUFSIZ]; int add_h = 0; - strcpy(tmp,s1); + Xstrcpy(tmp,s1); if( getbreath(tmp) == ROUGHBR) { add_h = 1; } - strcpy(tmp,s1+1); + Xstrcpy(tmp,s1+1); stripbreath(tmp); stripacc(tmp); stripdiaer(tmp); @@ -219,14 +219,14 @@ Xliterate(char *s1, char *s2) if( add_h ) { if( tmp[0] == 'r' ) { - strcpy(s2,"rh"); + Xstrcpy(s2,"rh"); strcat(s2,tmp+1); } else { - strcpy(s2,"h"); + Xstrcpy(s2,"h"); strcat(s2,tmp); } } else - strcpy(s2,tmp); + Xstrcpy(s2,tmp); *s2 = toupper(*s2); } @@ -291,12 +291,12 @@ checkposs(FILE *fout, char *xlit, char *curs, char *fulls, char *stems, char *en int rval = 0; int poss = 0; - strcpy(tmpstem,stems); + Xstrcpy(tmpstem,stems); stripacc(tmpstem); for(i=0;Nom_tab[i].stype[0];i++) { if( ! strcmp(curs,Nom_tab[i].stype) ) { - strcpy(tmpxlit,xlit); + Xstrcpy(tmpxlit,xlit); strcat(tmpxlit,Nom_tab[i].suffix); if( is_propname(tmpxlit) ) { sprintf(tmpkeys,"%s", Nom_tab[i].keys ); @@ -409,8 +409,8 @@ reliterate(char *s) while(*s) { for(i=0;Xlit_list[i].raw[0];i++) { if( ! Xstrncmp(s,Xlit_list[i].raw,Xstrlen(Xlit_list[i].raw) ) ) { - strcpy(tmp,s+Xstrlen(Xlit_list[i].raw) ); - strcpy(s,Xlit_list[i].done); + Xstrcpy(tmp,s+Xstrlen(Xlit_list[i].raw) ); + Xstrcpy(s,Xlit_list[i].done); strcat(s,tmp); s += Xstrlen(Xlit_list[i].done); sawone = 1; @@ -431,7 +431,7 @@ AlphStrcmp(char *s1, char *s2) char * p = s2; char tmp[MAXWORDSIZE]; - strcpy(tmp,s1); + Xstrcpy(tmp,s1); while(*p) { if( *p == 'a' && *(tmp+(p-s2)) == 'e' ) { *(tmp+(p-s2)) = 'a'; @@ -457,7 +457,7 @@ init_pnametab() } if(line[strlen(line)-1] == '\n') line[strlen(line)-1] = 0; pnametab[pnames] = (char*) malloc((size_t)strlen(line)+1); - strcpy(pnametab[pnames],line); + Xstrcpy(pnametab[pnames],line); } } diff --git a/src/anal/prvb.c b/src/anal/prvb.c index c27a36c..720e8bd 100644 --- a/src/anal/prvb.c +++ b/src/anal/prvb.c @@ -70,7 +70,7 @@ fprintf(stderr,"start with ending [%s]\n", endstring_of(Gkword) ); if( (dialect_of(&WorkGkword) & PROSE) ) continue; - strcpy(stem_of(&WorkGkword),stem_of(&WorkGkword)+1); + Xstrcpy(stem_of(&WorkGkword),stem_of(&WorkGkword)+1); add_morphflag(morphflags_of(prvb_gstr_of(&WorkGkword)),DOUBLED_CONS); add_dialect(stem_gstr_of(&WorkGkword),(EPIC|POETIC)); } diff --git a/src/anal/seek_compound.c b/src/anal/seek_compound.c index 7bc11f3..6b119f4 100644 --- a/src/anal/seek_compound.c +++ b/src/anal/seek_compound.c @@ -5,4 +5,4 @@ seek_compound(s) char *s; { -} \ No newline at end of file +} diff --git a/src/anal/stdiomorph.c b/src/anal/stdiomorph.c index 6101542..ea2cd30 100644 --- a/src/anal/stdiomorph.c +++ b/src/anal/stdiomorph.c @@ -111,7 +111,7 @@ char *argv[]; if (!strcmp(optarg,"-")) fstats = foutput = ffailed = stdout; else { - strcpy(outname,optarg); + Xstrcpy(outname,optarg); sprintf(failedname,"%s.failed",outname); sprintf(statsname,"%s.stats",outname); printf("outname [%s]\n", outname ); @@ -128,8 +128,8 @@ printf("outname [%s]\n", outname ); fstats = ffailed = stdout; } else { - strcpy(fname,argv[optind++]); - strcpy(inpname,fname); + Xstrcpy(fname,argv[optind++]); + Xstrcpy(inpname,fname); strcat(inpname,".words"); if (optind >= argc) { @@ -140,7 +140,7 @@ printf("outname [%s]\n", outname ); } fprintf(stdout,"files: [%s] [%s]\n", outname, failedname); } else { - strcpy(destPath,argv[optind]); + Xstrcpy(destPath,argv[optind]); sprintf(outname,"%s%c%s.morph",destPath, PATH_SEP, fname); } @@ -180,7 +180,7 @@ fprintf(stdout,"files: [%s] [%s]\n", outname, failedname); */ /* printf("%s %s %d\n", line, prevl , dictstrcmp(line,prevl) ); - strcpy(prevl,line); + Xstrcpy(prevl,line); continue; */ @@ -210,7 +210,7 @@ fprintf(stdout,"files: [%s] [%s]\n", outname, failedname); if( cur_lang() != LATIN && ! rval && (flags & IGNORE_ACCENTS) ) { char tmpform[BUFSIZ]; - strcpy(tmpform,line); + Xstrcpy(tmpform,line); stripbreath(tmpform); addbreath(tmpform,')'); rval = checkstring(tmpform,flags,foutput); @@ -227,7 +227,7 @@ fprintf(stdout,"files: [%s] [%s]\n", outname, failedname); if( string_time >= long_time && nwords > 0 && rval ) { long_time = string_time; - strcpy(long_string,line); + Xstrcpy(long_string,line); fprintf(stderr,":longtime\t%.2f\t%s\n", long_time, long_string ); } } diff --git a/src/auto/beta_smk.c b/src/auto/beta_smk.c index 99fa070..734863c 100644 --- a/src/auto/beta_smk.c +++ b/src/auto/beta_smk.c @@ -28,7 +28,7 @@ char * result; smkinited++; init_smk(); } - strcpy(result,Xlit_table[c]); + Xstrcpy(result,Xlit_table[c]); } init_smk() @@ -37,7 +37,7 @@ init_smk() char tmp[80]; for(i=0;i"); + Xstrcpy(cur_char,"<#1b>"); add_cur_char(-1); sync_source(); s++; @@ -814,7 +814,7 @@ tlg_punct() skip_num_arg(); if( n < MAX_PUNCT ) { - strcpy(cur_char, cur_punct[n] ); + Xstrcpy(cur_char, cur_punct[n] ); } else { switch( n ) { /* @@ -868,7 +868,7 @@ tlg_punct() case 22: /* french circumflex */ if( cur_device == FILEFORMAT ) - strcpy(cur_char,"\\*^"); + Xstrcpy(cur_char,"\\*^"); if( cur_device == AVT ) { if( *Cp == 'e' ) sprintf(cur_char,"\016e\b>\017"); @@ -902,7 +902,7 @@ tlg_punct() break; case 24: /* the hell with "~" on an n etc., for now at any rate */ - strcpy(cur_char,"~"); + Xstrcpy(cur_char,"~"); break; case 25: /* c cedila */ @@ -951,11 +951,11 @@ int len; if( cur_font == GREEK && in_rev_vid ) { char tmp[128]; - strcpy( tmp , cur_char ); + Xstrcpy( tmp , cur_char ); cur_char[0] = 0; in_rev_vid = 0; to_greek(); - strcpy( cur_char , tmp ); + Xstrcpy( cur_char , tmp ); } #ifndef SUNTOOL @@ -964,9 +964,9 @@ int len; /* don't do anything if the first char is already control char */ if( cur_char[0] > ' ' ) { - strcpy(tmp,cur_char); + Xstrcpy(tmp,cur_char); to_roman(); - strcpy(cur_char,tmp); + Xstrcpy(cur_char,tmp); add_cur_char(len); to_greek(); /* @@ -1010,10 +1010,10 @@ int print_flag; fprintf(fout,"%s", line ); return(0); } - strcpy(gk_lbuf , line ); + Xstrcpy(gk_lbuf , line ); return( strlen(gk_lbuf) ); } - strcpy(source_buf,line); + Xstrcpy(source_buf,line); s = source_buf; if( *s == '~' ) { /* @@ -1037,7 +1037,7 @@ fprintf(fout,"%s", newline ); } return(0); } else { - strcpy( gk_lbuf , s+1 ); + Xstrcpy( gk_lbuf , s+1 ); return( strlen(gk_lbuf) ); } } @@ -1295,7 +1295,7 @@ to_bold_greek() to_greek() { - strcpy(cur_char, esc_tgreek ); + Xstrcpy(cur_char, esc_tgreek ); add_cur_char(0); cur_font = GREEK; } @@ -1303,7 +1303,7 @@ to_greek() to_roman() { - strcpy(cur_char, esc_troman ); + Xstrcpy(cur_char, esc_troman ); add_cur_char(0); cur_font = ROMAN; } @@ -1547,7 +1547,7 @@ got_match(val,curc) int val; int curc; { - strcpy( match_buf , text_buf ); + Xstrcpy( match_buf , text_buf ); match_val = val; if( curc == 0 ) { @@ -1606,7 +1606,7 @@ int len; sval++; /* tline = malloc( strlen(tab_ptr->look_for) + 1); - strcpy( tline, tab_ptr->look_for); + Xstrcpy( tline, tab_ptr->look_for); */ keys[sval] = tab_ptr->look_for; if ( tkenter( Tree, tab_ptr->look_for, sval ) == FAILURE ) @@ -1651,9 +1651,9 @@ tlg_quote() /* if number is above MAX_QUOTE, simply print "default" bracket */ if( n < MAX_QUOTE ) - strcpy( cur_char , *(quote_tab + n) ); + Xstrcpy( cur_char , *(quote_tab + n) ); else - strcpy( cur_char , *quote_tab ); + Xstrcpy( cur_char , *quote_tab ); add_non_alph(-1); skip_num_arg(); @@ -1677,9 +1677,9 @@ tlg_brackets() brack_tab = rbrack_tab; /* if number is above MAX_BRACKET, simply print "default" bracket */ if( n < MAX_BRACKET ) - strcpy( cur_char , *(brack_tab + n) ); + Xstrcpy( cur_char , *(brack_tab + n) ); else - strcpy( cur_char , *brack_tab ); + Xstrcpy( cur_char , *brack_tab ); add_non_alph(-1); skip_num_arg(); diff --git a/src/auto/qtest.c b/src/auto/qtest.c index 1a30f34..0e47a8f 100644 --- a/src/auto/qtest.c +++ b/src/auto/qtest.c @@ -49,7 +49,7 @@ main() } else { qline = malloc( strlen(cline) + 1); - strcpy( qline, cline); + Xstrcpy( qline, cline); if ( qadd( &qline, queue ) == FAILURE ) printf("queue full\n"); } diff --git a/src/auto/rstest.c b/src/auto/rstest.c index c8028e6..f907d2b 100644 --- a/src/auto/rstest.c +++ b/src/auto/rstest.c @@ -60,7 +60,7 @@ main() else { qline = malloc( strlen(cline) + 1); - strcpy( qline,cline); + Xstrcpy( qline,cline); if ( rspush( &qline,rstack) == FAILURE) printf("stack full\n"); } diff --git a/src/auto/stest.c b/src/auto/stest.c index e34113f..5f04bda 100644 --- a/src/auto/stest.c +++ b/src/auto/stest.c @@ -28,7 +28,7 @@ main() } else { qline = malloc( strlen(cline) + 1); - strcpy( qline,cline); + Xstrcpy( qline,cline); if ( spush( &qline,stack) == FAILURE) printf("stack full\n"); } diff --git a/src/auto/ttest.c b/src/auto/ttest.c index 34f1a81..d643f5f 100644 --- a/src/auto/ttest.c +++ b/src/auto/ttest.c @@ -35,7 +35,7 @@ main() if ( !compiled ) { sval++; tline = malloc( strlen(cline) + 1); - strcpy( tline, cline); + Xstrcpy( tline, cline); keys[sval] = tline; if ( tkenter( Tree, tline, sval ) == FAILURE ) printf("Can't enter %s\n", tline); diff --git a/src/auto/ttestm.c b/src/auto/ttestm.c index 34f1a81..d643f5f 100644 --- a/src/auto/ttestm.c +++ b/src/auto/ttestm.c @@ -35,7 +35,7 @@ main() if ( !compiled ) { sval++; tline = malloc( strlen(cline) + 1); - strcpy( tline, cline); + Xstrcpy( tline, cline); keys[sval] = tline; if ( tkenter( Tree, tline, sval ) == FAILURE ) printf("Can't enter %s\n", tline); diff --git a/src/auto/ttestp.c b/src/auto/ttestp.c index f3efa4f..cba0de0 100644 --- a/src/auto/ttestp.c +++ b/src/auto/ttestp.c @@ -35,7 +35,7 @@ main() if ( !compiled ) { sval++; tline = malloc( strlen(cline) + 1); - strcpy( tline, cline); + Xstrcpy( tline, cline); keys[sval] = tline; if ( tkenter( Tree, tline, sval ) == FAILURE ) printf("Can't enter %s\n", tline); diff --git a/src/gener/combconj.c b/src/gener/combconj.c index caaa719..97f4dca 100644 --- a/src/gener/combconj.c +++ b/src/gener/combconj.c @@ -20,10 +20,10 @@ char * localkeys; char preverb[MAXWORDSIZE]; preverb[0] = suffbuf[0] = oddkeys[0] = 0; - strcpy(origformula , origline); - strcpy(curlemma , lemma); + Xstrcpy(origformula , origline); + Xstrcpy(curlemma , lemma); - strcpy(stembuf,stemstr); + Xstrcpy(stembuf,stemstr); /* fprintf(stdout,"stemstr [%s] derivstr [%s] keys [%s]\n", stemstr, derivstr, localkeys ); @@ -134,7 +134,7 @@ char * preverb; TmpGkword = (gk_word *) CreatGkword(1); /*printf("suffstr [%s] keys [%s]\n", suffstr, keys );*/ - strcpy(keytmp,keys); + Xstrcpy(keytmp,keys); s = keytmp; while(*s&&*s!=' ') { @@ -142,7 +142,7 @@ char * preverb; *s = ' '; s++; } - strcpy(ppartname,"pp_"); + Xstrcpy(ppartname,"pp_"); nextkey(keytmp,ppartname+3); stype = GetStemClass(ppartname,npparts); @@ -156,13 +156,13 @@ char * preverb; */ nextkey(keytmp,suffstr); - strcpy(suffstr,suffstr+1); + Xstrcpy(suffstr,suffstr+1); } if( * globalkeys ) { char tmp[LONGSTRING]; sprintf(tmp,"%s %s", globalkeys , keytmp); - strcpy(keytmp,tmp); + Xstrcpy(keytmp,tmp); } ScanAsciiKeys(keytmp,TmpGkword,gstr,NULL); @@ -170,12 +170,12 @@ char * preverb; add_morphflags(gstr,morphflags_of(prvb_gstr_of(TmpGkword)) ); if( oddkeys_of(TmpGkword) ) - strcpy(oddkeys,oddkeys_of(TmpGkword) ); + Xstrcpy(oddkeys,oddkeys_of(TmpGkword) ); else oddkeys[0] = 0; preverb[0] = 0; - strcpy(preverb,preverb_of(TmpGkword)); + Xstrcpy(preverb,preverb_of(TmpGkword)); set_gkstring(gstr,endstring_of(TmpGkword) ); @@ -229,7 +229,7 @@ printf("str1 [%s] str2 [%s] rval %d\n", gkstring_of(gstr1), gkstring_of(gstr2), Dialect d, AndDialect(); char *getaccp(); - strcpy(word,stemstr); + Xstrcpy(word,stemstr); if( has_morphflag(morphflags_of(gstr1),PRES_REDUPL)) { pres_redupl(word); @@ -263,7 +263,7 @@ printf("str1 [%s] str2 [%s] rval %d\n", gkstring_of(gstr1), gkstring_of(gstr2), } if( *stemstr == ROUGHBR || * stemstr == SMOOTHBR ) { - strcpy(word,ep); + Xstrcpy(word,ep); addbreath(word,*stemstr); } else { conjoinX(gstr2,word,gkstring_of(gstr2)); @@ -345,7 +345,7 @@ printf("str1 [%s] str2 [%s] rval %d\n", gkstring_of(gstr1), gkstring_of(gstr2), zap_morphflag(morphflags_of(gstr2),R_E_I_ALPHA); - strcpy(domains_of(gstr2),domains_of(gstr1)); + Xstrcpy(domains_of(gstr2),domains_of(gstr1)); SprintGkFlags(gstr2,showbuf," ",0); /* fflush(fout);*/ if( stemtype_of(gstr2) & PPARTMASK ) fprintf(fout,":vs:"); @@ -362,8 +362,8 @@ printf("str1 [%s] str2 [%s] rval %d\n", gkstring_of(gstr1), gkstring_of(gstr2), if( *preverb ) { char tmppb[MAXWORDSIZE*2]; - if( rpb_flag ) strcpy(tmppb,"rpb:"); - else strcpy(tmppb,"pb:"); + if( rpb_flag ) Xstrcpy(tmppb,"rpb:"); + else Xstrcpy(tmppb,"pb:"); strcat(tmppb,preverb); fprintf(fout," %s", tmppb ); } @@ -409,7 +409,7 @@ char * oddptr; char curformula[BUFSIZ*4]; char * s; return; - strcpy(curformula,origformula); + Xstrcpy(curformula,origformula); curbuf[0] = 0; s = curformula; @@ -445,7 +445,7 @@ MatchSuff(char * s1,char * s2) char tmp[BUFSIZ]; if( !strcmp(s1,s2) ) return(1); - strcpy(tmp,s1); + Xstrcpy(tmp,s1); stripshortmark(tmp); if( !strcmp(s2,tmp) ) return(1); @@ -482,7 +482,7 @@ conjoinX(gk_string *gstr,char * s1,char * s2) } */ *gstr = *newgstr; - strcpy(s1,gkstring_of(newgstr)); + Xstrcpy(s1,gkstring_of(newgstr)); return(i); } diff --git a/src/gener/conjmain.c b/src/gener/conjmain.c index 279c765..aab4dfb 100644 --- a/src/gener/conjmain.c +++ b/src/gener/conjmain.c @@ -39,7 +39,7 @@ char * argv[]; fullconj = 1; } - strcpy(filename,"conjfile"); + Xstrcpy(filename,"conjfile"); if( (f=fopen(filename,"r")) == NULL ) { fprintf(stdout,"Filename?\n" ); diff --git a/src/gener/conjsys.c b/src/gener/conjsys.c index 2204eb7..166f4cb 100644 --- a/src/gener/conjsys.c +++ b/src/gener/conjsys.c @@ -45,7 +45,7 @@ int conjmode; fullconj = conjmode; while(fgets(linebuf,sizeof linebuf,fin) ) { - strcpy(saveline,linebuf); + Xstrcpy(saveline,linebuf); if( !strncmp(linebuf,"@fullconj",strlen("@fullconj")) ) { fullconj = 1; continue; @@ -72,7 +72,7 @@ int conjmode; if( has_pref(linebuf,":vs:" ) ) { wantpparts = 0; derivbuf[0] = 0; - strcpy(vsbuf,linebuf); + Xstrcpy(vsbuf,linebuf); fprintf(fout,"%s", linebuf ); continue; } @@ -94,9 +94,9 @@ int conjmode; wantpparts = 1; if( linebuf[strlen(linebuf)-1] == '\n' ) linebuf[strlen(linebuf)-1] = 0; - strcpy(origline,linebuf); + Xstrcpy(origline,linebuf); nextkey(linebuf,stembuf); - strcpy(stembuf,stembuf+4); + Xstrcpy(stembuf,stembuf+4); nextkey(linebuf,globalkeys); /* * keys that are attached directly to the derivstr are inherited by @@ -160,7 +160,7 @@ int conjmode; char *s; fprintf(fout,"%s", linebuf ); - strcpy(cobuf,linebuf); + Xstrcpy(cobuf,linebuf); s = cobuf; while(*s&&!isspace(*s)) s++; while(isspace(*s))s++; @@ -170,8 +170,8 @@ int conjmode; len = strlen(linebuf); if( linebuf[len-1] == '\n'); linebuf[len-1] = 0; - strcpy(tkeys, linebuf+1 ); - strcpy(savekeys,linebuf+1); + Xstrcpy(tkeys, linebuf+1 ); + Xstrcpy(savekeys,linebuf+1); s = savekeys; while(*s&&!isspace(*s)) s++; if( isspace(*s) ) *(s++) = 0; @@ -251,7 +251,7 @@ set_newlemma(s) char *s; { *(s+strlen(s)-1) = 0; - strcpy(curlemma,s+4); + Xstrcpy(curlemma,s+4); derivbuf[0] = 0; } @@ -264,7 +264,7 @@ char * s; if(is_empty(s) ) return(1); - strcpy(buf1,s); + Xstrcpy(buf1,s); nextkey(buf1,buf2); if( ! buf2[0] ) return(1); @@ -318,7 +318,7 @@ char *s; if(*s ==',') s++; } } - strcpy(tmpkeys,s); + Xstrcpy(tmpkeys,s); s = tmpkeys; while(*s&&!isspace(*s)) { @@ -378,7 +378,7 @@ FILE * fout; fprintf(fout,"-%s", s ); if( fullconj ) return(1); - strcpy(tmpglobs,vsbuf); + Xstrcpy(tmpglobs,vsbuf); p = tmpglobs; while(*p&&!isspace(*p)) p++; while(isspace(*p)) p++; @@ -386,7 +386,7 @@ FILE * fout; if(*p==',') *p = ' '; p++; } - strcpy(tmpvsbuf1,tmpglobs); + Xstrcpy(tmpvsbuf1,tmpglobs); *p = 0; ScanAsciiKeys(s+1,&TmpGkword,&CurGstr,NULL); @@ -434,7 +434,7 @@ char * s; */ if( fullconj ) return(1); - strcpy(tmpglobs,cobuf); + Xstrcpy(tmpglobs,cobuf); p = tmpglobs; while(*p&&!isspace(*p)) p++; while(isspace(*p)) p++; @@ -442,7 +442,7 @@ char * s; if(*p==',') *p = ' '; p++; } - strcpy(tmpcobuf1,tmpglobs); + Xstrcpy(tmpcobuf1,tmpglobs); *p = 0; sprintf(tmpcobuf2,"%s%s", tmpglobs,s+1); diff --git a/src/gener/gensimpmain.c b/src/gener/gensimpmain.c index a7ed736..54f463c 100644 --- a/src/gener/gensimpmain.c +++ b/src/gener/gensimpmain.c @@ -16,7 +16,7 @@ char * argv[]; int i = 0; - strcpy(filename,"morphfile"); + Xstrcpy(filename,"morphfile"); if( (f=fopen(filename,"r")) == NULL ) { fprintf(stdout,"Filename?\n" ); gets(filename); @@ -27,9 +27,9 @@ char * argv[]; } /* if(argc == 1 ) - strcpy(filename,"morphfile"); + Xstrcpy(filename,"morphfile"); else - strcpy(filename,argv[2] ); + Xstrcpy(filename,argv[2] ); if( (f=fopen(filename,"r")) == NULL ) { fprintf(stderr,"Could not open [%s]\n", filename ); exit(-1); diff --git a/src/gener/genstemform.c b/src/gener/genstemform.c index 7acac83..d5ef3d9 100644 --- a/src/gener/genstemform.c +++ b/src/gener/genstemform.c @@ -24,10 +24,10 @@ int CompGkForms(gk_word *gkform1, gk_word *gkform2); char saveline[BUFSIZ*4]; fflush(fout); - strcpy(saveline,line); + Xstrcpy(saveline,line); *Gkword = Blnk; if( ! strncmp(line,":le:",4) ) { - strcpy(curlemma,line+4); + Xstrcpy(curlemma,line+4); if( curlemma[strlen(curlemma)-1] == '\n' ) curlemma[strlen(curlemma)-1] = 0; fprintf(fout,"%s", line ); diff --git a/src/gener/gensynform.c b/src/gener/gensynform.c index 8c1af4b..2434988 100644 --- a/src/gener/gensynform.c +++ b/src/gener/gensynform.c @@ -48,7 +48,7 @@ static int print_mode = FULL_DUMP; while( fgets(line,sizeof line,f ) ) { char saveline[BUFSIZ*2]; - strcpy(saveline,line); + Xstrcpy(saveline,line); showdialect = 0; if( is_blank(line) ) { @@ -464,8 +464,8 @@ printf("formcnt=%d\n", formcnt); if( print_mode == MORPH_INFO ) { char tmplem[BUFSIZ]; - strcpy(tmp,workword_of(gkform)); - strcpy(tmplem,lemma_of(gkform)); + Xstrcpy(tmp,workword_of(gkform)); + Xstrcpy(tmplem,lemma_of(gkform)); stripmetachars(tmp); stripdiaer(tmp); standalpha(tmplem); @@ -474,7 +474,7 @@ printf("formcnt=%d\n", formcnt); if( strcmp(tmp,tmplem)) { char tmp2[BUFSIZ]; - strcpy(tmp2,workword_of(gkform)); + Xstrcpy(tmp2,workword_of(gkform)); standalpha(tmp2); stripmetachars(tmp2); stripdiaer(tmp2); @@ -641,7 +641,7 @@ register char * s; { while(*s) { if( *s == '-' ) { - strcpy(s,s+1); + Xstrcpy(s,s+1); continue; } s++; @@ -653,7 +653,7 @@ register char * s; { while(*s) { if( *s == '!' ) { - strcpy(s,s+1); + Xstrcpy(s,s+1); continue; } s++; @@ -704,8 +704,8 @@ is_exception(char *s1, char * s2) { char tmp1[BUFSIZ], tmp2[BUFSIZ]; - strcpy(tmp1,s1); - strcpy(tmp2,s2); + Xstrcpy(tmp1,s1); + Xstrcpy(tmp2,s2); /* * if one ends in oos or ous, see if the other does too diff --git a/src/gener/genwd.c b/src/gener/genwd.c index 19edeca..2d8bfe0 100644 --- a/src/gener/genwd.c +++ b/src/gener/genwd.c @@ -50,7 +50,7 @@ GenDictEntry(Gkword,dentry) stripmetachars(workword_of(gkforms)); /* printf("workword:%s\n", workword_of(gkforms) );*/ - strcpy(dentry,workword_of(gkforms)); + Xstrcpy(dentry,workword_of(gkforms)); FreeGkword(gkforms); } @@ -131,7 +131,7 @@ gk_word * /* Xstrncpy(stemkeys,keys,LONGSTRING); */ - strcpy(stemkeys,keys); + Xstrcpy(stemkeys,keys); /* * ok, we want to process the keys associated with this stem, and then diff --git a/src/gener/getdefs.c b/src/gener/getdefs.c index 7095109..4028d3b 100644 --- a/src/gener/getdefs.c +++ b/src/gener/getdefs.c @@ -12,26 +12,26 @@ _main() while(gets(line)) { if( !strncmp(line,":le:",4) ) { - strcpy(curlemma,line+4); + Xstrcpy(curlemma,line+4); s = curlemma+strlen(curlemma)-1; while(isspace(*s) && s>curlemma) *s-- = 0; continue; } if(line[0] !=':' && line[0] != '?' && line[0] != ';' && line[0] != '@' ) { if( line[0] == '[' ) { - strcpy(number,line+1); + Xstrcpy(number,line+1); s = line+1; while(*s && *s!=']') s++; if( *s ) *s++ = 0; } else { s = line; - strcpy(number,"0"); + Xstrcpy(number,"0"); } while(*s && isspace(*s)) s++; - strcpy(defstr,s); + Xstrcpy(defstr,s); printf("%s\t%s\t%s\n", curlemma, number, defstr ); } } -} \ No newline at end of file +} diff --git a/src/gener/havelemma.c b/src/gener/havelemma.c index 407f558..8fa2315 100644 --- a/src/gener/havelemma.c +++ b/src/gener/havelemma.c @@ -16,7 +16,7 @@ char * lemmastr; if( ! lemmentries ) if( ! init_lemmentries() ) return(0); - strcpy(tmplemm,lemmastr); + Xstrcpy(tmplemm,lemmastr); stripquant(tmplemm); stripdiaer(tmplemm); @@ -50,7 +50,7 @@ init_lemmentries() p = &line[strlen(line)-1]; while(isspace(*p)&&p>line) *p-- = 0; /* zap newline */ - strcpy(*(lemmentries+i),line); + Xstrcpy(*(lemmentries+i),line); } /* fprintf(stderr,"%d lemmas first %s last %s\n", diff --git a/src/gener/ppasstype.c b/src/gener/ppasstype.c index 0cd4d6b..6110e36 100644 --- a/src/gener/ppasstype.c +++ b/src/gener/ppasstype.c @@ -13,7 +13,7 @@ gk_string * gstr; if( ! get_ppasstype(origstem,newstem,stemname) ) return; - strcpy(origstem,newstem); + Xstrcpy(origstem,newstem); set_stemtype(gstr,GetStemNum(stemname)); } @@ -27,8 +27,8 @@ char * stemname; if( Is_vowel(*(lastn(stem,1))) ) return(0); - strcpy(newstem,stem); - strcpy(stemname,"perfp_vow"); + Xstrcpy(newstem,stem); + Xstrcpy(stemname,"perfp_vow"); if( ! ppass_table ) { ppass_table = load_euph_tab(PPASSLIST,&nppass); @@ -38,7 +38,7 @@ char * stemname; p = gkstring_of(ppass_table+i); if( ends_in(stem,p) ) { *(lastn(newstem,strlen(p))) = 0; - strcpy(stemname,p+MAXSUBSTRING); + Xstrcpy(stemname,p+MAXSUBSTRING); return(1); } diff --git a/src/gener/stypemain.c b/src/gener/stypemain.c index 48c5a3d..647e7b6 100644 --- a/src/gener/stypemain.c +++ b/src/gener/stypemain.c @@ -18,7 +18,7 @@ main() line[lastchar] = '\0'; if( !strncmp(":le:",line,4)) { - strcpy(curlemma,line+4); + Xstrcpy(curlemma,line+4); continue; } if( strncmp(":no:",line,4) && strncmp(":wd:",line,4) && strncmp(":aj:",line,4) ) continue; diff --git a/src/gkdict/compnoun.c b/src/gkdict/compnoun.c index e2d1790..d6e4541 100644 --- a/src/gkdict/compnoun.c +++ b/src/gkdict/compnoun.c @@ -18,7 +18,7 @@ checkforcompnoun(char * curstem,char * endkeys,char * stemkeys) if( (Is_vowel(*(s-1))||Is_vowel(*s) ||Is_breath(*(s-1)) ) && is_nomhead(s,headkeys) ) { printf("[%s] [%s] [%s]\n", curstem, headkeys , endkeys); n = comstemtypes(curstem,headkeys,endkeys); - strcpy(firsth,curstem); + Xstrcpy(firsth,curstem); firsth[strlen(curstem)-strlen(s)] = 0; if(n) { char * p; @@ -56,7 +56,7 @@ setup_headtab() if( line[0] != '#' ) continue; headtab[nheads] = malloc(strlen(line)); line[strlen(line)-1] = 0; - strcpy(headtab[nheads],line+1); + Xstrcpy(headtab[nheads],line+1); nheads++; } fclose(fheads); @@ -73,13 +73,13 @@ is_nomhead(char * heads,char * headkeys) char *s; if( ! init_headtab ) setup_headtab(); - strcpy(tmphead,heads); + Xstrcpy(tmphead,heads); stripacc(tmphead); strcat(tmphead,"\t"); headkeys[0] = 0; for(i=0;ih(")) strcpy(curg,"fem"); - if(!strcmp(gend,"to/")) strcpy(curg,"neut"); - else strcpy(curg,"masc"); + if(!strcmp(gend,"h(")) Xstrcpy(curg,"fem"); + if(!strcmp(gend,"to/")) Xstrcpy(curg,"neut"); + else Xstrcpy(curg,"masc"); sprintf(tmptags,"os_ou suff_acc %s", curg ); dump_nom(stem,3,tmptags); @@ -237,7 +237,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"os_ou masc pl"); + Xstrcpy(tmptags,"os_ou masc pl"); checkaccent(stem,&syllno,&curacc); if( syllno == ULTIMA ) { strcat(tmptags," suff_acc"); @@ -257,7 +257,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"hs_ou masc pl"); + Xstrcpy(tmptags,"hs_ou masc pl"); checkaccent(stem,&syllno,&curacc); if( syllno == ULTIMA ) { strcat(tmptags," suff_acc"); @@ -277,7 +277,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(curg,"masc"); + Xstrcpy(curg,"masc"); sprintf(tmptags,"hs_ou %s", curg ); checkaccent(stem,&syllno,&curacc); @@ -293,7 +293,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"os_ou neut pl"); + Xstrcpy(tmptags,"os_ou neut pl"); checkaccent(stem,&syllno,&curacc); if( nsylls(stem)>2 && syllno == PENULT ) { strcat(tmptags, " stem_acc"); @@ -307,7 +307,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"hs_eos neut"); + Xstrcpy(tmptags,"hs_eos neut"); checkaccent(stem,&syllno,&curacc); if( nsylls(stem)>2 && syllno == PENULT ) { strcat(tmptags, " stem_acc"); @@ -322,7 +322,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"os_ou neut"); + Xstrcpy(tmptags,"os_ou neut"); checkaccent(stem,&syllno,&curacc); if( nsylls(stem)>2 && syllno == PENULT ) { strcat(tmptags, " stem_acc"); @@ -337,8 +337,8 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - if(!strcmp(gend,"h(")) strcpy(curg,"fem"); - else strcpy(curg,"masc"); + if(!strcmp(gend,"h(")) Xstrcpy(curg,"fem"); + else Xstrcpy(curg,"masc"); sprintf(tmptags,"os_ou %s", curg ); checkaccent(stem,&syllno,&curacc); @@ -381,7 +381,7 @@ int dump_nom(char *stem,int trunc, char * tags) int dump_entry(char *stem,int trunc, char * tags,char * etag, FILE * fout) { char shorts[BUFSIZ]; - strcpy(shorts,stem); + Xstrcpy(shorts,stem); stripmetachars(stem); shorts[strlen(shorts)-trunc] = 0; if(shorts[strlen(shorts)-1] == '-') @@ -923,13 +923,13 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) char skeys[BUFSIZ]; if( !strcmp(key2,"o(") && !strcmp(key2,"h(")) - strcpy(skeys,"s_qos masc fem"); + Xstrcpy(skeys,"s_qos masc fem"); else if( !strcmp(key2,"o(") ) - strcpy(skeys,"s_qos masc"); + Xstrcpy(skeys,"s_qos masc"); else if( !strcmp(key2,"h(") ) - strcpy(skeys,"s_qos fem"); + Xstrcpy(skeys,"s_qos fem"); else - strcpy(skeys,"s_qos fem"); + Xstrcpy(skeys,"s_qos fem"); dump_nom(stem,1,skeys); return(1); } @@ -941,13 +941,13 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) int curacc = 0; if( !strcmp(key2,"o(") && !strcmp(key2,"h(")) - strcpy(skeys,"gc_ggos masc fem"); + Xstrcpy(skeys,"gc_ggos masc fem"); else if( !strcmp(key2,"o(") ) - strcpy(skeys,"gc_ggos masc"); + Xstrcpy(skeys,"gc_ggos masc"); else if( !strcmp(key2,"h(") ) - strcpy(skeys,"gc_ggos fem"); + Xstrcpy(skeys,"gc_ggos fem"); else - strcpy(skeys,"gc_ggos fem"); + Xstrcpy(skeys,"gc_ggos fem"); if(nsylls(stem) > 2 ) { if(syllno = PENULT ) strcat(skeys," ant_acc" ); @@ -964,13 +964,13 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) int curacc = 0; if( !strcmp(key2,"o(") && !strcmp(key2,"h(")) - strcpy(skeys,"c_ktos masc fem"); + Xstrcpy(skeys,"c_ktos masc fem"); else if( !strcmp(key2,"o(") ) - strcpy(skeys,"c_ktos masc"); + Xstrcpy(skeys,"c_ktos masc"); else if( !strcmp(key2,"h(") ) - strcpy(skeys,"c_ktos fem"); + Xstrcpy(skeys,"c_ktos fem"); else - strcpy(skeys,"c_ktos fem"); + Xstrcpy(skeys,"c_ktos fem"); if(nsylls(stem) > 2 ) { if(syllno = PENULT ) strcat(skeys," ant_acc" ); @@ -987,13 +987,13 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) int curacc = 0; if( !strcmp(key2,"o(") && !strcmp(key2,"h(")) - strcpy(skeys,"c_gos masc fem"); + Xstrcpy(skeys,"c_gos masc fem"); else if( !strcmp(key2,"o(") ) - strcpy(skeys,"c_gos masc"); + Xstrcpy(skeys,"c_gos masc"); else if( !strcmp(key2,"h(") ) - strcpy(skeys,"c_gos fem"); + Xstrcpy(skeys,"c_gos fem"); else - strcpy(skeys,"c_gos fem"); + Xstrcpy(skeys,"c_gos fem"); if(nsylls(stem) > 2 ) { if(syllno = PENULT ) strcat(skeys," ant_acc" ); @@ -1054,8 +1054,8 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) /* * kludge to get the long mark in over the last consonant */ - strcpy(tmpstem,stem); - strcpy(tmpstem+strlen(stem)-3,"u_/s"); + Xstrcpy(tmpstem,stem); + Xstrcpy(tmpstem+strlen(stem)-3,"u_/s"); dump_nom(tmpstem,2,"s_qos fem stem_acc"); return(1); @@ -1333,7 +1333,7 @@ int is_adverb(char *stem,char * key1) char tmp[BUFSIZ]; - strcpy(tmp,stem); + Xstrcpy(tmp,stem); standword(tmp); printf(":le:%s%s\n:wd:%s adverb\n\n", tmp, numsuff, stem ); /* @@ -1351,7 +1351,7 @@ dump_acc_nom(char * stem,int trunc,char * tag) char tmpstem[BUFSIZ]; int syllno, curacc; - strcpy(tmpstem,stem); + Xstrcpy(tmpstem,stem); *(tmpstem+strlen(tmpstem)-trunc) = 0; checkaccent(tmpstem,&syllno,&curacc); diff --git a/src/gkdict/newlems.c b/src/gkdict/newlems.c index fe6af60..786e9af 100644 --- a/src/gkdict/newlems.c +++ b/src/gkdict/newlems.c @@ -19,15 +19,15 @@ main() if (line[lastchar] == '\n') line[lastchar] = '\0'; - strcpy(savel,line); + Xstrcpy(savel,line); hp = strtok(line," \t"); if( ! hp ) continue; hp = strchr(line,'-'); - strcpy(curw,line); + Xstrcpy(curw,line); if(hp==line) buildw(curw,half1,line); /*sprintf(curw,"%s%s", half1, line);*/ else if( hp) { - strcpy(half1,line); + Xstrcpy(half1,line); half1[hp-line] = 0; stripacc(half1); } @@ -53,7 +53,7 @@ checkcurw(char*curw) char keybuf[BUFSIZ]; int rval = 0; - strcpy(tmp,curw); + Xstrcpy(tmp,curw); keybuf[0] = 0; stripmetachars(tmp); diff --git a/src/gkdict/newlems2.c b/src/gkdict/newlems2.c index 6478eda..ec61367 100644 --- a/src/gkdict/newlems2.c +++ b/src/gkdict/newlems2.c @@ -34,21 +34,21 @@ main() if( ! line[0]) continue; if( ! isdigit(line[0])) continue; - strcpy(savel,line); + Xstrcpy(savel,line); firstkey[0] = seckey[0] = thrdkey[0] = 0; /* skip tokens 1 and 3, but keep #2 */ s = strtok(line," \t"); s = strtok((char * )NULL," \t"); - strcpy(curw,s); + Xstrcpy(curw,s); if( is_verb(curw) ) continue; s=strtok((char * )NULL," \t"); s=strtok((char * )NULL," \t"); - if(s) strcpy(firstkey,s); + if(s) Xstrcpy(firstkey,s); s=strtok((char * )NULL," \t"); - if(s) strcpy(seckey,s); + if(s) Xstrcpy(seckey,s); s=strtok((char * )NULL," \t"); - if(s) strcpy(thrdkey,s); + if(s) Xstrcpy(thrdkey,s); if( ! strncmp(firstkey,"h(")) strcpy(curg,"fem"); - if(!strcmp(gend,"to/")) strcpy(curg,"neut"); - else strcpy(curg,"masc"); + if(!strcmp(gend,"h(")) Xstrcpy(curg,"fem"); + if(!strcmp(gend,"to/")) Xstrcpy(curg,"neut"); + else Xstrcpy(curg,"masc"); sprintf(tmptags,"os_ou suff_acc %s", curg ); dump_nom(stem,3,tmptags); @@ -202,7 +202,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"os_ou masc pl"); + Xstrcpy(tmptags,"os_ou masc pl"); checkaccent(stem,&syllno,&curacc); if( syllno == ULTIMA ) { strcat(tmptags," suff_acc"); @@ -222,7 +222,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"hs_ou masc pl"); + Xstrcpy(tmptags,"hs_ou masc pl"); checkaccent(stem,&syllno,&curacc); if( syllno == ULTIMA ) { strcat(tmptags," suff_acc"); @@ -242,7 +242,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(curg,"masc"); + Xstrcpy(curg,"masc"); sprintf(tmptags,"hs_ou %s", curg ); checkaccent(stem,&syllno,&curacc); @@ -258,7 +258,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"os_ou neut pl"); + Xstrcpy(tmptags,"os_ou neut pl"); checkaccent(stem,&syllno,&curacc); if( nsylls(stem)>2 && syllno == PENULT ) { strcat(tmptags, " stem_acc"); @@ -272,7 +272,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"hs_eos neut"); + Xstrcpy(tmptags,"hs_eos neut"); checkaccent(stem,&syllno,&curacc); if( nsylls(stem)>2 && syllno == PENULT ) { strcat(tmptags, " stem_acc"); @@ -287,7 +287,7 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - strcpy(tmptags,"os_ou neut"); + Xstrcpy(tmptags,"os_ou neut"); checkaccent(stem,&syllno,&curacc); if( nsylls(stem)>2 && syllno == PENULT ) { strcat(tmptags, " stem_acc"); @@ -302,8 +302,8 @@ do_simpnom(char* stem,char* gend) int syllno, curacc; char curg[BUFSIZ], tmptags[BUFSIZ]; - if(!strcmp(gend,"h(")) strcpy(curg,"fem"); - else strcpy(curg,"masc"); + if(!strcmp(gend,"h(")) Xstrcpy(curg,"fem"); + else Xstrcpy(curg,"masc"); sprintf(tmptags,"os_ou %s", curg ); checkaccent(stem,&syllno,&curacc); @@ -346,7 +346,7 @@ int dump_nom(char *stem,int trunc, char * tags) int dump_entry(char *stem,int trunc, char * tags,char * etag, FILE * fout) { char shorts[BUFSIZ]; - strcpy(shorts,stem); + Xstrcpy(shorts,stem); stripmetachars(stem); shorts[strlen(shorts)-trunc] = 0; if(shorts[strlen(shorts)-1] == '-') @@ -396,13 +396,13 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) char skeys[BUFSIZ]; if( !strcmp(key2,"o(") && !strcmp(key2,"h(")) - strcpy(skeys,"s_qos masc fem"); + Xstrcpy(skeys,"s_qos masc fem"); else if( !strcmp(key2,"o(") ) - strcpy(skeys,"s_qos masc"); + Xstrcpy(skeys,"s_qos masc"); else if( !strcmp(key2,"h(") ) - strcpy(skeys,"s_qos fem"); + Xstrcpy(skeys,"s_qos fem"); else - strcpy(skeys,"s_qos fem"); + Xstrcpy(skeys,"s_qos fem"); dump_nom(stem,1,skeys); return(1); } @@ -414,13 +414,13 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) int curacc = 0; if( !strcmp(key2,"o(") && !strcmp(key2,"h(")) - strcpy(skeys,"gc_ggos masc fem"); + Xstrcpy(skeys,"gc_ggos masc fem"); else if( !strcmp(key2,"o(") ) - strcpy(skeys,"gc_ggos masc"); + Xstrcpy(skeys,"gc_ggos masc"); else if( !strcmp(key2,"h(") ) - strcpy(skeys,"gc_ggos fem"); + Xstrcpy(skeys,"gc_ggos fem"); else - strcpy(skeys,"gc_ggos fem"); + Xstrcpy(skeys,"gc_ggos fem"); if(nsylls(stem) > 2 ) { if(syllno = PENULT ) strcat(skeys," ant_acc" ); @@ -437,13 +437,13 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) int curacc = 0; if( !strcmp(key2,"o(") && !strcmp(key2,"h(")) - strcpy(skeys,"c_ktos masc fem"); + Xstrcpy(skeys,"c_ktos masc fem"); else if( !strcmp(key2,"o(") ) - strcpy(skeys,"c_ktos masc"); + Xstrcpy(skeys,"c_ktos masc"); else if( !strcmp(key2,"h(") ) - strcpy(skeys,"c_ktos fem"); + Xstrcpy(skeys,"c_ktos fem"); else - strcpy(skeys,"c_ktos fem"); + Xstrcpy(skeys,"c_ktos fem"); if(nsylls(stem) > 2 ) { if(syllno = PENULT ) strcat(skeys," ant_acc" ); @@ -460,13 +460,13 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) int curacc = 0; if( !strcmp(key2,"o(") && !strcmp(key2,"h(")) - strcpy(skeys,"c_gos masc fem"); + Xstrcpy(skeys,"c_gos masc fem"); else if( !strcmp(key2,"o(") ) - strcpy(skeys,"c_gos masc"); + Xstrcpy(skeys,"c_gos masc"); else if( !strcmp(key2,"h(") ) - strcpy(skeys,"c_gos fem"); + Xstrcpy(skeys,"c_gos fem"); else - strcpy(skeys,"c_gos fem"); + Xstrcpy(skeys,"c_gos fem"); if(nsylls(stem) > 2 ) { if(syllno = PENULT ) strcat(skeys," ant_acc" ); @@ -527,8 +527,8 @@ do_regnom(char*stem,char*key1,char*key2,char * key3) /* * kludge to get the long mark in over the last consonant */ - strcpy(tmpstem,stem); - strcpy(tmpstem+strlen(stem)-3,"u_/s"); + Xstrcpy(tmpstem,stem); + Xstrcpy(tmpstem+strlen(stem)-3,"u_/s"); dump_nom(tmpstem,2,"s_qos fem stem_acc"); return(1); @@ -805,7 +805,7 @@ int is_adverb(char *stem,char * key1) char tmp[BUFSIZ]; - strcpy(tmp,stem); + Xstrcpy(tmp,stem); standword(tmp); printf(":le:%s\n:wd:%s adverb\n\n", tmp, stem ); /* @@ -823,7 +823,7 @@ dump_acc_nom(char * stem,int trunc,char * tag) char tmpstem[BUFSIZ]; int syllno, curacc; - strcpy(tmpstem,stem); + Xstrcpy(tmpstem,stem); *(tmpstem+strlen(tmpstem)-trunc) = 0; checkaccent(tmpstem,&syllno,&curacc); diff --git a/src/gkdict/xderivio.c b/src/gkdict/xderivio.c index 76813b4..efaeff5 100644 --- a/src/gkdict/xderivio.c +++ b/src/gkdict/xderivio.c @@ -192,7 +192,7 @@ checkcomderiv(char *derivstr, char *suffix, char *lkeys, char *rkeys, int had_re s++; while(*s&&*s!=':') s++; if(*s) s++; - strcpy(curderiv,s); + Xstrcpy(curderiv,s); p = tmpderivstr; while(*p&&*p!=':') p++; @@ -248,4 +248,4 @@ printf("about to add [%s]\n", tmp2 ); } return(rval); -} \ No newline at end of file +} diff --git a/src/gkends/acccompos.c b/src/gkends/acccompos.c index e43fccf..936ce7d 100644 --- a/src/gkends/acccompos.c +++ b/src/gkends/acccompos.c @@ -49,7 +49,7 @@ printf("start with p [%s]\n", p ); if( s ) { - strcpy(prefword,p); + Xstrcpy(prefword,p); p = s+1; set_gkstring(gstr,""); add_morphflag(morphflags_of(gstr),NEEDS_ACCENT); @@ -58,7 +58,7 @@ printf("start with p [%s]\n", p ); s = strchr(prefword,'!'); *(s+1) = 0; } else { - strcpy(saveword,p); + Xstrcpy(saveword,p); set_gkstring(gstr,""); p = saveword; } @@ -94,9 +94,9 @@ printf("start with p [%s]\n", p ); if(word[0] ) { if( prefword[0] ) { strcat(prefword,word); - strcpy(word,prefword); + Xstrcpy(word,prefword); } - strcpy(gkstring_of(gstr),word); + Xstrcpy(gkstring_of(gstr),word); } @@ -104,7 +104,7 @@ printf("start with p [%s]\n", p ); FixRecAcc(gkform,morphflags_of(gstr),p); if( prefword[0] ) { strcat(prefword,p); - strcpy(p,prefword); + Xstrcpy(p,prefword); } } diff --git a/src/gkends/contract.c b/src/gkends/contract.c index 9ae2cbf..227d160 100644 --- a/src/gkends/contract.c +++ b/src/gkends/contract.c @@ -194,8 +194,8 @@ printf("str [%s] skipdial %o match d [%o]\n", curstring, skipdial, dialect_of(ma return(0); } - strcpy(savestr, haveseen ); - strcpy(savecur, curstring ); + Xstrcpy(savestr, haveseen ); + Xstrcpy(savecur, curstring ); curbreath = getbreath(savecur); stripbreath(savecur); @@ -203,7 +203,7 @@ printf("str [%s] skipdial %o match d [%o]\n", curstring, skipdial, dialect_of(ma char tmp[MAXWORDSIZE]; tmp[0] = 0; - strcpy(tmp,cooked); + Xstrcpy(tmp,cooked); p1 = tmp+strlen(tmp)-1; strcat(tmp,savecur+strlen(raw)); /* @@ -225,10 +225,10 @@ printf("str [%s] skipdial %o match d [%o]\n", curstring, skipdial, dialect_of(ma *p1++ = ACUTE; *p1++ = SUBSCR; if( *p1 == HARDLONG ) /* if "aoi_" contracts to "w|", strip the "_"*/ - strcpy(p1,p1+1); + Xstrcpy(p1,p1+1); } strcat(savestr,tmp); - strcpy(gkstring_of(gstr),savestr); + Xstrcpy(gkstring_of(gstr),savestr); if( cur_lang() != LATIN ) addbreath(gkstring_of(gstr),curbreath); set_dialect(gstr,curdial); @@ -260,7 +260,7 @@ printf("str [%s] skipdial %o match d [%o]\n", curstring, skipdial, dialect_of(ma * */ - strcpy(tmp,savestr); + Xstrcpy(tmp,savestr); strcat(tmp,cooked); strcat(tmp,savecur+strlen(raw)); p1 = tmp; @@ -272,7 +272,7 @@ printf("str [%s] skipdial %o match d [%o]\n", curstring, skipdial, dialect_of(ma while(*p1) { if( *p1 == SUBSCR && *(p1+1) == HARDLONG ) { p1++; - strcpy(p1,p1+1); + Xstrcpy(p1,p1+1); } p1++; } @@ -292,7 +292,7 @@ printf("str [%s] skipdial %o match d [%o]\n", curstring, skipdial, dialect_of(ma * not i(/esi. */ - strcpy(gkstring_of(gstr),tmp); + Xstrcpy(gkstring_of(gstr),tmp); if( cur_lang() != LATIN ) addbreath(gkstring_of(gstr),curbreath); set_dialect(gstr,curdial); add_geogregion(gstr,gregion); diff --git a/src/gkends/expendmain.c b/src/gkends/expendmain.c index d69f518..8add6cf 100644 --- a/src/gkends/expendmain.c +++ b/src/gkends/expendmain.c @@ -37,7 +37,7 @@ char * argv[]; fprintf(stderr,"format:%s {ARGS} basename\n", argv[0] ); exit(-1); } - strcpy(fname,argv[argc-1]); + Xstrcpy(fname,argv[argc-1]); rval = strcmp(fname,"formulaX"); if( rval) maintable = 1; diff --git a/src/gkends/expendtable.c b/src/gkends/expendtable.c index 304964e..17ef8c0 100644 --- a/src/gkends/expendtable.c +++ b/src/gkends/expendtable.c @@ -45,8 +45,8 @@ static gk_string Blnk; if( maintable ) { if( *s == DIRCHAR ) s++; - strcpy(fname,s); - strcpy(basename,s); + Xstrcpy(fname,s); + Xstrcpy(basename,s); /* if( formcode == DODERIV ) strcat(basename," is_deriv"); else if( formcode == DOWORD ) strcat(basename," indeclform"); @@ -93,7 +93,7 @@ static gk_string Blnk; return(-1); } } else { - strcpy(fname,s); + Xstrcpy(fname,s); basename[0] = 0; if(! (finput=fopen(fname,"r"))) { fprintf(stderr,"could not open %s for reading\n", fname ); diff --git a/src/gkends/expsuffmain.c b/src/gkends/expsuffmain.c index a2db288..692447c 100644 --- a/src/gkends/expsuffmain.c +++ b/src/gkends/expsuffmain.c @@ -35,7 +35,7 @@ main(int argc, char * argv[]) exit(-1); } - strcpy(fname,argv[argc-1]); + Xstrcpy(fname,argv[argc-1]); if( !strcmp(fname,"all") ) { do_all_derivs(maintable,formcode); } else @@ -56,7 +56,7 @@ do_all_derivs(int maintable, int formcode) /* sprintf(inpfname,"rule_files%c%s", DIRCHAR, "derivtypes.table" ); */ - strcpy(inpfname,DERIVTYPES); + Xstrcpy(inpfname,DERIVTYPES); if(! (finput=MorphFopen(inpfname,"r"))) { printf("could not open [%s]\n", inpfname ); return(-1); diff --git a/src/gkends/fixeta.c b/src/gkends/fixeta.c index e7e92e2..7e114a9 100644 --- a/src/gkends/fixeta.c +++ b/src/gkends/fixeta.c @@ -35,7 +35,7 @@ PrntGkStr(gstr,stdout); *euphs = *gstr; curs = gkstring_of(euphs); - strcpy(curs,"a_"); + Xstrcpy(curs,"a_"); strcat(curs,orgstr+1); add_morphflag(morphflags_of(euphs),R_E_I_ALPHA); set_dialect(euphs,ATTIC); @@ -54,7 +54,7 @@ PrntGkStr(gstr,stdout); orgstr = gkstring_of(euphs); s = is_substring("rh",orgstr); *s = 0; s++; s++; - strcpy(tmp,s); + Xstrcpy(tmp,s); strcat(orgstr,"ra_"); strcat(orgstr,tmp); set_dialect(euphs,ATTIC); @@ -70,7 +70,7 @@ PrntGkStr(gstr,stdout); orgstr = gkstring_of(euphs); s = is_substring("ih",orgstr); *s = 0; s++; s++; - strcpy(tmp,s); + Xstrcpy(tmp,s); strcat(orgstr,"ia_"); strcat(orgstr,tmp); set_dialect(euphs,ATTIC); @@ -88,7 +88,7 @@ PrntGkStr(gstr,stdout); orgstr = gkstring_of(euphs); s = is_substring("i!h",orgstr); *s = 0; s++; s++; s++; - strcpy(tmp,s); + Xstrcpy(tmp,s); if(tmp[0] == '=' ) strcat(orgstr,"i!a"); else @@ -106,7 +106,7 @@ PrntGkStr(gstr,stdout); orgstr = gkstring_of(euphs); s = is_substring("i_h",orgstr); *s = 0; s++; s++;s++; - strcpy(tmp,s); + Xstrcpy(tmp,s); strcat(orgstr,"i_a_"); strcat(orgstr,tmp); set_dialect(euphs,ATTIC); @@ -121,7 +121,7 @@ PrntGkStr(gstr,stdout); orgstr = gkstring_of(euphs); s = is_substring("i/h",orgstr); *s = 0; s++; s++; s++; - strcpy(tmp,s); + Xstrcpy(tmp,s); strcat(orgstr,"i/a_"); strcat(orgstr,tmp); set_dialect(euphs,ATTIC); @@ -135,7 +135,7 @@ PrntGkStr(gstr,stdout); orgstr = gkstring_of(euphs); s = is_substring("i_/h",orgstr); *s = 0; s++; s++;s++; s++; - strcpy(tmp,s); + Xstrcpy(tmp,s); strcat(orgstr,"i_/a_"); strcat(orgstr,tmp); set_dialect(euphs,ATTIC); @@ -150,7 +150,7 @@ PrntGkStr(gstr,stdout); orgstr = gkstring_of(euphs); s = is_substring("e/-h",orgstr); *s = 0;/* s++; s++; s++; */ - strcpy(tmp,s+strlen("e/-h")); + Xstrcpy(tmp,s+strlen("e/-h")); strcat(orgstr,"e/-a_"); strcat(orgstr,tmp); @@ -166,7 +166,7 @@ PrntGkStr(gstr,stdout); orgstr = gkstring_of(euphs); s = is_substring("eh",orgstr); *s = 0; s++; s++; - strcpy(tmp,s); + Xstrcpy(tmp,s); strcat(orgstr,"ea_"); strcat(orgstr,tmp); set_dialect(euphs,ATTIC); @@ -180,7 +180,7 @@ PrntGkStr(gstr,stdout); orgstr = gkstring_of(euphs); s = is_substring("i_/h",orgstr); *s = 0; s++; s++; s++; s++; - strcpy(tmp,s); + Xstrcpy(tmp,s); strcat(orgstr,"i_/a_"); strcat(orgstr,tmp); set_dialect(euphs,ATTIC); diff --git a/src/gkends/imain.c b/src/gkends/imain.c index 04f3770..8fb2a7a 100644 --- a/src/gkends/imain.c +++ b/src/gkends/imain.c @@ -50,7 +50,7 @@ char * argv[]; exit(-1); } - strcpy(fname,argv[argc-1]); + Xstrcpy(fname,argv[argc-1]); /* printf("about to compile ending type [%s]\n", fname ); */ diff --git a/src/gkends/indexendtables.c b/src/gkends/indexendtables.c index 69d1535..3a94650 100644 --- a/src/gkends/indexendtables.c +++ b/src/gkends/indexendtables.c @@ -75,9 +75,9 @@ int is_deriv; while(ReadEnding(finput,&Gstr,maxstring)) { char * sp; sp = gkstring_of(&Gstr); - strcpy(savestr,sp); + Xstrcpy(savestr,sp); if( has_diaeresis(sp) || hasaccent(sp) || has_quant(sp) ) { - strcpy(markedstr,sp); + Xstrcpy(markedstr,sp); } else markedstr[0] = 0; if( *sp < ' ' || *sp > 126 ) printf("bad line name [%s] sp [%s]\n", shortname , sp ); @@ -91,7 +91,7 @@ if( ! *sp ) { continue; } if( is_deriv ) { - strcpy(tmp,gkstring_of(&Gstr)); + Xstrcpy(tmp,gkstring_of(&Gstr)); strcat(tmp,"\t"); if( strcmp(gkstring_of(&Gstr),savestr) ) { strcat(tmp,savestr); @@ -115,7 +115,7 @@ if( ! *sp ) { fprintf(stderr,"ran out of memory at %d endings!\n", endcount ); return(-1); } - strcpy(*(endlines+endcount),tmp); + Xstrcpy(*(endlines+endcount),tmp); endcount++; } /* @@ -162,8 +162,8 @@ printf("output file:%s\n", shortname ); * where the same key is repeated */ fprintf(foutput,"%s%s", DELIMITER, *(endlines+i) ); - strcpy(prevtag,curtag); - strcpy(prevkey,*(endlines+i)); + Xstrcpy(prevtag,curtag); + Xstrcpy(prevkey,*(endlines+i)); } fprintf(foutput,"\n"); diff --git a/src/gkends/mkend.c b/src/gkends/mkend.c index 2118439..9679d59 100644 --- a/src/gkends/mkend.c +++ b/src/gkends/mkend.c @@ -22,7 +22,7 @@ static gk_string BlankGstr; gk_string * fix_eta(); int saw_vowel = 0; - strcpy(savestr,havestr); + Xstrcpy(savestr,havestr); s = savestr; @@ -122,7 +122,7 @@ static while(fgets(line,sizeof line,f)) { char curendstr[MAXWORDSIZE]; - strcpy(savestem,curstr); + Xstrcpy(savestem,curstr); if( is_blank(line) ) continue; @@ -144,7 +144,7 @@ static { char savestem[MAXWORDSIZE]; - strcpy(savestem,stem); + Xstrcpy(savestem,stem); /* * at this point check to see if you want this ending @@ -282,7 +282,7 @@ printf("gks [%s] lastc [%c] stem [%s] endstr [%s]\n", gkstring_of(gstr), lastc , zap_extra_lmarks(stem); if( Is_lvwl(*(lastn(stem,1))) && *endstr == HARDLONG ) { - strcpy(endstr,endstr+1); + Xstrcpy(endstr,endstr+1); } } @@ -290,7 +290,7 @@ zap_extra_lmarks(char *s) { while(*s) { if( Is_lvwl(*s) && *(s+1) == HARDLONG ) { - strcpy(s+1,s+2); + Xstrcpy(s+1,s+2); } s++; } diff --git a/src/gkends/retrends.c b/src/gkends/retrends.c index d9104c6..c427432 100644 --- a/src/gkends/retrends.c +++ b/src/gkends/retrends.c @@ -772,10 +772,10 @@ noaccstrcmp(char *wendstr, char *hendstr) char tmp1[BUFSIZ]; char tmp2[BUFSIZ]; - strcpy(tmp1,wendstr); + Xstrcpy(tmp1,wendstr); stripquantacc(tmp1); - strcpy(tmp2,hendstr); + Xstrcpy(tmp2,hendstr); stripquantacc(tmp2); return(strcmp(tmp1,tmp2)); diff --git a/src/gkends/stor.c b/src/gkends/stor.c index cb5af78..e0bf123 100644 --- a/src/gkends/stor.c +++ b/src/gkends/stor.c @@ -173,7 +173,7 @@ hyphtodiaer(char *news) while(*s) { if(*s=='-' ) { - strcpy(s,s+1); + Xstrcpy(s,s+1); if( is_diphth(s,news) ) { cinsert(DIAERESIS,s+1); } diff --git a/src/greeklib/beta_tolower.c b/src/greeklib/beta_tolower.c index dbe7944..9f7331b 100644 --- a/src/greeklib/beta_tolower.c +++ b/src/greeklib/beta_tolower.c @@ -22,6 +22,6 @@ beta_tolower(char *word) s = word; while(!isalpha(*s)&&*s) s++; *word = *s; - strcpy(s,s+1); + Xstrcpy(s,s+1); } diff --git a/src/greeklib/endsinstr.c b/src/greeklib/endsinstr.c index ba7d67b..3c03854 100644 --- a/src/greeklib/endsinstr.c +++ b/src/greeklib/endsinstr.c @@ -18,8 +18,8 @@ ends_in(char *s1, char *s2) char b2[LOCBUF]; int i; - strcpy(tmp1,s1); s1 = tmp1; - strcpy(tmp2,s2); s2 = tmp2; + Xstrcpy(tmp1,s1); s1 = tmp1; + Xstrcpy(tmp2,s2); s2 = tmp2; stripacc(tmp1); stripacc(tmp2); stripdiaer(tmp1); stripdiaer(tmp2); diff --git a/src/greeklib/normucase.c b/src/greeklib/normucase.c index 31364ff..047780b 100644 --- a/src/greeklib/normucase.c +++ b/src/greeklib/normucase.c @@ -32,7 +32,7 @@ normucase(char *word) * word now "E(/ellhn" */ t = s+1; - strcpy(s,t); + Xstrcpy(s,t); /* * word now "E(/llhn" */ diff --git a/src/greeklib/standalpha.c b/src/greeklib/standalpha.c index e01021f..57af668 100644 --- a/src/greeklib/standalpha.c +++ b/src/greeklib/standalpha.c @@ -13,7 +13,7 @@ standalpha(char *s ) while(*s) { if(!strncmp("a_",s,2)) { *s++ = 'h'; - strcpy(s,s+1); + Xstrcpy(s,s+1); } s++; } diff --git a/src/greeklib/standword.c b/src/greeklib/standword.c index 8a45d49..272afe2 100644 --- a/src/greeklib/standword.c +++ b/src/greeklib/standword.c @@ -88,7 +88,7 @@ standword(char *word) a++; } *b = 0; - strcpy(word,tmp); + Xstrcpy(word,tmp); } zap2acc(s) @@ -99,7 +99,7 @@ char *s; while(*s) { if(*s == ACUTE || *s == GRAVE || *s == CIRCUMFLEX ) { if( haveacc ) { - strcpy(s,s+1); + Xstrcpy(s,s+1); continue; } haveacc = 1; @@ -112,7 +112,7 @@ striphyph(char *s) { while(*s) { if(*s=='-' ) { - strcpy(s,s+1); + Xstrcpy(s,s+1); if( !*s ) break; } s++; diff --git a/src/greeklib/stripchar.c b/src/greeklib/stripchar.c index e5a5ed5..aac4184 100644 --- a/src/greeklib/stripchar.c +++ b/src/greeklib/stripchar.c @@ -11,7 +11,7 @@ stripchar(char *s, int c) while(*s1) { if( *s1 == c ) { - strcpy(s1,s1+1); + Xstrcpy(s1,s1+1); continue; } s1++; diff --git a/src/greeklib/xstrings.c b/src/greeklib/xstrings.c index 7f9fde4..1c20951 100644 --- a/src/greeklib/xstrings.c +++ b/src/greeklib/xstrings.c @@ -3,13 +3,20 @@ #include #include "xstrings.proto.h" +int +Xstrcpy(char *s1, const char *s2) +{ +while (*s1++ = *s2++); +return(1); +} + int Xstrncpy(char *s1, const char *s2, size_t len) { /* strncpy(s1,s2,len); */ -strcpy(s1,s2); +Xstrcpy(s1,s2); return(1); } @@ -31,11 +38,11 @@ Ystrncpy(char *s1, const char *s2, size_t len) } strncpy(p,s2,(size_t)len); *(p+len-1) = 0; - strcpy(s1,p); + Xstrcpy(s1,p); xFree(p,"Xstrncpy buffer"); fprintf(stderr,"%d bytes into %d:%s\n", Xstrlen(s2), len ,s2); } else - strcpy(s1,s2); + Xstrcpy(s1,s2); } @@ -68,7 +75,7 @@ Xstrlen(const char *s) } /* -strcpy(char *s1, const char *s2) +Xstrcpy(char *s1, const char *s2) { while(*s2) { *s1++ = *s2++; diff --git a/src/greeklib/xstrings.proto.h b/src/greeklib/xstrings.proto.h index 61e8349..889a406 100644 --- a/src/greeklib/xstrings.proto.h +++ b/src/greeklib/xstrings.proto.h @@ -1,5 +1,6 @@ /* xstrings.c */ +int Xstrcpy(char *, const char *); int Xstrncpy(char *, const char *, size_t); int Xstrncat(char *, const char *, size_t); int Xstrncmp(const char *, const char *, size_t); diff --git a/src/greeklib/zap2ndbreath.c b/src/greeklib/zap2ndbreath.c index e6a4997..7806fa9 100644 --- a/src/greeklib/zap2ndbreath.c +++ b/src/greeklib/zap2ndbreath.c @@ -27,7 +27,7 @@ zap_extra_breath(char *s) s++; continue; } - strcpy(s,s+1); + Xstrcpy(s,s+1); } s++; } @@ -68,7 +68,7 @@ char *s; while(*s) { if( *s=='r' && *(s+1) == ')' && *(s+2)=='r' && *(s+3) == '(' ) { - strcpy(s,"rr"); + Xstrcpy(s,"rr"); strcat(s,s+4); } s++; diff --git a/src/morphlib/augment.c b/src/morphlib/augment.c index 9301cde..39df1f4 100644 --- a/src/morphlib/augment.c +++ b/src/morphlib/augment.c @@ -578,7 +578,7 @@ augmentit(gk_word *gkform, bool syllabic, int maxaugs) stripbreath(s); else s[1] = 'r'; /* replace breathing with 'r' */ - strcpy(aug1_of(gkform),"r(>e)rr"); + Xstrcpy(aug1_of(gkform),"r(>e)rr"); } else if( has_morphflag(morphflags_of(stem_gstr),SYLL_AUGMENT)) { cinsert(*s,s); @@ -586,7 +586,7 @@ augmentit(gk_word *gkform, bool syllabic, int maxaugs) } cinsert (SMOOTHBR,s); cinsert ('e',s); - if( ! aug1_of(gkform)[0] ) strcpy(aug1_of(gkform),"e)"); + if( ! aug1_of(gkform)[0] ) Xstrcpy(aug1_of(gkform),"e)"); return(1); } diff --git a/src/morphlib/beta2rtf.c b/src/morphlib/beta2rtf.c index 74482f6..371b78d 100644 --- a/src/morphlib/beta2rtf.c +++ b/src/morphlib/beta2rtf.c @@ -98,7 +98,7 @@ conv_defline(char *s, FILE *fout) introp = "\\s5\\fi-539\\li2296\\sb80\\sa80\\tx2296 \\f20"; else if( levnum == 9 ) { introp = "\\s9\\sb60\\sa60 \\f20"; - strcpy(res2,""); + Xstrcpy(res2,""); } fprintf(fout,"\\pard\\plain{%s {%s", introp, res2 ); diff --git a/src/morphlib/beta2smarta.c b/src/morphlib/beta2smarta.c index 67fbbca..2ef12f8 100644 --- a/src/morphlib/beta2smarta.c +++ b/src/morphlib/beta2smarta.c @@ -21,7 +21,7 @@ #define WISUB 0304 #define IS_CHARSTYLE(S) (*S == '&' && (*(S+1) == '3' || *(S+1) == '1' )) #define END_CHARSTYLE(S) if (xlit==SMARTA) *S++ = 0253;/* \ -else { strcpy(S,"}"), S ++; }*/ +else { Xstrcpy(S,"}"), S ++; }*/ #define GKFONT "}{\\f132 " #define ROMANFONT "}{" @@ -153,7 +153,7 @@ beta2mac(char *source, char *res, int xlit) } sp = greekfont(sp); if( xlit == SMK ) { - strcpy(rp,GKFONT); + Xstrcpy(rp,GKFONT); rp += Xstrlen(GKFONT); } continue; @@ -183,9 +183,9 @@ beta2mac(char *source, char *res, int xlit) *rp++ = 0137; else { if( charstyle_flag == ITALIC ) { - strcpy(rp,ITALICFONT); rp += Xstrlen(ITALICFONT); + Xstrcpy(rp,ITALICFONT); rp += Xstrlen(ITALICFONT); } else { - strcpy(rp,BOLDFONT); rp += Xstrlen(BOLDFONT); + Xstrcpy(rp,BOLDFONT); rp += Xstrlen(BOLDFONT); } } sp += 2; @@ -193,7 +193,7 @@ beta2mac(char *source, char *res, int xlit) } sp = romanfont(sp); if( xlit == SMK && ! charstyle_flag && *(rp-1) != '}' ) { - strcpy(rp,ROMANFONT); rp += Xstrlen(ROMANFONT); + Xstrcpy(rp,ROMANFONT); rp += Xstrlen(ROMANFONT); } continue; } @@ -223,11 +223,11 @@ beta2mac(char *source, char *res, int xlit) *rp++ = EQUALS; else { if( cur_font == GK ) { - strcpy(rp,ROMANFONT); + Xstrcpy(rp,ROMANFONT); rp += Xstrlen(ROMANFONT); - strcpy(rp,"=}{"); + Xstrcpy(rp,"=}{"); rp += 3; - strcpy(rp,GKFONT); + Xstrcpy(rp,GKFONT); rp += Xstrlen(GKFONT); } else *rp++ = '='; @@ -269,7 +269,7 @@ beta2mac(char *source, char *res, int xlit) *rp++ = UCASEMARKER; } else if (xlit == SMK ) { sp++; - strcpy(rp,sp); + Xstrcpy(rp,sp); if( islower(*rp) ) *rp = toupper(*rp); rp++; } @@ -318,7 +318,7 @@ beta2mac(char *source, char *res, int xlit) while(*t&&!isalpha(*t)) t++; if(isalpha(*t) && islower(*t) ) *t = toupper(*t); } else { - strcpy(sp,sp+1); + Xstrcpy(sp,sp+1); if(islower(*sp)) *sp = toupper(*sp); } } diff --git a/src/morphlib/betasort.c b/src/morphlib/betasort.c index 3c88edd..f725cba 100644 --- a/src/morphlib/betasort.c +++ b/src/morphlib/betasort.c @@ -64,7 +64,7 @@ char * argv[]; } s = (char *) malloc(nlen); *(key_table+nkeys) = s; - strcpy(*(key_table+nkeys),line); + Xstrcpy(*(key_table+nkeys),line); nkeys++; } diff --git a/src/morphlib/cmpend.c b/src/morphlib/cmpend.c index 8e5a143..eea6bc6 100644 --- a/src/morphlib/cmpend.c +++ b/src/morphlib/cmpend.c @@ -25,7 +25,7 @@ cmpend(char *word, char *ending, char *stem) s1--; s2--; } if( s2 == ending ) { - strcpy(stem,word); + Xstrcpy(stem,word); *(stem + (s1-word)) = 0; return(1); } diff --git a/src/morphlib/is_thirdmono.c b/src/morphlib/is_thirdmono.c index f5ace8d..cb4f6b5 100644 --- a/src/morphlib/is_thirdmono.c +++ b/src/morphlib/is_thirdmono.c @@ -147,7 +147,7 @@ diphth_end(char *stem, char *endstring) char tmp[MAXWORDSIZE]; char * s; - strcpy(tmp,stem); + Xstrcpy(tmp,stem); strcat(tmp,endstring); s = getsyll(tmp,ULTIMA); diff --git a/src/morphlib/morphpath.c b/src/morphlib/morphpath.c index 9af6724..fe9ef89 100644 --- a/src/morphlib/morphpath.c +++ b/src/morphlib/morphpath.c @@ -17,7 +17,7 @@ void SetMorphPath(const char* a_path) if (a_path) { f_morphPath = malloc(strlen(a_path) + 1); - strcpy(f_morphPath, a_path); + Xstrcpy(f_morphPath, a_path); } } diff --git a/src/morphlib/msfgetfile.c b/src/morphlib/msfgetfile.c index afe10a7..1023164 100644 --- a/src/morphlib/msfgetfile.c +++ b/src/morphlib/msfgetfile.c @@ -24,7 +24,7 @@ mySFGetFile(char *filename) GetVol(volName,&vRefNum); PtoCstr(volName); printf("volName [%s]\n", volName ); - strcpy(filename,editFile.fName); + Xstrcpy(filename,editFile.fName); PtoCstr(filename); return(1); } diff --git a/src/morphlib/nextkey.c b/src/morphlib/nextkey.c index 04bd6db..adba584 100644 --- a/src/morphlib/nextkey.c +++ b/src/morphlib/nextkey.c @@ -16,7 +16,7 @@ nextkey(char *keylist, char *nextkey) while(*a && !isspace(*a)) *b++ = *a++; *b = 0; while(isspace(*a)) a++; - if( *a ) strcpy(keylist,a); + if( *a ) Xstrcpy(keylist,a); else *keylist = 0; return(1); } diff --git a/src/morphlib/numovable.c b/src/morphlib/numovable.c index c1eaf0c..3f1dff9 100644 --- a/src/morphlib/numovable.c +++ b/src/morphlib/numovable.c @@ -6,7 +6,7 @@ takes_nu_movable(gk_string *gstr) { char tmp[MAXWORDSIZE]; char * s = tmp; - strcpy(tmp,gkstring_of(gstr)); + Xstrcpy(tmp,gkstring_of(gstr)); /* * grc 7/22/89 diff --git a/src/morphlib/preverb.c b/src/morphlib/preverb.c index 9dbc414..6fc3857 100644 --- a/src/morphlib/preverb.c +++ b/src/morphlib/preverb.c @@ -195,7 +195,7 @@ rstprevb(char *word, char *prevb, gk_string *gstr) if( !has_morphflag(oddpb,RAW_PREVERB) ) { char * t; - strcpy(work,prevb); + Xstrcpy(work,prevb); t = work+strlen(work)-1; if( !strcmp(prevb,"circum") && *word == 'i' ) { @@ -203,12 +203,12 @@ rstprevb(char *word, char *prevb, gk_string *gstr) } if( has_morphflag(oddpb,D_PREVB) ) { - strcpy(work,prevb); + Xstrcpy(work,prevb); strcat(work,"d"); } if( has_morphflag(oddpb,T_PREVB) && !strcmp(prevb,"re") ) { - strcpy(work,"ret"); + Xstrcpy(work,"ret"); } if( !strcmp(prevb,"sub") || !strcmp(prevb,"ob") ) { @@ -349,7 +349,7 @@ rstprevb(char *word, char *prevb, gk_string *gstr) strcat(work,word); - strcpy(word,work); + Xstrcpy(word,work); return; } } @@ -674,7 +674,7 @@ shift_eis_to_es(char *s) { while(*s) { if(!Xstrncmp(s,"eis",3) || !Xstrncmp(s,"ei)s",4) ) { - strcpy(s+1,s+2); + Xstrcpy(s+1,s+2); return; } s++; @@ -686,8 +686,8 @@ shift_pros_to_poti(char *s) while(*s) { if(!Xstrncmp(s,"pros",4) ) { - strcpy(tmp,s+4); - strcpy(s,"poti"); + Xstrcpy(tmp,s+4); + Xstrcpy(s,"poti"); strcat(s,tmp); return; } @@ -700,8 +700,8 @@ shift_pros_to_proti(char *s) while(*s) { if(!Xstrncmp(s,"pros",4) ) { - strcpy(tmp,s+4); - strcpy(s,"proti"); + Xstrcpy(tmp,s+4); + Xstrcpy(s,"proti"); strcat(s,tmp); return; } @@ -714,13 +714,13 @@ shift_upo_to_upai(char *s) while(*s) { if(!Xstrncmp(s,"upo",3) ) { - strcpy(tmp,s+3); - strcpy(s,"upai"); + Xstrcpy(tmp,s+3); + Xstrcpy(s,"upai"); strcat(s,tmp); return; } else if(!Xstrncmp(s,"u(po",4) ) { - strcpy(tmp,s+4); - strcpy(s,"u(pai"); + Xstrcpy(tmp,s+4); + Xstrcpy(s,"u(pai"); strcat(s,tmp); return; } @@ -733,13 +733,13 @@ shift_uper_to_upeir(char *s) while(*s) { if(!Xstrncmp(s,"uper",4) ) { - strcpy(tmp,s+4); - strcpy(s,"upeir"); + Xstrcpy(tmp,s+4); + Xstrcpy(s,"upeir"); strcat(s,tmp); return; } else if(!Xstrncmp(s,"u(per",5) ) { - strcpy(tmp,s+5); - strcpy(s,"u(peir"); + Xstrcpy(tmp,s+5); + Xstrcpy(s,"u(peir"); strcat(s,tmp); return; } @@ -752,8 +752,8 @@ shift_para_to_parai(char *s) while(*s) { if(!Xstrncmp(s,"para",4) ) { - strcpy(tmp,s+4); - strcpy(s,"parai"); + Xstrcpy(tmp,s+4); + Xstrcpy(s,"parai"); strcat(s,tmp); return; } @@ -766,8 +766,8 @@ shift_meta_to_peda(char *s) while(*s) { if(!Xstrncmp(s,"meta",4) ) { - strcpy(tmp,s+4); - strcpy(s,"peda"); + Xstrcpy(tmp,s+4); + Xstrcpy(s,"peda"); strcat(s,tmp); return; } @@ -780,14 +780,14 @@ shift_en_to_eni(char *s) while(*s) { if(!Xstrncmp(s,"e)n",3) && Xstrncmp(s,"e)ni",4)) { - strcpy(tmp,s+3); - strcpy(s,"e)ni"); + Xstrcpy(tmp,s+3); + Xstrcpy(s,"e)ni"); strcat(s,tmp); return; } if(!Xstrncmp(s,"en",2) && Xstrncmp(s,"eni",3)) { - strcpy(tmp,s+2); - strcpy(s,"eni"); + Xstrcpy(tmp,s+2); + Xstrcpy(s,"eni"); strcat(s,tmp); return; } diff --git a/src/morphlib/smk2beta.c b/src/morphlib/smk2beta.c index 8cd03ba..24cbbd3 100644 --- a/src/morphlib/smk2beta.c +++ b/src/morphlib/smk2beta.c @@ -56,10 +56,10 @@ conv(char *start, char *result) * make sure that any unaccented upper case char gets properly converted */ if(isupper(*s) && fromsmk) { - strcpy(tmp,s+1); + Xstrcpy(tmp,s+1); *(s+1) = tolower(*s); *s = '*'; - strcpy(s+2,tmp); + Xstrcpy(s+2,tmp); } while(*s) { @@ -292,5 +292,5 @@ trap_upper(char *res, char *s) static add_acc(char *s, int anum) { - strcpy(s,Xlit_table[(int)( anum & (0377))]); + Xstrcpy(s,Xlit_table[(int)( anum & (0377))]); } diff --git a/src/morphlib/standphon.c b/src/morphlib/standphon.c index e1f05d9..a79e37d 100644 --- a/src/morphlib/standphon.c +++ b/src/morphlib/standphon.c @@ -30,7 +30,7 @@ stand_phonetics(gk_word *Gkword) add_geogregion(Gkword,LACONIA); } else { - strcpy(s,s+1); + Xstrcpy(s,s+1); addbreath(s,ROUGHBR); } s++; @@ -38,7 +38,7 @@ stand_phonetics(gk_word *Gkword) } if( *s == H_AS_ROUGH ) { - strcpy(s,s+1); + Xstrcpy(s,s+1); addbreath(s,ROUGHBR); if( islower(*s) ) *s = toupper(*s); continue; @@ -51,7 +51,7 @@ stand_phonetics(gk_word *Gkword) if( *s == 's' && *(s+1) == 'd' ) { /* "sd" --> "z" * *s = 'z'; s++; - strcpy(s,s+1); + Xstrcpy(s,s+1); } */ /* @@ -61,7 +61,7 @@ stand_phonetics(gk_word *Gkword) if( *s == 'k' && *(s+1) == 's' ) { /* "ks" --> "c" * *s = 'c'; s++; - strcpy(s,s+1); + Xstrcpy(s,s+1); } */ if( isalpha(*s) ) lastc = *s; diff --git a/src/play/getmtok.c b/src/play/getmtok.c index a21287c..dcd188e 100644 --- a/src/play/getmtok.c +++ b/src/play/getmtok.c @@ -26,7 +26,7 @@ passVal() if (!yylval.string) fprintf(stderr, "Out of memory for %s\n", line ); else - strcpy( yylval.string, line ); + Xstrcpy( yylval.string, line ); /* fprintf(stderr, "%s\n",yylval.string);*/ } diff --git a/src/retr/circle.c b/src/retr/circle.c index 86515d5..5e94a68 100644 --- a/src/retr/circle.c +++ b/src/retr/circle.c @@ -93,17 +93,17 @@ printf("%s\n\n", query->ssobuf ); } hits++; - strcpy( centerw , tmp_srch->gotstr ); + Xstrcpy( centerw , tmp_srch->gotstr ); if( Pmatch->moffset > tmp_srch->pword ) { tmp_srch->pword = centerp; - strcpy( tmp_srch->gotstr , centerw ); + Xstrcpy( tmp_srch->gotstr , centerw ); tmp_srch->pw2 = Pmatch->moffset; - strcpy( tmp_srch->gotstr2 , Pmatch->mstring ); + Xstrcpy( tmp_srch->gotstr2 , Pmatch->mstring ); } else { tmp_srch->pw2 = centerp; tmp_srch->pword = Pmatch->moffset; - strcpy( tmp_srch->gotstr2 , centerw ); - strcpy( tmp_srch->gotstr , Pmatch->mstring ); + Xstrcpy( tmp_srch->gotstr2 , centerw ); + Xstrcpy( tmp_srch->gotstr , Pmatch->mstring ); } workbyoff(tmp_srch,tmp_srch->pword); fput_rec( stdout, tmp_srch , " " ); diff --git a/src/retr/context.c b/src/retr/context.c index fbfff00..621b81a 100644 --- a/src/retr/context.c +++ b/src/retr/context.c @@ -95,7 +95,7 @@ static ssjump(char * startp, int slen,int separation,int units); */ startp[len++] = ' '; startp[len] = 0; - strcpy(gksel->gkselbufp, startp ); + Xstrcpy(gksel->gkselbufp, startp ); gksel->gksellen = len; diff --git a/src/retr/getfld.c b/src/retr/getfld.c index 4c3366b..eaebaf7 100644 --- a/src/retr/getfld.c +++ b/src/retr/getfld.c @@ -49,8 +49,8 @@ char *s; while(*t) t++; t--; *t = 0; n = gk_strcmp(s,curl); if( !n && ! strcmp(s,curl) ) { - strcpy( TmpSrch->key , curl ); - strcpy( TmpSrch->gotstr , curl ); + Xstrcpy( TmpSrch->key , curl ); + Xstrcpy( TmpSrch->gotstr , curl ); /* printf("%s = %s at %ld\n", s, curl, curlno ); */ diff --git a/src/retr/getref.c b/src/retr/getref.c index 3fef07d..3a0f393 100644 --- a/src/retr/getref.c +++ b/src/retr/getref.c @@ -48,7 +48,7 @@ printf("Hah! got a range:[%s]\n", p ); * be a reference of some kind */ if( isdigit(*p) ) { - strcpy( SecSrch.Print_ref , p ); + Xstrcpy( SecSrch.Print_ref , p ); printf("SecSrch:%s\n", SecSrch.Print_ref ); if( SetRefFromString(&SecSrch) < 0 ) { printf("could not find ref %s in work number %d of %s\n", SecSrch.Print_ref , SecSrch.recwknum , SecSrch.sname ); @@ -64,7 +64,7 @@ printf("p is reference:%s\n", p ); */ SecSrch.l_start = SecSrch.pstart; SecSrch.l_len = SecSrch.pend - SecSrch.pstart; - strcpy(SecSrch.key,p); + Xstrcpy(SecSrch.key,p); printf("SecSrch.key:%s\n", SecSrch.key ); /* ScanAuthor(&SecSrch); @@ -78,7 +78,7 @@ printf("sec range pend:%ld\n", SecSrch.pend ); } else switch(i) { case 0: printf("will prompt for argument\n"); - strcpy(srch->sname,p); + Xstrcpy(srch->sname,p); printf("sname1:%s\n", srch->sname ); break; case 1: /* browse author work OR */ @@ -94,7 +94,7 @@ printf("sname2:%s\n", srch->sname ); * first work that you want */ workbynum(srch,1); - strcpy( srch->Print_ref , p ); + Xstrcpy( srch->Print_ref , p ); printf("refstring:%s\n", srch->Print_ref ); SetRefFromString(srch); have_reference++; @@ -107,7 +107,7 @@ printf("got worknumber:%d\n", srch->recwknum ); break; case 2: if( ! have_reference ) { - strcpy( srch->Print_ref , p ); + Xstrcpy( srch->Print_ref , p ); SetRefFromString(srch); have_reference++; } @@ -121,7 +121,7 @@ save_from_to(srch,srch->pstart,srch->pend+1); srch->l_start = srch->pstart; srch->l_len = srch->pend - srch->pstart; - strcpy(srch->key,p); + Xstrcpy(srch->key,p); printf("srch->key:%s\n", srch->key ); /* ScanAuthor(srch); diff --git a/src/retr/grklist.c b/src/retr/grklist.c index 4adbc7e..a63af46 100644 --- a/src/retr/grklist.c +++ b/src/retr/grklist.c @@ -39,7 +39,6 @@ FILE * OpenGrklist(); char * GetAuthRec(); char * AuthInGrklist(); - char * strcpy(); char * strncpy(); char * getenv(); @@ -280,7 +279,7 @@ static char * fprintf(stderr,"could not open grklist, looking for %s\n", s ); return( NULL ); } - strcpy( tmp , s ); + Xstrcpy( tmp , s ); strcat( tmp , "\t" ); diff --git a/src/retr/iscommon.c b/src/retr/iscommon.c index b40ca74..1b36113 100644 --- a/src/retr/iscommon.c +++ b/src/retr/iscommon.c @@ -21,7 +21,7 @@ char *s; register char *p; p = curkey; - if(*s=='@') strcpy(p,s+1); + if(*s=='@') Xstrcpy(p,s+1); while(*p) p++; p--; if(*p == '@' ) *p = 0; @@ -44,7 +44,7 @@ init_common() char curword[128]; char libdir[BUFSIZ]; - strcpy(libdir,getenv("LIBDIR")); + Xstrcpy(libdir,getenv("LIBDIR")); if( ! libdir[0] ) { fprintf(stderr,"could not initialize LIBDIR!\n"); exit(-1); @@ -73,7 +73,7 @@ init_common() curword[n-1] = 0; /* zap '\n' */ n--; *(commonwords+i) = (char *) malloc((size_t)(n+1)); - strcpy(*(commonwords+i),curword); + Xstrcpy(*(commonwords+i),curword); } } fclose(f); diff --git a/src/retr/linear.c b/src/retr/linear.c index 7bd4cd2..0a80ddd 100644 --- a/src/retr/linear.c +++ b/src/retr/linear.c @@ -102,7 +102,7 @@ long (*LinLength)(); long TxtLen(); long IndLen(); - char * strcpy(); + char * Xstrcpy(); int forw_count = 0; @@ -397,7 +397,7 @@ curlen = nextlen; - strcpy( curlastline , nextlastline ); + Xstrcpy( curlastline , nextlastline ); if( *nextb ) getlastline( &nextb[nextlen-1] , nextlastline ); diff --git a/src/retr/marker.c b/src/retr/marker.c index 1ae8b05..16eedb2 100644 --- a/src/retr/marker.c +++ b/src/retr/marker.c @@ -552,7 +552,7 @@ char * while( DELIMITER( *s ) && *s ) s++; } - strcpy( remainder , s ); + Xstrcpy( remainder , s ); return(1); } @@ -963,12 +963,12 @@ printf("rval:%d in comparing ", rval ); printsect(tmpRef,0); printf(" and ");pri { char part1[256], part2[256]; char * p2 = part2; - strcpy(part2,s+index); - strcpy(s+index,"$1"); + Xstrcpy(part2,s+index); + Xstrcpy(s+index,"$1"); while(*s) s++; while(!WHITE(*p2)) *s++ = *p2++; *s++ = '$'; - strcpy(s,p2); + Xstrcpy(s,p2); } diff --git a/src/retr/putrec.c b/src/retr/putrec.c index d520153..b873fc7 100644 --- a/src/retr/putrec.c +++ b/src/retr/putrec.c @@ -229,7 +229,7 @@ FILE * foutfile; tlg_seek( srch->sname , start ); /* copy current line into cur_line */ - strcpy( cur_line , tlg_cur_textline() ); + Xstrcpy( cur_line , tlg_cur_textline() ); index = (int)(start - (get_textoffset())); @@ -302,7 +302,7 @@ int part; if( index < 0 ) return(-1); if( part == 1 ) { - strcpy(tmp,s); + Xstrcpy(tmp,s); *(s+index) = 0; gk_sprint(s,PRINTFLAG); fadd_newline(f); diff --git a/src/retr/scanindex.c b/src/retr/scanindex.c index 28b19ad..cab1ce9 100644 --- a/src/retr/scanindex.c +++ b/src/retr/scanindex.c @@ -47,7 +47,7 @@ static SetSliceOfIndex(srch_state * srch, char * key); } InitBigind(); - strcpy( srch->sname , BIGINDNAME ); + Xstrcpy( srch->sname , BIGINDNAME ); if( ! ThesaurOnline(BIGINDNAME) ) { fprintf(stderr,"Big index not online\n"); return(-1); @@ -99,14 +99,14 @@ static SetSliceOfIndex(srch_state * srch, char * key); } } srch->rflags |= INDEX; - strcpy(key,srch->key); + Xstrcpy(key,srch->key); SetSliceOfIndex(srch , key ); InitLinLookup(srch); for(i=0;NextLinPhrase(srch);i++) { hits++; gotp2[i] = srch->p2; - strcpy(gotstrings[i],srch->gotstr); + Xstrcpy(gotstrings[i],srch->gotstr); /* * buffer hits up so that you do not have to seek out of * the index file on each hit -- this should save seek @@ -147,8 +147,8 @@ static printf("\t%s", gotstrings[j] ); continue; } - strcpy( TmpSrch->key , gotstrings[j] ); - strcpy( TmpSrch->gotstr , gotstrings[j] ); + Xstrcpy( TmpSrch->key , gotstrings[j] ); + Xstrcpy( TmpSrch->gotstr , gotstrings[j] ); if( TmpSrch->rflags & THESAURUS ) { thesaur(stdout,TmpSrch,gotp2[j],gotstrings[j]); } else if ( TmpSrch->rflags & (TWOWORDS|SHOWOFFS )) { @@ -236,7 +236,7 @@ static { char curkey[64]; - strcpy(curkey,key); + Xstrcpy(curkey,key); if( curkey[0] != '@' && ! isupper(curkey[0]) && curkey[0] != '*' ) { srch->l_lno = 1; srch->l_start = 0; @@ -245,7 +245,7 @@ static /* if( *(curkey+1) == '*') { - strcpy(curkey+1,curkey+2); + Xstrcpy(curkey+1,curkey+2); *(curkey+1) = toupper(*(curkey+1)); } */ @@ -271,7 +271,7 @@ static ParseWlistLine(srch,prev_line,cur_line); goto finish; } - strcpy(prev_line,cur_line); + Xstrcpy(prev_line,cur_line); } ParseWlistLine(srch,prev_line,NULL); @@ -297,7 +297,7 @@ char *s; char * a = s; while(*a&&!isalpha(*a)) a++; *s = *a; - strcpy(a,a+1); + Xstrcpy(a,a+1); } /* @@ -319,7 +319,7 @@ static char * a = s; while(*a&&!isalph(*a)) a++; *s = *a; - strcpy(a,a+1); + Xstrcpy(a,a+1); */ } if( isupper( *t ) ) *t = tolower( *t ); @@ -415,10 +415,10 @@ if( ThFreq == 0 ) { fflush(fout); - strcpy( gots , srch->gotstr ); + Xstrcpy( gots , srch->gotstr ); for(i=0;igotstr , gots ); - strcpy( srch->key , gots ); + Xstrcpy( srch->gotstr , gots ); + Xstrcpy( srch->key , gots ); ThDumprec( fout , srch , i , string ); } fadd_newline(fout); @@ -444,7 +444,7 @@ if( ThFreq == 0 ) { if( gotpA ) { tmpR.p2 = ThTlgp2[index]; tmpR.freq = x; - strcpy( tmpR.key , s ); + Xstrcpy( tmpR.key , s ); } else { tmpR.p2 = tmpR.freq = 0; } @@ -557,7 +557,7 @@ static } - strcpy( s , authtab[ n ] ); + Xstrcpy( s , authtab[ n ] ); return( 1 ); } diff --git a/src/retr/selmain.c b/src/retr/selmain.c index 729b3fd..a753f21 100644 --- a/src/retr/selmain.c +++ b/src/retr/selmain.c @@ -57,7 +57,7 @@ char * argv[]; switch (argv[0][1]) { case 'o': - strcpy( srch->savefile , &argv[0][2] ); + Xstrcpy( srch->savefile , &argv[0][2] ); continue; case 'S': @@ -147,8 +147,8 @@ char * argv[]; case 'p': srch->rflags |= THESAURUS|INDEX ; - strcpy( autharr[0] , BIGINDNAME ); - strcpy( srch->sname , BIGINDNAME ); + Xstrcpy( autharr[0] , BIGINDNAME ); + Xstrcpy( srch->sname , BIGINDNAME ); nauths = 1; continue; default: @@ -158,7 +158,7 @@ char * argv[]; if( !wflag ) { - strcpy( wordarr[nwords++] , *argv ); + Xstrcpy( wordarr[nwords++] , *argv ); argc--; argv++; } diff --git a/src/retr/showword.c b/src/retr/showword.c index f99cc75..7e9d091 100644 --- a/src/retr/showword.c +++ b/src/retr/showword.c @@ -41,10 +41,10 @@ long * offlist; tlg_seek(sname,startout); - strcpy(line,tlg_cur_textline()); + Xstrcpy(line,tlg_cur_textline()); markwords(get_textoffset(),line,offlist); - strcpy(Srch.sname,sname); + Xstrcpy(Srch.sname,sname); workbyoff(&Srch,TxtFtell(Srch.sname)); printf("\n\n______"); printf("%s %s\n", Srch.title,tlg_cur_label(' ') ); diff --git a/src/retr/spellmain.c b/src/retr/spellmain.c index 342350e..4dfeb88 100644 --- a/src/retr/spellmain.c +++ b/src/retr/spellmain.c @@ -30,7 +30,7 @@ char * argv[]; srch = &Srch; srch->rflags |= SPELL_CHECK; - strcpy(srch->sname,argv[2]); + Xstrcpy(srch->sname,argv[2]); while(fgets(curword,sizeof curword,finput) ) { trimnl(curword); @@ -79,10 +79,10 @@ register char * s; { char tmp[256]; - strcpy(tmp,"@"); + Xstrcpy(tmp,"@"); strcat(tmp,s); strcat(tmp,"@"); - strcpy(s,tmp) ; + Xstrcpy(s,tmp) ; } /* diff --git a/src/retr/strings.c b/src/retr/strings.c index afff4e0..d229c85 100644 --- a/src/retr/strings.c +++ b/src/retr/strings.c @@ -23,7 +23,7 @@ char * s; *b-- = 0; } - strcpy(s,a); + Xstrcpy(s,a); } s_blank(s) diff --git a/src/retr/stripdiacrit.c b/src/retr/stripdiacrit.c index 38703b2..e8f0ef3 100644 --- a/src/retr/stripdiacrit.c +++ b/src/retr/stripdiacrit.c @@ -16,7 +16,7 @@ register char * s; { while(*s) { if( IS_ACC(*s) ) { - strcpy(s,s+1); + Xstrcpy(s,s+1); continue; } s++; @@ -29,7 +29,7 @@ register char * s; { while(*s) { if( IS_BREATH(*s) ) { - strcpy(s,s+1); + Xstrcpy(s,s+1); continue; } s++; diff --git a/src/retr/tlgscan.c b/src/retr/tlgscan.c index 6897526..99c6f6a 100644 --- a/src/retr/tlgscan.c +++ b/src/retr/tlgscan.c @@ -40,8 +40,8 @@ char * argv[]; exit( -1 ); } - strcpy( Srch.sname , argv[2] ); - strcpy( Authname , Srch.sname ); + Xstrcpy( Srch.sname , argv[2] ); + Xstrcpy( Authname , Srch.sname ); if( ! TlgOnline( Srch.sname ) ) { fprintf(stderr,"%s not found\n", Srch.sname ); diff --git a/src/retr/worksetup.c b/src/retr/worksetup.c index 61cce92..ff5e852 100644 --- a/src/retr/worksetup.c +++ b/src/retr/worksetup.c @@ -15,7 +15,6 @@ static char SCCSID[] = "@(#)worksetup.c 2.1 9/26/87"; * various functions */ char * Calloc(); - char * strcpy(); char * strncpy(); char * NextField(); @@ -50,7 +49,7 @@ static char SCCSID[] = "@(#)worksetup.c 2.1 9/26/87"; return( -1 ); } } - strcpy( curauth , srch->sname ); + Xstrcpy( curauth , srch->sname ); if( ! OpWorkfFile(srch->sname) ) { fprintf(stderr,"could not find %s.workfile\n", srch->sname); return(-1); @@ -277,7 +276,7 @@ static char SCCSID[] = "@(#)worksetup.c 2.1 9/26/87"; * Make sure every work has a name -- vjh 9/87 */ if ( swk->wkname[0] == '\0' ) { - strcpy( swk->wkname, "wk" ); + Xstrcpy( swk->wkname, "wk" ); sprintf( swk->wkname+2, "%03d", swk->wknum ); } } diff --git a/src/scan/scando.c b/src/scan/scando.c index 983d30e..0303e3a 100644 --- a/src/scan/scando.c +++ b/src/scan/scando.c @@ -68,16 +68,16 @@ int main(int argc, char* argv[]) switch (totanal_of(base_word)) { case 1: /* this is the easy case */ - strcpy(work_buffer, workword_of(analysis_of(base_word))); - strcpy(lemma, lemma_of(analysis_of(base_word))); + Xstrcpy(work_buffer, workword_of(analysis_of(base_word))); + Xstrcpy(lemma, lemma_of(analysis_of(base_word))); break; case 0: /* problem: not a word? */ - strcpy(work_buffer, workword_of(base_word)); + Xstrcpy(work_buffer, workword_of(base_word)); lemma[0] = 0; break; default: /* problem: which one is it? */ - strcpy(work_buffer, workword_of(analysis_of(base_word))); - strcpy(lemma, lemma_of(analysis_of(base_word))); + Xstrcpy(work_buffer, workword_of(analysis_of(base_word))); + Xstrcpy(lemma, lemma_of(analysis_of(base_word))); break; } fprintf(stderr, "analyzed: %s from %s\n", work_buffer, lemma); diff --git a/src/tlg/tlg_wsplit.c b/src/tlg/tlg_wsplit.c index 67ef42f..382b4e5 100644 --- a/src/tlg/tlg_wsplit.c +++ b/src/tlg/tlg_wsplit.c @@ -73,7 +73,7 @@ FILE * f; if( argc == 1 ) fin = stdin; else { - strcpy( base , argv[1] ); + Xstrcpy( base , argv[1] ); strcat( base , ".tlg" ); if( (fin = fopen( base , "r" )) == NULL ) { fprintf(stderr,"could not open %s\n", base ); @@ -86,9 +86,9 @@ FILE * f; exit(-1); } - strcpy( basename , argv[1] ); + Xstrcpy( basename , argv[1] ); - strcpy( base , argv[1] ); + Xstrcpy( base , argv[1] ); strcat( base , ".words" ); fgreek = fopen( base , "w" ); if( fgreek == NULL ) { @@ -96,10 +96,10 @@ FILE * f; exit( 0 ); } - strcpy( commonfile , argv[1] ); + Xstrcpy( commonfile , argv[1] ); strcat( commonfile , ".comwords" ); - strcpy( workfile , argv[1] ); + Xstrcpy( workfile , argv[1] ); strcat( workfile , ".workfile" ); if( (f=fopen(workfile,"w")) == NULL ) { fprintf(stderr,"Could not open %s\n", workfile ); @@ -110,7 +110,7 @@ FILE * f; unlink("auths.common"); unlink("works.common"); - strcpy( authfile , argv[1] ); + Xstrcpy( authfile , argv[1] ); strcat( authfile , ".auth" ); f = fopen( authfile , "w" ); if( f == NULL ) { @@ -119,7 +119,7 @@ FILE * f; } fclose( f ); - strcpy( filefile , argv[1] ); + Xstrcpy( filefile , argv[1] ); strcat( filefile , ".file" ); f = fopen( filefile , "w" ); if( f == NULL ) { @@ -128,7 +128,7 @@ FILE * f; } fclose( f ); - strcpy( base , argv[1] ); + Xstrcpy( base , argv[1] ); strcat( base , ".roman" ); froman = fopen( base , "w" ); if( froman == NULL ) { @@ -136,7 +136,7 @@ FILE * f; exit( 0 ); } - strcpy( base , argv[1] ); + Xstrcpy( base , argv[1] ); strcat( base , ".broken" ); fbroken = fopen( base , "w" ); if( fbroken == NULL ) { @@ -446,7 +446,7 @@ register char * s; else authcnt = bytcnt; } - strcpy( oldanum , anum ); + Xstrcpy( oldanum , anum ); if( *s != '"' ) { fprintf(stderr,"Bad format: %s\n", startp ); } @@ -457,8 +457,8 @@ register char * s; dumpwork(); } wkname[0] = 0; - strcpy( oldwknum , wknum ); - strcpy( oldwkname , wkname ); + Xstrcpy( oldwknum , wknum ); + Xstrcpy( oldwkname , wkname ); nworks++; s++; @@ -637,7 +637,7 @@ int i; /* if( nworks == 1 && endwork ) - { strcpy( oldwknum , wknum ); strcpy( oldwkname , wkname ); } + { Xstrcpy( oldwknum , wknum ); strcpy( oldwkname , wkname ); } */ /* @@ -743,7 +743,7 @@ zap2ndacc(char *s) while(*s) { if(*s=='//' || *s == '=' ) { if(hasacc ) { - strcpy(s,s+1); + Xstrcpy(s,s+1); continue; } hasacc++;