The R Project SVN R

Rev

Rev 87381 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 r 1
/*
2429 maechler 2
 *  R : A Computer Language for Statistical Data Analysis
87381 maechler 3
 *  Copyright (C) 1997--2024  The R Core Team.
2 r 4
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
42308 ripley 17
 *  along with this program; if not, a copy is available at
68949 ripley 18
 *  https://www.R-project.org/Licenses/
2 r 19
 */
20
 
70046 ripley 21
/* Internal header, not installed */
22
 
2 r 23
#ifndef PRINT_H_
24
#define PRINT_H_
25
 
60252 ripley 26
#include "Defn.h"
89100 luke 27
#include <PrtUtil.h>
60252 ripley 28
#include <R_ext/Print.h>
2 r 29
 
29902 ripley 30
#define formatRaw           Rf_formatRaw
7754 ripley 31
#define formatString        Rf_formatString
76734 luke 32
#define formatRawS          Rf_formatRawS
33
#define formatStringS       Rf_formatStringS
7754 ripley 34
#define EncodeElement       Rf_EncodeElement
66087 ripley 35
#define EncodeElement0      Rf_EncodeElement0
81205 luke 36
#define EncodeExptr         Rf_EncodeExtptr
37
#define EncodeElement       Rf_EncodeElement
7754 ripley 38
#define printArray          Rf_printArray
39
#define printMatrix         Rf_printMatrix
40
#define printNamedVector    Rf_printNamedVector
41
#define printVector         Rf_printVector
42
 
74837 maechler 43
/* For backward compatibility */
44
#define R_print_par_t R_PrintData
45
 
4619 maechler 46
extern R_print_par_t R_print;
2 r 47
 
48
/* Computation of printing formats */
73727 luke 49
void formatRaw(const Rbyte *, R_xlen_t, int *);
76734 luke 50
void formatString(const SEXP *, R_xlen_t, int *, int);
51
void formatRawS(SEXP, R_xlen_t, int *);
52
void formatStringS(SEXP, R_xlen_t, int*, int);
2 r 53
 
54
/* Formating of values */
74754 kalibera 55
const char *EncodeElement0(SEXP, R_xlen_t, int, const char *);
66087 ripley 56
const char *EncodeEnvironment(SEXP);
81205 luke 57
const char *EncodeExtptr(SEXP);
66087 ripley 58
/* Legacy, for R.app */
41861 ripley 59
const char *EncodeElement(SEXP, int, int, char);
2 r 60
 
22923 ripley 61
/* In Rinternals.h (and MUST be there):
2467 maechler 62
   CustomPrintValue,  PrintValue, PrintValueRec */
31569 pd 63
void printArray(SEXP, SEXP, int, int, SEXP);
41784 ripley 64
void printMatrix(SEXP, int, SEXP, int, int, SEXP, SEXP,
65
		 const char*, const char*);
66
void printNamedVector(SEXP, SEXP, int, const char*);
2 r 67
void printVector(SEXP, int, int);
61771 ripley 68
// void PrintClosure(SEXP, Rboolean);
69
// void PrintLanguage(SEXP, Rboolean);
10882 maechler 70
 
84150 maechler 71
/* Utilities for S compatibility and debugging */
10882 maechler 72
void R_PV(SEXP s);
73
 
4711 pd 74
/* Offset for rowlabels if there are named dimnames */
8552 maechler 75
#define R_MIN_LBLOFF 2
2 r 76
 
87381 maechler 77
/* Enforced in  ../main/options.c : */
8552 maechler 78
#define R_MIN_WIDTH_OPT		10
11103 ripley 79
#define R_MAX_WIDTH_OPT		10000
80330 maechler 80
#define R_MIN_DIGITS_OPT	1
8552 maechler 81
#define R_MAX_DIGITS_OPT	22
87381 maechler 82
#define R_MIN_SCIPEN_OPT        -9
83
#define R_MAX_SCIPEN_OPT	9999
8552 maechler 84
 
2 r 85
#endif