⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notimp.cpp

📁 将UCOS与UCGUI整合到一起,并在BORLAND C++上运行通过的源程序.
💻 CPP
字号:
//  NOTIMP.CPP
//
//  Generates .ASM files for functions not implemented in windows,
//  along with linker response file (NOTIMP.RSP) which will pull
//  all the .OBJ files into a lib.
//
//  Usage:
//
//  NOTIMP < NOTIMP.LST
//
//  tasm *.asm
//
//  TLIB cwins @NOTIMP.RSP

#include <string.h>
#include <fstream.h>

int started = 0;
ofstream rsp( "notimp.rsp" );

char fileName[] = "notimpaa";
void nextName()
{
    if( ++fileName[7] > 'z' )
        {
        fileName[7] = 'a';
        fileName[6]++;
        }
}

void genProg( const char *func )
{
    char name[ 20 ];
    strcpy( name, fileName );
    strcat( name, ".asm" );
    cerr << func << endl;
    ofstream out( name );
    out << "_TEXT   segment" << endl;
    out << "        assume CS:_TEXT" << endl << endl;
    out << "extrn   " << func << "_Not_Windows" << endl << endl;
    out << "public  _" << func << endl;
    out << "_" << func << ":" << endl;
    out << "        call " << func << "_Not_Windows" << endl;
    out << "        ends" << endl;
    out << "        end" << endl;
    strcpy( name, fileName );
    if( started != 0 )
        rsp << " &" << endl;
    else
        started = 1;
    rsp << "+" << name;
    nextName();
}

int main()
{
    char name[ 128 ];
    cin >> name;
    while( !cin.eof() )
        {
        genProg( name );
        cin >> name;
        }
    return 0;
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -