Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

aplibtool.c File Reference

#include <stdio.h>
#include <process.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <dirent.h>

Include dependency graph for aplibtool.c:

Go to the source code of this file.

Defines

#define false   0
#define true   (!false)

Typedefs

typedef char bool

Enumerations

enum  mode_t { mCompile, mLink, mInstall }
enum  output_type_t {
  otGeneral, otObject, otProgram, otStaticLibrary,
  otDynamicLibrary
}

Functions

void parse_args (int argc, char *argv[], cmd_data_t *cmd_data)
bool parse_long_opt (char *arg, cmd_data_t *cmd_data)
int parse_short_opt (char *arg, cmd_data_t *cmd_data)
bool parse_input_file_name (char *arg, cmd_data_t *cmd_data)
bool parse_output_file_name (char *arg, cmd_data_t *cmd_data)
void post_parse_fixup (cmd_data_t *cmd_data)
bool explode_static_lib (char *lib, cmd_data_t *cmd_data)
int execute_command (cmd_data_t *cmd_data)
char * shell_esc (const char *str)
void cleanup_tmp_dirs (cmd_data_t *cmd_data)
void generate_def_file (cmd_data_t *cmd_data)
char * nameof (char *fullpath)
char * truncate_dll_name (char *path)
int main (int argc, char *argv[])
void cleanup_tmp_dir (char *dirname)

Variables

bool silent = false
bool shared = false
bool export_all = false


Define Documentation

#define false   0
 

Definition at line 25 of file aplibtool.c.

#define true   (!false)
 

Definition at line 26 of file aplibtool.c.


Typedef Documentation

typedef char bool
 

Definition at line 24 of file aplibtool.c.


Enumeration Type Documentation

enum mode_t
 

Enumeration values:
mCompile 
mLink 
mInstall 

Definition at line 31 of file aplibtool.c.

enum output_type_t
 

Enumeration values:
otGeneral 
otObject 
otProgram 
otStaticLibrary 
otDynamicLibrary 

Definition at line 32 of file aplibtool.c.


Function Documentation

void cleanup_tmp_dir char *  dirname  ) 
 

Definition at line 591 of file aplibtool.c.

References dir, entry, and NULL.

Referenced by cleanup_tmp_dirs().

void cleanup_tmp_dirs cmd_data_t cmd_data  ) 
 

Definition at line 616 of file aplibtool.c.

References cleanup_tmp_dir(), and cmd_data_t::tmp_dirs.

Referenced by main().

Here is the call graph for this function:

int execute_command cmd_data_t cmd_data  ) 
 

Definition at line 477 of file aplibtool.c.

References args, NULL, shell_esc(), and silent.

Referenced by main().

Here is the call graph for this function:

bool explode_static_lib char *  lib,
cmd_data_t cmd_data
 

Definition at line 542 of file aplibtool.c.

References cmd_data_t::arglist, dir, entry, name, NULL, cmd_data_t::num_args, cmd_data_t::num_tmp_dirs, strdup(), and cmd_data_t::tmp_dirs.

Referenced by post_parse_fixup().

Here is the call graph for this function:

void generate_def_file cmd_data_t cmd_data  ) 
 

Definition at line 627 of file aplibtool.c.

References cmd_data_t::arglist, nameof(), NULL, cmd_data_t::num_args, cmd_data_t::obj_files, cmd_data_t::output_name, strdup(), and cmd_data_t::stub_name.

Referenced by post_parse_fixup().

Here is the call graph for this function:

int main int  argc,
char *  argv[]
 

Definition at line 87 of file aplibtool.c.

References cleanup_tmp_dirs(), execute_command(), mCompile, otGeneral, and parse_args().

Here is the call graph for this function:

char * nameof char *  fullpath  ) 
 

Definition at line 699 of file aplibtool.c.

References buffer, name, NULL, and strdup().

Referenced by generate_def_file().

Here is the call graph for this function:

void parse_args int  argc,
char *  argv[],
cmd_data_t cmd_data
 

Definition at line 109 of file aplibtool.c.

References arg, cmd_data_t::arglist, cmd_data_t::num_args, parse_input_file_name(), parse_long_opt(), parse_output_file_name(), parse_short_opt(), and post_parse_fixup().

Referenced by main().

Here is the call graph for this function:

bool parse_input_file_name char *  arg,
cmd_data_t cmd_data
 

Definition at line 225 of file aplibtool.c.

References cmd_data_t::arglist, mInstall, cmd_data_t::mode, name, NULL, cmd_data_t::num_args, cmd_data_t::num_obj_files, cmd_data_t::obj_files, otGeneral, otObject, cmd_data_t::output_type, shared, cmd_data_t::stub_name, and truncate_dll_name().

Referenced by parse_args().

Here is the call graph for this function:

bool parse_long_opt char *  arg,
cmd_data_t cmd_data
 

Definition at line 148 of file aplibtool.c.

References export_all, mCompile, mInstall, mLink, cmd_data_t::mode, otObject, cmd_data_t::output_type, shared, silent, and value.

Referenced by parse_args().

bool parse_output_file_name char *  arg,
cmd_data_t cmd_data
 

Definition at line 304 of file aplibtool.c.

References cmd_data_t::arglist, name, NULL, cmd_data_t::num_args, otDynamicLibrary, otObject, otProgram, otStaticLibrary, cmd_data_t::output_name, cmd_data_t::output_type, shared, cmd_data_t::stub_name, and truncate_dll_name().

Referenced by parse_args().

Here is the call graph for this function:

int parse_short_opt char *  arg,
cmd_data_t cmd_data
 

Definition at line 190 of file aplibtool.c.

Referenced by parse_args().

void post_parse_fixup cmd_data_t cmd_data  ) 
 

Definition at line 380 of file aplibtool.c.

References arg, cmd_data_t::arglist, explode_static_lib(), export_all, generate_def_file(), mLink, cmd_data_t::mode, NULL, cmd_data_t::num_args, otDynamicLibrary, otObject, otProgram, otStaticLibrary, cmd_data_t::output_type, and shared.

Referenced by parse_args().

Here is the call graph for this function:

char * shell_esc const char *  str  ) 
 

Definition at line 519 of file aplibtool.c.

References s.

Referenced by execute_command().

char * truncate_dll_name char *  path  ) 
 

Definition at line 728 of file aplibtool.c.

References len, NULL, and strdup().

Referenced by parse_input_file_name(), and parse_output_file_name().

Here is the call graph for this function:


Variable Documentation

bool export_all = false
 

Definition at line 30 of file aplibtool.c.

Referenced by parse_long_opt(), and post_parse_fixup().

bool shared = false
 

Definition at line 29 of file aplibtool.c.

Referenced by parse_input_file_name(), parse_long_opt(), parse_output_file_name(), and post_parse_fixup().

bool silent = false
 

Definition at line 28 of file aplibtool.c.