1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-28 19:29:53 +00:00

New option --forget-inc-paths

git-svn-id: svn://svn.cc65.org/cc65/trunk@2243 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2003-08-03 11:58:11 +00:00
parent 39478f2703
commit c130e597b0
4 changed files with 33 additions and 1 deletions

View File

@ -65,6 +65,14 @@ char* FindInclude (const char* Name, unsigned Where)
void ForgetAllIncludePaths (void)
/* Remove all include search paths. */
{
ForgetAllSearchPaths (INC_SYS | INC_USER);
}
void InitIncludePaths (void)
/* Initialize the include path search list */
{

View File

@ -63,6 +63,9 @@ char* FindInclude (const char* Name, unsigned Where);
* the complete path, if found, return 0 otherwise.
*/
void ForgetAllIncludePaths (void);
/* Remove all include search paths. */
void InitIncludePaths (void);
/* Initialize the include path search list */

View File

@ -112,6 +112,7 @@ static void Usage (void)
" --debug-opt name\tDebug optimization steps\n"
" --disable-opt name\tDisable an optimization step\n"
" --enable-opt name\tEnable an optimization step\n"
" --forget-inc-paths\tForget include search paths\n"
" --help\t\tHelp (this text)\n"
" --include-dir dir\tSet an include directory search path\n"
" --list-opt-steps\tList all optimizer steps and exit\n"
@ -503,6 +504,15 @@ static void OptEnableOpt (const char* Opt attribute ((unused)), const char* Arg)
static void OptForgetIncPaths (const char* Opt attribute ((unused)),
const char* Arg attribute ((unused)))
/* Forget all currently defined include paths */
{
ForgetAllIncludePaths ();
}
static void OptHelp (const char* Opt attribute ((unused)),
const char* Arg attribute ((unused)))
/* Print usage information and exit */
@ -629,7 +639,8 @@ int main (int argc, char* argv[])
{ "--debug-info", 0, OptDebugInfo },
{ "--debug-opt", 1, OptDebugOpt },
{ "--disable-opt", 1, OptDisableOpt },
{ "--enable-opt", 1, OptEnableOpt, },
{ "--enable-opt", 1, OptEnableOpt },
{ "--forget-inc-paths", 0, OptForgetIncPaths },
{ "--help", 0, OptHelp },
{ "--include-dir", 1, OptIncludeDir },
{ "--list-opt-steps", 0, OptListOptSteps },

View File

@ -636,6 +636,7 @@ static void Usage (void)
" --debug\t\tDebug mode\n"
" --debug-info\t\tAdd debug info\n"
" --feature name\tSet an emulation feature\n"
" --forget-inc-paths\tForget include search paths (compiler)\n"
" --help\t\tHelp (this text)\n"
" --include-dir dir\tSet a compiler include directory path\n"
" --lib file\t\tLink this library\n"
@ -822,6 +823,14 @@ static void OptFeature (const char* Opt attribute ((unused)), const char* Arg)
static void OptForgetIncPaths (const char* Opt attribute ((unused)), const char* Arg)
/* Forget all currently defined include paths */
{
CmdAddArg2 (&CC65, "--forget-inc-paths", Arg);
}
static void OptHelp (const char* Opt attribute ((unused)),
const char* Arg attribute ((unused)))
/* Print help - cl65 */
@ -1042,6 +1051,7 @@ int main (int argc, char* argv [])
{ "--debug", 0, OptDebug },
{ "--debug-info", 0, OptDebugInfo },
{ "--feature", 1, OptFeature },
{ "--forget-inc-paths", 0, OptForgetIncPaths },
{ "--help", 0, OptHelp },
{ "--include-dir", 1, OptIncludeDir },
{ "--lib", 1, OptLib },