Get rid of set_default_file_name()
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 16 Dec 2013 16:18:22 +0000 (18:18 +0200)
committerTeemu Murtola <teemu.murtola@gmail.com>
Tue, 24 Dec 2013 04:38:20 +0000 (06:38 +0200)
commitde33f1a1f78a0a3ec7dd0be94f543307827b38a6
tree99530b6b8589200fba925006730308056b321f34
parentfde91ce3cd71570594371a80ab11312f489d01a0
Get rid of set_default_file_name()

A global variable protected by a mutex is not actually required to get
the same functionality: the default value can be simply passed to
parse_file_args(), and propagated where needed.  This makes the design
properly thread-safe, allows separation of file type handling from file
argument handling (not done here), and simplifies the logic by removing
confusing bCanNotOverride parameters (replaced by passing the default
file name only where it belongs).

Also, clean up includes in filenm.*.

Change-Id: I831576963b40f9e0a8bbaa741c80c3e59ec6f85c
src/gromacs/commandline/pargs.cpp
src/gromacs/fileio/filenm.c
src/gromacs/fileio/filenm.h