1 /*============================================================================ 2 PGSBOX 7.7 - draw curvilinear coordinate axes for PGPLOT. 3 Copyright (C) 1997-2021, Mark Calabretta 4 5 This file is part of PGSBOX. 6 7 PGSBOX is free software: you can redistribute it and/or modify it under the 8 terms of the GNU Lesser General Public License as published by the Free 9 Software Foundation, either version 3 of the License, or (at your option) 10 any later version. 11 12 PGSBOX is distributed in the hope that it will be useful, but WITHOUT ANY 13 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 15 more details. 16 17 You should have received a copy of the GNU Lesser General Public License 18 along with PGSBOX. If not, see http://www.gnu.org/licenses. 19 20 Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. 21 http://www.atnf.csiro.au/people/Mark.Calabretta 22 $Id: cpgsbox.h,v 7.7 2021/07/12 06:36:49 mcalabre Exp $ 23 *============================================================================= 24 * 25 * cpgsbox() and cpglbox() are C wrappers for PGSBOX and PGLBOX. Refer to the 26 * prologue of pgsbox.f for an explanation of the argument list and usage 27 * notes. 28 * 29 * The argument lists for cpgsbox()/cpglbox() differ from PGSBOX/PGLBOX in 30 * the following respects: 31 * 32 * idents char[3][80] 33 * Fixed length character array. 34 * opt char[2] Fixed length character array. 35 * nlfunc nlfunc_t typedef for external function defined in cpgsbox.h. 36 * cache double[][4] 37 * Array indices reversed. 38 * 39 * Note also that the array arguments to cpgsbox()/cpglbox() are all 40 * 0-relative, while several of those of PGSBOX/PGLBOX are 0-relative (GRID1, 41 * GRID2, and CACHE) with the remainder 1-relative. In particular, the two- 42 * dimensional CACHE array has a mixture of 0-, and 1-relative indices, and 43 * the indices are reversed in C because of the differing C and FORTRAN array 44 * indexing policy. Moreover, as in PGSBOX/PGLBOX, nc is the upper array 45 * index, not the array length, so the array should be dimensioned as 46 * cache[nc+1][4]. 47 * 48 *===========================================================================*/ 49 #ifndef PGSBOX_CPGSBOX 50 #define PGSBOX_CPGSBOX 51 52 #ifdef __cplusplus 53 extern "C" { 54 #endif 55 56 typedef void nlfunc_t(int *, int *, int *, int *, char *, int *, double *, 57 double *, double *, int *, double *, int *); 58 59 void cpgsbox( 60 const float blc[2], 61 const float trc[2], 62 char (*idents)[80], 63 const char opt[2], 64 int labctl, 65 int labden, 66 const int ci[7], 67 const int gcode[2], 68 double tiklen, 69 int ng1, 70 const double *grid1, 71 int ng2, 72 const double *grid2, 73 int doeq, 74 nlfunc_t nlfunc, 75 int nlc, 76 int nli, 77 int nld, 78 char nlcprm[], 79 int nliprm[], 80 double nldprm[], 81 int nc, 82 int *ic, 83 double cache[][4], 84 int *ierr); 85 86 void cpglbox( 87 char (*idents)[80], 88 const char opt[2], 89 int labctl, 90 int labden, 91 const int ci[7], 92 const int gcode[2], 93 double tiklen, 94 int ng1, 95 const double *grid1, 96 int ng2, 97 const double *grid2, 98 int doeq, 99 int nc, 100 int *ic, 101 double cache[][4], 102 int *ierr); 103 104 #ifdef __cplusplus 105 } 106 #endif 107 108 #endif // PGSBOX_CPGSBOX 109