Skip to content

Commit

Permalink
SPM12 r6470
Browse files Browse the repository at this point in the history
  • Loading branch information
SPMcentral committed Jun 3, 2015
1 parent f6948ff commit 61d19bb
Show file tree
Hide file tree
Showing 721 changed files with 38,557 additions and 15,419 deletions.
40 changes: 24 additions & 16 deletions @file_array/private/init.c
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
/*
* $Id: init.c 6076 2014-06-30 13:41:11Z guillaume $
* $Id: init.c 6428 2015-05-06 14:09:04Z guillaume $
* Guillaume Flandin
*/

#ifndef MATLAB_MEX_FILE
#undef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#include <stdio.h>
#include <sys/stat.h>
#define structStat struct stat64
#define getFileFstat fstat64
#define getFilePos fgetpos64
#define setFilePos fsetpos64
#define fpos_T fpos64_t
# undef _LARGEFILE64_SOURCE
# define _LARGEFILE64_SOURCE
# include <stdio.h>
# include <sys/stat.h>
# if defined(__APPLE__)
# define structStat struct stat
# define getFileFstat fstat
# define getFilePos fgetpos
# define setFilePos fsetpos
# define fpos_T fpos_t
# else
# define structStat struct stat64
# define getFileFstat fstat64
# define getFilePos fgetpos64
# define setFilePos fsetpos64
# define fpos_T fpos64_t
# endif
#else
#include "io64.h"
# include "io64.h"
#endif
#include "mex.h"
#ifdef SPM_WIN32
#include <io.h>
#define snprintf _snprintf
#define ftruncate _chsize_s
# include <io.h>
# define snprintf _snprintf
# define ftruncate _chsize_s
#else
#include <unistd.h>
#include <sys/types.h>
# include <unistd.h>
# include <sys/types.h>
#endif


Expand Down
12 changes: 6 additions & 6 deletions @gifti/Contents.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
% This MATLAB class is part of SPM:
% http://www.fil.ion.ucl.ac.uk/spm/
%
% It relies on external MATLAB code:
% It relies on external libraries:
% Base64, by Peter J. Acklam:
% http://home.online.no/~pjacklam/
% dzip, by Michael Kleder:
% http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=8899
% miniz, by Rich Geldreich:
% http://code.google.com/p/miniz/
% XMLTree, by Guillaume Flandin:
% http://www.artefact.tk/software/matlab/xml/
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
% Copyright (C) 2008-2015 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: Contents.m 2076 2008-09-10 12:34:08Z guillaume $
% $Id: Contents.m 6404 2015-04-13 14:29:53Z guillaume $

% GIfTI file format for MATLAB (The Mathworks, Inc.).
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
% Copyright (C) 2008-2015 Wellcome Trust Centre for Neuroimaging
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
Expand Down
6 changes: 3 additions & 3 deletions @gifti/export.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
% Export a GIfTI object into specific MATLAB struct
% FORMAT s = export(this,target)
% this - GIfTI object
% target - string describing target output [default: Matlab]
% target - string describing target output [default: MATLAB]
% s - a structure containing public fields of the object
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: export.m 5160 2012-12-21 16:58:38Z guillaume $
% $Id: export.m 6401 2015-04-09 17:21:33Z guillaume $

if numel(this) > 1, warning('Only handle scalar objects yet.'); end

if nargin <= 1, target = 'Matlab'; end
if nargin <= 1, target = 'MATLAB'; end

switch lower(target)
case 'matlab'
Expand Down
4 changes: 2 additions & 2 deletions @gifti/fieldnames.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: fieldnames.m 5608 2013-08-13 15:13:19Z guillaume $
% $Id: fieldnames.m 6345 2015-02-20 12:25:50Z guillaume $

if numel(this) > 1, warning('Only handle scalar objects yet.'); end

pfn = {'vertices' 'faces' 'normals' 'cdata' 'mat' 'labels'};
pfn = {'vertices' 'faces' 'normals' 'cdata' 'mat' 'labels' 'indices'};

names = pfn(isintent(this,pfn));
6 changes: 3 additions & 3 deletions @gifti/gifti.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: gifti.m 5322 2013-03-13 15:04:14Z guillaume $
% $Id: gifti.m 6347 2015-02-24 17:59:16Z guillaume $

switch nargin

Expand All @@ -21,8 +21,8 @@
this = varargin{1};

elseif isstruct(varargin{1})
f = {'faces', 'face', 'tri' 'vertices', 'vert', 'pnt', 'cdata'};
ff = {'faces', 'faces', 'faces', 'vertices', 'vertices', 'vertices', 'cdata'};
f = {'faces', 'face', 'tri' 'vertices', 'vert', 'pnt', 'cdata', 'indices'};
ff = {'faces', 'faces', 'faces', 'vertices', 'vertices', 'vertices', 'cdata', 'indices'};
[c, ia] = intersect(f,fieldnames(varargin{1}));
if ~isempty(c)
this = gifti;
Expand Down
34 changes: 34 additions & 0 deletions @gifti/private/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env make -f
# GIfTI Makefile called by {SPM}/src/Makefile
#
# Copyright (C) 2015 Wellcome Trust Centre for Neuroimaging
#
# $Id: Makefile 6402 2015-04-09 18:11:06Z guillaume $

include ../../src/Makefile.var

SPMMEX = zstream.$(SUF)

ifeq (mex,$(SUF))
export CFLAGS = $(shell $(MEX) -p CFLAGS) -std=c99
else
MEXOPTS += CFLAGS='$$CFLAGS -std=c99'
endif

all: $(SPMMEX)
@:

clean:
@:

distclean: clean
$(DEL) $(SPMMEX)

install:
@:

tarball: all
$(TAR) cf spm_mex.tar $(SPMMEX)

%.$(SUF) : %.c
$(MEX) $< $(MEXEND)
19 changes: 0 additions & 19 deletions @gifti/private/dunzip.m

This file was deleted.

22 changes: 0 additions & 22 deletions @gifti/private/dzip.m

This file was deleted.

9 changes: 7 additions & 2 deletions @gifti/private/isintent.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: isintent.m 5608 2013-08-13 15:13:19Z guillaume $
% $Id: isintent.m 6345 2015-02-20 12:25:50Z guillaume $

a = [];
b = [];
Expand Down Expand Up @@ -39,6 +39,12 @@
a(end+1) = loc;
b(end+1) = i;
end
case 'NODE_INDEX'
[tf, loc] = ismember('indices',intent);
if tf
a(end+1) = loc;
b(end+1) = i;
end
case cdata
[tf, loc] = ismember('cdata',intent);
if tf
Expand Down Expand Up @@ -101,7 +107,6 @@
'TIME_SERIES'
'RGB_VECTOR'
'RGBA_VECTOR'
'NODE_INDEX'
'SHAPE'
'CONNECTIVITY_DENSE'
'CONNECTIVITY_DENSE_TIME'
Expand Down
Loading

0 comments on commit 61d19bb

Please sign in to comment.