Back to the main page.
Bug 788 - recompile src/ft_getopt.c on linux 32+64 and windows 32+64
Status | CLOSED FIXED |
Reported | 2011-06-29 14:34:00 +0200 |
Modified | 2011-07-13 14:46:58 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Jörn M. Horschig |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2011-06-29 14:34:56 +0200
I added the following to ft_getopt.m, and extended ft_getopt.c accordingly +if isempty(val) && ~isempty(default) + % use the default value instead of the empty input that was specified: + % this applies for example if you do functionname('key', []), where + % the empty is meant to indicate that the user does not know or care + % what the value is + val = default; +end
Robert Oostenveld - 2011-06-29 14:36:46 +0200
e.g. cfg.option = [] val = ft_getopt(cfg, 'option', 1) should return 1 instead of [].
Robert Oostenveld - 2011-06-29 14:37:34 +0200
PS I already recompiled it for 32 and 64 bit mac os x
Jörn M. Horschig - 2011-07-06 15:39:38 +0200
see mail I just sent you
Robert Oostenveld - 2011-07-06 15:49:20 +0200
lcc preprocessor error: ft_getopt.c:16 Could not find include file