Example #1
0
int32_t CTB_move(char *new_name, char *old_name)
{
    int16_t n;
    n = (int16_t) CTB_copy(new_name, old_name);
    CTB_unlink(old_name);
    return n;
}
Example #2
0
Bool32 TestFontProtocol(void)
{
#ifdef _USE_LEO_
    int32_t          name;
    int            i; //,j;
    int            nClust;
    int            numCourier,nC;
    FILE          *fp;
    LeoFieldSetup  fs={0};
    RecRaster   rec;
    RecObject   ro={0};
    LeoPageSetup ps={0};
    int jj;

    if( _access("c:\\met.ini",0)==-1 )
        return FALSE;

    nClust=FONGetClustCount();

    set_alphabet(alphabet1, alpha_str);

    LEOSetPlatform(586);
    fs.nStyle = LS_PRINT;
    memcpy(fs.AlphaTable,alphabet1,256);
    LEOSetupField(&fs);
    CTB_unlink("CLUST2");

    fp=fopen(".\\clu_met.pro","wt");
    for(i=0,nC=numCourier=0;i<nClust;i++)
    {
        for(jj=0;jj<3;jj++)
        {
            name=0;
            FONGetClusterAsBW(&name,i,jj*25,&rec);
            CTB_AddRecRaster("CLUST2", &rec,decode_ASCII_to_[name][0]);
            memset(&ro,0,sizeof(RecObject));
            memcpy(&ro.recData.recRaster,&rec,REC_MAX_RASTER_SIZE);
            ps.nIdPage=-1;
            ro.recData.lwStatus=0;
            LEOSetupPage(&ps);
            fprintf(fp,"Nclu=%d(%d) let=%c tresh=%d%s\n",i,i*3+jj, name, jj,jj?"":"(default)" );

            LEORecogPrintChar(&ro);
            print_method(fp,&ro.recResults,"         leo : ",1);


            LEORecogPrnMethod( &ro , REC_METHOD_MSK, 1);
            print_method(fp,&ro.recResults,"         msk : ",0);

            LEORecogCharDebug( &ro );
            print_method(fp,&ro.recResults,"     evn+3x5 : ",1);
        } // end treshold
        fprintf(fp,"\n");
    }   // end clusters

    fclose(fp);
#endif
    return TRUE;
}