| 1 |
/*
|
1 |
/*
|
| 2 |
* R : A Computer Language for Statistical Data Analysis
|
2 |
* R : A Computer Language for Statistical Data Analysis
|
| 3 |
* Copyright (C) 1998-2002 Robert Gentleman, Ross Ihaka
|
3 |
* Copyright (C) 1998-2002 Robert Gentleman, Ross Ihaka
|
| 4 |
* and the R Development Core Team
|
4 |
* and the R Development Core Team
|
| 5 |
*
|
5 |
*
|
| 6 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* This program is free software; you can redistribute it and/or modify
|
| 7 |
* it under the terms of the GNU Lesser General Public License as published by
|
7 |
* it under the terms of the GNU Lesser General Public License as published by
|
| 8 |
* the Free Software Foundation; either version 2.1 of the License, or
|
8 |
* the Free Software Foundation; either version 2.1 of the License, or
|
| 9 |
* (at your option) any later version.
|
9 |
* (at your option) any later version.
|
| 10 |
*
|
10 |
*
|
| 11 |
* This program is distributed in the hope that it will be useful,
|
11 |
* This program is distributed in the hope that it will be useful,
|
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
* GNU Lesser General Public License for more details.
|
14 |
* GNU Lesser General Public License for more details.
|
| 15 |
*
|
15 |
*
|
| 16 |
* You should have received a copy of the GNU Lesser General Public License
|
16 |
* You should have received a copy of the GNU Lesser General Public License
|
| 17 |
* along with this program; if not, write to the Free Software
|
17 |
* along with this program; if not, write to the Free Software
|
| 18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 19 |
*/
|
19 |
*/
|
| 20 |
|
20 |
|
| 21 |
/*
|
21 |
/*
|
| 22 |
* Generally useful print utilities *NOT* relying on R internals (from Defn.h)
|
22 |
* Generally useful print utilities *NOT* relying on R internals (from Defn.h)
|
| 23 |
*
|
23 |
*
|
| 24 |
* (not useful anymore; use R_print struct with SEXP) --> Print.h
|
24 |
* (not useful anymore; use R_print struct with SEXP) --> Print.h
|
| 25 |
*/
|
25 |
*/
|
| 26 |
#ifndef PRTUTIL_H_
|
26 |
#ifndef PRTUTIL_H_
|
| 27 |
#define PRTUTIL_H_
|
27 |
#define PRTUTIL_H_
|
| 28 |
|
28 |
|
| 29 |
#include <R_ext/Complex.h>
|
29 |
#include <R_ext/Complex.h>
|
| 30 |
#include <R_ext/Print.h>
|
30 |
#include <R_ext/Print.h>
|
| 31 |
|
31 |
|
| 32 |
#ifndef R_NO_REMAP
|
- |
|
| 33 |
#define formatLogical Rf_formatLogical
|
32 |
#define formatLogical Rf_formatLogical
|
| 34 |
#define formatInteger Rf_formatInteger
|
33 |
#define formatInteger Rf_formatInteger
|
| 35 |
#define formatReal Rf_formatReal
|
34 |
#define formatReal Rf_formatReal
|
| 36 |
#define formatComplex Rf_formatComplex
|
35 |
#define formatComplex Rf_formatComplex
|
| 37 |
#define EncodeLogical Rf_EncodeLogical
|
36 |
#define EncodeLogical Rf_EncodeLogical
|
| 38 |
#define EncodeInteger Rf_EncodeInteger
|
37 |
#define EncodeInteger Rf_EncodeInteger
|
| 39 |
#define EncodeReal Rf_EncodeReal
|
38 |
#define EncodeReal Rf_EncodeReal
|
| 40 |
#define EncodeComplex Rf_EncodeComplex
|
39 |
#define EncodeComplex Rf_EncodeComplex
|
| 41 |
#define EncodeString Rf_EncodeString
|
40 |
#define EncodeString Rf_EncodeString
|
| 42 |
#define VectorIndex Rf_VectorIndex
|
41 |
#define VectorIndex Rf_VectorIndex
|
| 43 |
#define printIntegerVector Rf_printIntegerVector
|
42 |
#define printIntegerVector Rf_printIntegerVector
|
| 44 |
#define printRealVector Rf_printRealVector
|
43 |
#define printRealVector Rf_printRealVector
|
| 45 |
#define printComplexVector Rf_printComplexVector
|
44 |
#define printComplexVector Rf_printComplexVector
|
| 46 |
#endif
|
- |
|
| 47 |
|
45 |
|
| 48 |
#define Rprt_adj_right 1
|
46 |
#define Rprt_adj_right 1
|
| 49 |
#define Rprt_adj_left 0
|
47 |
#define Rprt_adj_left 0
|
| 50 |
|
48 |
|
| 51 |
#ifdef __cplusplus
|
49 |
#ifdef __cplusplus
|
| 52 |
extern "C" {
|
50 |
extern "C" {
|
| 53 |
#endif
|
51 |
#endif
|
| 54 |
|
52 |
|
| 55 |
/* Computation of printing formats */
|
53 |
/* Computation of printing formats */
|
| 56 |
void formatLogical(int*,int,int*);
|
54 |
void formatLogical(int*,int,int*);
|
| 57 |
void formatInteger(int*,int,int*);
|
55 |
void formatInteger(int*,int,int*);
|
| 58 |
void formatReal(double*, int, int*, int*, int*, int);
|
56 |
void formatReal(double*, int, int*, int*, int*, int);
|
| 59 |
void formatComplex(Rcomplex*, int, int*, int*, int*, int*, int*, int*, int);
|
57 |
void formatComplex(Rcomplex*, int, int*, int*, int*, int*, int*, int*, int);
|
| 60 |
|
58 |
|
| 61 |
/* Formating of values */
|
59 |
/* Formating of values */
|
| 62 |
char *EncodeLogical(int, int);
|
60 |
char *EncodeLogical(int, int);
|
| 63 |
char *EncodeInteger(int, int);
|
61 |
char *EncodeInteger(int, int);
|
| 64 |
char *EncodeReal(double, int, int, int);
|
62 |
char *EncodeReal(double, int, int, int);
|
| 65 |
char *EncodeComplex(Rcomplex, int, int, int, int, int, int);
|
63 |
char *EncodeComplex(Rcomplex, int, int, int, int, int, int);
|
| 66 |
char *EncodeString(char*, int, int, int);
|
64 |
char *EncodeString(char*, int, int, int);
|
| 67 |
|
65 |
|
| 68 |
/* Printing */
|
66 |
/* Printing */
|
| 69 |
void VectorIndex(int, int);
|
67 |
void VectorIndex(int, int);
|
| 70 |
|
68 |
|
| 71 |
void printLogicalVector(int *x, int n, int indx);
|
69 |
void printLogicalVector(int *x, int n, int indx);
|
| 72 |
void printIntegerVector(int *x, int n, int indx);
|
70 |
void printIntegerVector(int *x, int n, int indx);
|
| 73 |
void printRealVector (double *x, int n, int indx);
|
71 |
void printRealVector (double *x, int n, int indx);
|
| 74 |
void printComplexVector(Rcomplex *x,int n, int indx);
|
72 |
void printComplexVector(Rcomplex *x,int n, int indx);
|
| 75 |
|
73 |
|
| 76 |
char *Rsprintf(char*, ...);
|
74 |
char *Rsprintf(char*, ...);
|
| 77 |
#ifdef __cplusplus
|
75 |
#ifdef __cplusplus
|
| 78 |
}
|
76 |
}
|
| 79 |
#endif
|
77 |
#endif
|
| 80 |
|
78 |
|
| 81 |
#endif /* PRTUTIL_H_ */
|
79 |
#endif /* PRTUTIL_H_ */
|