Skip to content

Commit e9575ef

Browse files
author
ripley
committed
remove deprecated xfig() device
git-svn-id: https://svn.r-project.org/R/trunk@87956 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 8e8eedb commit e9575ef

File tree

8 files changed

+69
-1142
lines changed

8 files changed

+69
-1142
lines changed

doc/NEWS.Rd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,14 @@
316316
\item Building with the bundled (and old) version of
317317
\code{libintl} is deprecated and now gives a \command{configure
318318
warning}. This should be selected only if neither the OS's
319-
\code{libc} nor an external \code{libintl} library provide
320-
suitable functions.
319+
\code{libc} (as on GNU Linux) nor an external \code{libintl}
320+
library (as on Alpine Linux) provide suitable functions.
321321
322322
Instead install \code{libintl} from a recent version of GNU
323323
\I{gettext} or use \command{configure} option
324324
\option{--disable-nls}.
325+
326+
\item The deprecated \code{xfig()} graphics device has been removed.
325327
}
326328
}
327329
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# File src/library/grDevices/R/grDevices-defunct.R
2+
# Part of the R package, https://www.R-project.org
3+
#
4+
# Copyright (C) 2025 The R Core Team
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+
# A copy of the GNU General Public License is available at
17+
# https://www.R-project.org/Licenses/
18+
19+
## <entry>
20+
## Deprecated in 4.4.0
21+
## Defunct in 4.5.0
22+
xfig <- function (file = if(onefile) "Rplots.fig" else "Rplot%03d.fig",
23+
onefile = FALSE, encoding = "none",
24+
paper = "default", horizontal = TRUE,
25+
width = 0, height = 0, family = "Helvetica",
26+
pointsize = 12, bg = "transparent", fg = "black",
27+
pagecentre = TRUE,
28+
defaultfont = FALSE, textspecial = FALSE)
29+
{
30+
msg <- gettextf("'%s' was removed in R 4.5.0.\n", "xfig")
31+
msg <- paste(msg, "Consider an SVG device instead.")
32+
.Defunct(msg = msg)
33+
}
34+
## <entry/>

src/library/grDevices/R/postscript.R

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -277,29 +277,6 @@ postscript <- function(file = if(onefile) "Rplots.ps" else "Rplot%03d.ps",
277277
invisible()
278278
}
279279

280-
xfig <- function (file = if(onefile) "Rplots.fig" else "Rplot%03d.fig",
281-
onefile = FALSE, encoding = "none",
282-
paper = "default", horizontal = TRUE,
283-
width = 0, height = 0, family = "Helvetica",
284-
pointsize = 12, bg = "transparent", fg = "black",
285-
pagecentre = TRUE,
286-
defaultfont = FALSE, textspecial = FALSE)
287-
{
288-
msg <- gettextf("'%s' is deprecated.\n", "xfig")
289-
msg <- paste(msg, "Consider an SVG device instead.")
290-
.Deprecated(msg = msg)
291-
292-
## do initialization if needed
293-
initPSandPDFfonts()
294-
295-
if(!checkIntFormat(file))
296-
stop(gettextf("invalid 'file' argument '%s'", file), domain = NA)
297-
.External(C_XFig, file, paper, family, bg, fg,
298-
width, height, horizontal, pointsize,
299-
onefile, pagecentre, defaultfont, textspecial, encoding)
300-
invisible()
301-
}
302-
303280
pdf <- function(file = if(onefile) "Rplots.pdf" else "Rplot%03d.pdf",
304281
width, height, onefile, family, title, fonts, version,
305282
paper, encoding, bg, fg, pointsize, pagecentre, colormodel,
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
% File src/library/grDevices/man/grDevices-defunct.Rd
2+
% Part of the R package, https://www.R-project.org
3+
% Copyright 2025 R Core Team
4+
% Distributed under GPL 2 or later
5+
6+
\name{grDevices-defunct}
7+
\title{Defunct Objects in Package \pkg{grDevices}}
8+
\alias{grDevices-defunct}
9+
%------ PLEASE: put \alias{.} here for *each* (and keep them) !
10+
\alias{xfig}
11+
12+
\description{
13+
The functions or variables listed here are no longer part of \R as
14+
they are no loinger supported.
15+
}
16+
\usage{
17+
# Defunct in R 4.5.0
18+
xfig(file = if(onefile) "Rplots.fig" else "Rplot\%03d.fig",
19+
onefile = FALSE, encoding = "none",
20+
paper = "default", horizontal = TRUE,
21+
width = 0, height = 0, family = "Helvetica",
22+
pointsize = 12, bg = "transparent", fg = "black",
23+
pagecentre = TRUE, defaultfont = FALSE, textspecial = FALSE)
24+
}
25+
\seealso{
26+
\code{\link{Deprecated}},
27+
\code{\link{Defunct}}
28+
}
29+
\keyword{internal}

src/library/grDevices/man/xfig.Rd

Lines changed: 0 additions & 126 deletions
This file was deleted.

0 commit comments

Comments
 (0)