Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
branch update, use Rstart structure in system.c
git-svn-id: https://svn.r-project.org/R/trunk@4640 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed May 18, 1999
1 parent 54eea26 commit 5486982
Show file tree
Hide file tree
Showing 8 changed files with 256 additions and 140 deletions.
38 changes: 38 additions & 0 deletions src/gnuwin32/Startup.h
@@ -0,0 +1,38 @@
typedef int (*blah1) (char *, char *, int, int);
typedef void (*blah2) (char *, int);
typedef void (*blah3) ();
typedef void (*blah4) (char *);
typedef int (*blah5) (char *);
typedef void (*blah6) (int);
#ifdef Win32
typedef enum {RGui, RTerm, LinkDLL} UImode;
#endif

typedef struct
{
char *rhome; /* R_HOME */
char *home; /* HOME */
blah1 ReadConsole;
blah2 WriteConsole;
blah3 CallBack;
blah4 message;
blah5 yesnocancel;
blah6 busy;
int R_Quiet; /* > 0 to suppress messages */
int R_Slave; /* ?? */
int R_Interactive;
int R_Verbose;
int RestoreAction; /* Read HOME/.RData if > 0 */
int SaveAction;
int LoadSiteFile;
int LoadInitFile;
int DebugInitFile;
int NoRenviron;
int vsize;
int nsize;
#ifdef Win32
UImode CharacterMode;
#endif
} structRstart;

typedef structRstart *Rstart;
4 changes: 3 additions & 1 deletion src/gnuwin32/console.c
Expand Up @@ -219,8 +219,10 @@ static xbuf file2xbuf(char *name,int del)
for (q = p, ms = 1, dim = rr; *q; q++) {
if (*q == '\t')
dim += TABSIZE;
else if (*q == '\n')
else if (*q == '\n') {
dim++;
ms++;
}
}
if ((xb = newxbuf(dim + 1, ms, 1)))
for (q = p; *q; q++)
Expand Down
17 changes: 12 additions & 5 deletions src/gnuwin32/devga.c
Expand Up @@ -1039,7 +1039,7 @@ static int X11_Open(DevDesc *dd, x11Desc *xd, char *dsp, double w, double h)
setdata(bt, (void *) dd);
r.x += (btsize + 6);

MCHECK(bt = newtoolbutton(print_image, r, menuclpwm));
MCHECK(bt = newtoolbutton(print_image, r, menuprint));
MCHECK(addtooltip(bt, "Print"));
gsetcursor(bt, ArrowCursor);
setdata(bt, (void *) dd);
Expand Down Expand Up @@ -1315,8 +1315,11 @@ static void X11_NewPage(DevDesc *dd)
xd->bgcolor = rgb(R_RED(xd->bg),
R_GREEN(xd->bg),
R_BLUE(xd->bg));
xd->clip = getrect(xd->gawin);
DRAW(gfillrect(_d, xd->bgcolor, xd->clip));
if (xd->kind)
xd->clip = getrect(xd->gawin);
else
xd->clip = getrect(xd->bm);
DRAW(gfillrect(_d, xd->bgcolor, getrect(_d)));
if (xd->kind)
xd->needsave = 1;
}
Expand Down Expand Up @@ -1635,13 +1638,17 @@ static void X11_Text(double x, double y, int coords,
else
x -= pixs;
SetFont(dd->gp.font, size, rot, dd);
SetColor(dd->gp.col, dd),
SetColor(dd->gp.col, dd);
#ifdef NOCLIPTEXT
gsetcliprect(xd->gawin, getrect(xd->gawin));
gdrawstr(xd->gawin, xd->font, xd->fgcolor, pt(x, y), str);
if (!xd->kind) {
gsetcliprect(xd->bm, getrect(xd->bm));
gdrawstr(xd->bm, xd->font, xd->fgcolor, pt(x, y), str);
}
#else
DRAW(gdrawstr(_d, xd->font, xd->fgcolor, pt(x,y), str));
#endif
}

/********************************************************/
Expand Down Expand Up @@ -1847,7 +1854,7 @@ X11DeviceDriver
/* Clipping is problematic for X11 */
/* Graphics is clipped, text is not */

dd->dp.canResizePlot = 0;
dd->dp.canResizePlot = 1;
dd->dp.canChangeFont = 0;
dd->dp.canRotateText = 1;
dd->dp.canResizeText = 1;
Expand Down
5 changes: 3 additions & 2 deletions src/gnuwin32/fixed/profile/rconsole
Expand Up @@ -12,8 +12,9 @@ statusbar = yes
## Font.
# Please use only fixed width font.
# If font=FixedFont the system fixed font is used; in this case
# points and style are ignored
font = Courier New
# points and style are ignored. If font begin by TT, only
# True Type font are searched.
font = TT Courier New
points = 10
style = normal # Style can be normal, bold, italic

Expand Down
49 changes: 26 additions & 23 deletions src/gnuwin32/fixed/profile/rdevga
Expand Up @@ -2,32 +2,35 @@
# A user copy can be installed in ''HOME''.

# Format is
# face:style
# [TT] face:style
# where style is plain, bold, italic and bold&italic.
# Only the first 32 font will be used
# If 'TT' is present, only True Type fonts are searched.
# Remarks:
# (a) Windows graphic engine can rotate only True Type fonts;
# (b) Only the first 32 font will be used.

Times New Roman : plain
Times New Roman : bold
Times New Roman : italic
Times New Roman : bold&italic
TT Times New Roman : plain
TT Times New Roman : bold
TT Times New Roman : italic
TT Times New Roman : bold&italic

#Please, don't change the following definition. The plot math engine
#assume that font5 contains greek letters and math symbols
Symbol: plain
# Please, don't change the following definition. The plot math engine
# assume that font5 contains greek letters and math symbols
TT Symbol: plain

Arial : plain
Arial : bold
Arial : italic
Arial : bold&italic
Courier New: plain
Courier New: bold
Courier New: italic
Courier New: bold&italic
TT Arial : plain
TT Arial : bold
TT Arial : italic
TT Arial : bold&italic
TT Courier New: plain
TT Courier New: bold
TT Courier New: italic
TT Courier New: bold&italic

Century Gothic : plain
Century Gothic : bold
Century Gothic : italic
Century Gothic : bold&italic
TT Century Gothic : plain
TT Century Gothic : bold
TT Century Gothic : italic
TT Century Gothic : bold&italic

Matisse ITC: plain
Wingdings: plain
TT Matisse ITC: plain
TT Wingdings: plain
4 changes: 2 additions & 2 deletions src/gnuwin32/fixed/r/zero.R
Expand Up @@ -13,8 +13,8 @@

dyn.load(file.path(R.home(), "demos", "dynload", "zero.dll"))
##-- you may need to change this to
## dyn.load("<RHOME>/demos/dynload/zero.so")
##-- substituting the proper path for <RHOME>,
## dyn.load("<R_HOME>/demos/dynload/zero.so")
##-- substituting the proper path for <R_HOME>,
## unless you are executing R from the directory containing zero.so

zero <- function(f, guesses, tol = 1e-7) {
Expand Down
14 changes: 11 additions & 3 deletions src/gnuwin32/graphapp/gdraw.c
Expand Up @@ -521,12 +521,20 @@ font gnewfont(drawing d, char *face, int style, int size, double rot)
lf.lfCharSet = SYMBOL_CHARSET;
else
lf.lfCharSet = ANSI_CHARSET;
lf.lfOutPrecision = OUT_TT_ONLY_PRECIS ;
lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf.lfQuality = DEFAULT_QUALITY;
lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
strncpy(lf.lfFaceName, face, LF_FACESIZE-1);

if ((strlen(face)>1) &&
(face[0]== 'T') && (face[1] == 'T')) {
char *pf;
lf.lfOutPrecision = OUT_TT_ONLY_PRECIS ;
for (pf = &face[2]; isspace(*pf) ; pf++);
strncpy(lf.lfFaceName, pf, LF_FACESIZE-1);
}
else {
lf.lfOutPrecision = OUT_DEFAULT_PRECIS ;
strncpy(lf.lfFaceName, face, LF_FACESIZE-1);
}
if (style & Italic)
lf.lfItalic = 1;
if (style & Bold)
Expand Down

0 comments on commit 5486982

Please sign in to comment.