The R Project SVN R

Rev

Rev 67181 | Rev 72446 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 67181 Rev 67634
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996, 1997 Robert Gentleman and Ross Ihaka
3
 *  Copyright (C) 1995, 1996, 1997 Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1998-2014 The R Core Team
4
 *  Copyright (C) 1998-2015 The R Core Team
5
 *
5
 *
6
 *  This source code module:
6
 *  This source code module:
7
 *  Copyright (C) 1997, 1998 Paul Murrell and Ross Ihaka
7
 *  Copyright (C) 1997, 1998 Paul Murrell and Ross Ihaka
8
 *  Copyright (C) 1998-2014 The R Core Team
8
 *  Copyright (C) 1998-2015 The R Core Team
9
 *
9
 *
10
 *  This program is free software; you can redistribute it and/or modify
10
 *  This program is free software; you can redistribute it and/or modify
11
 *  it under the terms of the GNU General Public License as published by
11
 *  it under the terms of the GNU General Public License as published by
12
 *  the Free Software Foundation; either version 2 of the License, or
12
 *  the Free Software Foundation; either version 2 of the License, or
13
 *  (at your option) any later version.
13
 *  (at your option) any later version.
Line 1940... Line 1940...
1940
	    code = S_BRACKETRIGHTTP;
1940
	    code = S_BRACKETRIGHTTP;
1941
    }
1941
    }
1942
    else if (StringAtom(head) && length(head) > 0) {
1942
    else if (StringAtom(head) && length(head) > 0) {
1943
	if (StringMatch(head, "|"))
1943
	if (StringMatch(head, "|"))
1944
	    code = '|';
1944
	    code = '|';
1945
	else if (StringMatch(head, "||"))
1945
	else if (StringMatch(head, "||"))  // historical anomaly
1946
	    code = 2;
1946
	    code = '|';
1947
	else if (StringMatch(head, "("))
1947
	else if (StringMatch(head, "("))
1948
	    code = '(';
1948
	    code = '(';
1949
	else if (StringMatch(head, ")"))
1949
	else if (StringMatch(head, ")"))
1950
	    code = ')';
1950
	    code = ')';
1951
	else if (StringMatch(head, "["))
1951
	else if (StringMatch(head, "["))
Line 1989... Line 1989...
1989
    if (length(expr) != 4)
1989
    if (length(expr) != 4)
1990
	errorcall(expr, _("invalid group specification"));
1990
	errorcall(expr, _("invalid group specification"));
1991
    bbox = NullBBox();
1991
    bbox = NullBBox();
1992
    code = DelimCode(expr, CADR(expr));
1992
    code = DelimCode(expr, CADR(expr));
1993
    gc->cex = DelimSymbolMag * gc->cex;
1993
    gc->cex = DelimSymbolMag * gc->cex;
1994
    if (code == 2) { // "||"
-
 
1995
	bbox = RenderSymbolChar('|', draw, mc, gc, dd);
-
 
1996
	bbox = RenderSymbolChar('|', draw, mc, gc, dd);
-
 
1997
    }
-
 
1998
    else if (code != '.')
1994
    if (code != '.')
1999
	bbox = RenderSymbolChar(code, draw, mc, gc, dd);
1995
	bbox = RenderSymbolChar(code, draw, mc, gc, dd);
2000
    gc->cex = cexSaved;
1996
    gc->cex = cexSaved;
2001
    bbox = CombineBBoxes(bbox, RenderElement(CADDR(expr), draw, mc, gc, dd));
1997
    bbox = CombineBBoxes(bbox, RenderElement(CADDR(expr), draw, mc, gc, dd));
2002
    bbox = RenderItalicCorr(bbox, draw, mc, gc, dd);
1998
    bbox = RenderItalicCorr(bbox, draw, mc, gc, dd);
2003
    code = DelimCode(expr, CADDDR(expr));
1999
    code = DelimCode(expr, CADDDR(expr));
2004
    gc->cex = DelimSymbolMag * gc->cex;
2000
    gc->cex = DelimSymbolMag * gc->cex;
2005
    if (code == 2) {
-
 
2006
	bbox = CombineBBoxes(bbox, RenderSymbolChar('|', draw, mc, gc, dd));
-
 
2007
	bbox = CombineBBoxes(bbox, RenderSymbolChar('|', draw, mc, gc, dd));
-
 
2008
    }
-
 
2009
    else if (code != '.')
2001
    if (code != '.')
2010
	bbox = CombineBBoxes(bbox, RenderSymbolChar(code, draw, mc, gc, dd));
2002
	bbox = CombineBBoxes(bbox, RenderSymbolChar(code, draw, mc, gc, dd));
2011
    gc->cex = cexSaved;
2003
    gc->cex = cexSaved;
2012
    return bbox;
2004
    return bbox;
2013
}
2005
}
2014
 
2006
 
Line 2034... Line 2026...
2034
    case '.':
2026
    case '.':
2035
	SetFont(prev, gc);
2027
	SetFont(prev, gc);
2036
	return NullBBox();
2028
	return NullBBox();
2037
	break;
2029
	break;
2038
    case '|':
2030
    case '|':
2039
    case 2: // "||"
-
 
2040
	top = 239; ext = 239; bot = 239; mid = 0;
2031
	top = 239; ext = 239; bot = 239; mid = 0;
2041
	break;
2032
	break;
2042
    case '(':
2033
    case '(':
2043
	top = 230; ext = 231; bot = 232; mid = 0;
2034
	top = 230; ext = 231; bot = 232; mid = 0;
2044
	break;
2035
	break;