Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Calendar
  - Forums
  - IRC
  - Community Discord
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# dmd.root.response

Compiler implementation of the D programming language http://dlang.org This file is not shared with other compilers which use the DMD front-end.
Authors:
Walter Bright
License:
Boost License 1.0

Source root/response.d

Documentation https://dlang.org/phobos/dmd_root_response.html

Coverage https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/response.d

alias `responseExpand` = responseExpandFrom!(lookupInEnvironment).responseExpandFrom;
nothrow bool `responseExpandFrom`(alias lookup)(ref Strings `args`);
  Expand any response files in command line. Response files are arguments that look like: @NAME The names are resolved by calling the 'lookup' function passed as a template parameter. That function is expected to first check the environment and then the file system. Arguments are separated by spaces, tabs, or newlines. These can be imbedded within arguments by enclosing the argument in "". Backslashes can be used to escape a ". A line comment can be started with #. Recursively expands nested response files.
  To use, put the arguments in a Strings object and call this on it.
  Digital Mars's MAKE program can be notified that a program can accept long command lines via environment variables by preceding the rule line for the program with a *.
  Parameters:

  lookup | alias to a function that is called to look up response file arguments in the environment. It is expected to accept a null- terminated string and return a mutable char[] that ends with a null-terminator or null if the response file could not be resolved.
  Strings `args` | array containing arguments as null-terminated strings

  Returns:
  true on success, false if a response file could not be expanded.
nothrow bool `insertArgumentsFromResponse`(char[] `buffer`, ref Strings `args`, ref size_t `argIndex`);
  Take the contents of a response-file 'buffer', parse it and put the resulting arguments in 'args' at 'argIndex'. 'argIndex' will be updated to point just after the inserted arguments. The logic of this should match that in setargv()
  Parameters:

  char[] `buffer` | mutable string containing the response file
  Strings `args` | list of arguments
  size_t `argIndex` | position in 'args' where response arguments are inserted

  Returns:
  true if another response argument was found

Copyright © 1999-2020 by the D Language Foundation | Page generated by Ddoc on Sun Feb 9 20:05:11 2020