1 /* block/gsl_block_short.h
3 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __GSL_BLOCK_SHORT_H__
21 #define __GSL_BLOCK_SHORT_H__
24 #include <gsl/gsl_errno.h>
29 # define __BEGIN_DECLS extern "C" {
30 # define __END_DECLS }
32 # define __BEGIN_DECLS /* empty */
33 # define __END_DECLS /* empty */
38 struct gsl_block_short_struct
44 typedef struct gsl_block_short_struct gsl_block_short;
46 gsl_block_short *gsl_block_short_alloc (const size_t n);
47 gsl_block_short *gsl_block_short_calloc (const size_t n);
48 void gsl_block_short_free (gsl_block_short * b);
50 int gsl_block_short_fread (FILE * stream, gsl_block_short * b);
51 int gsl_block_short_fwrite (FILE * stream, const gsl_block_short * b);
52 int gsl_block_short_fscanf (FILE * stream, gsl_block_short * b);
53 int gsl_block_short_fprintf (FILE * stream, const gsl_block_short * b, const char *format);
55 int gsl_block_short_raw_fread (FILE * stream, short * b, const size_t n, const size_t stride);
56 int gsl_block_short_raw_fwrite (FILE * stream, const short * b, const size_t n, const size_t stride);
57 int gsl_block_short_raw_fscanf (FILE * stream, short * b, const size_t n, const size_t stride);
58 int gsl_block_short_raw_fprintf (FILE * stream, const short * b, const size_t n, const size_t stride, const char *format);
60 size_t gsl_block_short_size (const gsl_block_short * b);
61 short * gsl_block_short_data (const gsl_block_short * b);
65 #endif /* __GSL_BLOCK_SHORT_H__ */