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 Warning ft_getopt.c: 21 local `int index' is not referenced see http://www.mathworks.com/matlabcentral/newsreader/view_thread/86761 I just added src/platform.h and src/compiler.h. You should extend compiler.h with the LCC define from http://predef.sourceforge.net/precomp.html. Then in ft_getopt you'll have to make the include conditional on the platform and compiler. See peer/src/platform_includes.h for an example of how to include specific headers on specific compile targets. </p>

Robert Oostenveld - 2011-07-13 14:46:58 +0200

changed the status for a whole bunch of resolved bugs to CLOSED