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

📄 initlink.c

📁 CC386 is a general-purpose 32-bit C compiler. It is not an optimizing compiler but given that the co
💻 C
📖 第 1 页 / 共 2 页
字号:
/* 
   Copyright 1994-2003 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.  

   You may contact the author at:

   mailto::camille@bluegrass.net

   or by snail mail at:

   David Lindauer
   850 Washburn Ave Apt 99
   Louisville, KY 40222
*/
#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <dos.h>
#include <time.h>

#include "langext.h"
#include "defines.h"
#include "types.h"
#include "subs.h"
#include "globals.h"
#include "..\version.h"

/*                                 INITLINK.C                              */

/*+-------------------------------------------------------------------------+
  |                                                                         |
  |                       primary_linker_initialization                     |
  |                                                                         |
  +-------------------------------------------------------------------------+*/
void primary_linker_initialization(byte *program_directory)
BeginDeclarations
  byte_ptr        p ;
  string_ptr config_name ;
EndDeclarations
BeginCode
 /* Note start time */
 linker_start_time = Now;

 /* Issue Signon message */
#ifndef MSDOS
 if (GetStdHandle(STD_INPUT_HANDLE) != INVALID_HANDLE_VALUE)
#endif
    linker_message("VALX Version %s %s\n",VALX_STRING_VERSION, PRODUCT_COPYRIGHT);
// linker_message("VALX Experimental Linker  Compiled %s %s\n",__DATE__,__TIME__);
//  linker_message("%s",GetCommandLine()) ;
/*+-------------------------------------------------------------------------+
  |                                                                         |
  |                     Memory Pool Initialization                          |
  |                                                                         |
  +-------------------------------------------------------------------------+*/

 initialize_memory();

/*+-------------------------------------------------------------------------+
  |                                                                         |
  |                     Constant String Initialization                      |
  |                                                                         |
  +-------------------------------------------------------------------------+*/

/* Uninitialized strings */

 current_filename         = allocate_string( TEMP_STRING_LENGTH);
 current_path             = allocate_string( TEMP_STRING_LENGTH);
 default_directory_string = allocate_string( TEMP_STRING_LENGTH);
 default_filename         = allocate_string( TEMP_STRING_LENGTH);
 help_filename            = allocate_string( TEMP_STRING_LENGTH);
 next_token               = allocate_string( TEMP_STRING_LENGTH);
 parm_string              = allocate_string( 65530);
 sym_filename_string      = allocate_string( TEMP_STRING_LENGTH);
 temp_string              = allocate_string( TEMP_STRING_LENGTH);
 token                    = allocate_string( TEMP_STRING_LENGTH);

/* Initialized strings */

 ampersand_string         = make_constant_string(
                                                 (byte *) "&");
 and_string               = make_constant_string(
                                                 (byte *) "and");
 at_string                = make_constant_string(
                                                 (byte *) "@");
 backslash_string         = make_constant_string(
                                                 (byte *) "\\");
 backslash_dot_string     = make_constant_string(
                                                 (byte *) "\\.\\");
 backslash_dot_dot_string = make_constant_string(
                                                 (byte *) "\\..\\");
 bar_string               = make_constant_string(
                                                 (byte *) "|");
 class_string             = make_constant_string(
                                                 (byte *) "class");
 close_angle_string       = make_constant_string(
                                                 (byte *) ">");
 close_paren_string       = make_constant_string(
                                                 (byte *) ")");
 colon_string             = make_constant_string(
                                                 (byte *) ":");
 com_extension_string     = make_constant_string(
                                                 (byte *) ".com");
 comma_string             = make_constant_string(
                                                 (byte *) ",");
 cv_extension_string      = make_constant_string(
                                                 (byte *) ".lss");
 default_drive_string     = default_drive();
 default_lx_stub_string   = make_constant_string(
                                                 (byte *) "stub32a.exe");
 device_AUX               = make_constant_string(
                                                 (byte *) "aux:");
 device_CON               = make_constant_string(
                                                 (byte *) "con:");
 device_PRN               = make_constant_string(
                                                 (byte *) "prn:");
 dll_extension_string     = make_constant_string(
                                                 (byte *) ".dll");
 dot_string               = make_constant_string(
                                                 (byte *) ".");
 env_extension_string     = make_constant_string(
                                                 (byte *) ".env");
 exclamation_string       = make_constant_string(
                                                 (byte *) "!");
 exe_extension_string     = make_constant_string(
                                                 (byte *) ".exe");
 false_string = make_constant_string(
                                                 (byte *) "false");
 group_string             = make_constant_string(
                                                 (byte *) "group");
 help_extension_string    = make_constant_string(
                                                 (byte *) ".hlp");
 lib_extension_string     = make_constant_string(
                                                 (byte *) ".lib");
 lst_extension_string     = make_constant_string(
                                                 (byte *) ".map");
 minus_string             = make_constant_string(
                                                 (byte *) "-");
 not_string               = make_constant_string(
                                                 (byte *) "not");
 null_string              = make_constant_string(
                                                 (byte *) "");
 obj_extension_string     = make_constant_string(
                                                 (byte *) ".obj");
 open_paren_string        = make_constant_string(
                                                 (byte *) "<");
 open_paren_string        = make_constant_string(
                                                 (byte *) "(");
 or_string                = make_constant_string(
                                                 (byte *) "or");
 plus_string              = make_constant_string(
                                                 (byte *) "+");
 program_directory_string = make_constant_string(
                                                 program_directory);
 process_filename(program_directory_string);

 resource_extension_string= make_constant_string(
                                                 (byte *) ".res");
 segment_string           = make_constant_string(
                                                 (byte *) "segment");
 semicolon_string         = make_constant_string(

⌨️ 快捷键说明

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