Skip to content

Commit 9a87a07

Browse files
author
kalibera
committed
Fix typos in comments (18900).
git-svn-id: https://svn.r-project.org/R/trunk@88254 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 14e0454 commit 9a87a07

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

src/library/grDevices/src/cairo/cairoFns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ static SEXP Cairo_Cap(pDevDesc dd)
14461446

14471447
/* Copy each byte of screen to an R matrix.
14481448
* The Cairo RGB24 needs to be converted to an R ABGR32.
1449-
* Cairo uses native endiannes (A=msb,R,G,B=lsb) so use int* instead of char* */
1449+
* Cairo uses native endianness (A=msb,R,G,B=lsb) so use int* instead of char* */
14501450
rint = (unsigned int *) INTEGER(raster);
14511451
for (i = 0; i < size; i++)
14521452
rint[i] = R_RGB((screenData[i] >> 16) & 255, (screenData[i] >> 8) & 255, screenData[i] & 255);
@@ -1895,7 +1895,7 @@ static void FT_getFont(pGEcontext gc, pDevDesc dd, double fs)
18951895
if (face == 3 || face == 4) slant = CAIRO_FONT_SLANT_ITALIC;
18961896
if (face != 5) {
18971897
/* This is a 'toy', remember?
1898-
The manual recommnends the CSS2 names "serif", "sans-serif",
1898+
The manual recommends the CSS2 names "serif", "sans-serif",
18991899
"monospace" */
19001900
char *fm = gc->fontfamily;
19011901
if (!fm[0]) fm = xd->basefontfamily;

src/library/grDevices/src/devPS.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -924,10 +924,10 @@ PostScriptMetricInfo(int c, double *ascent, double *descent, double *width,
924924
and these values are not considered when computing the FontBBox.
925925
926926
Also NBSP and Euro in some fonts. Should that be
927-
skipped for acent and descent? However:
927+
skipped for ascent and descent? However:
928928
1) There are currently no transliterations including
929929
space/NBSP (although macOS did at one point).
930-
2) The graphivs engine does not do this.
930+
2) The graphics engine does not do this.
931931
else if
932932
(metrics->CharInfo[c].BBox[0] == 0 &&
933933
metrics->CharInfo[c].BBox[1] == 0 &&
@@ -1722,7 +1722,7 @@ static SEXP getFont(const char *family, const char *fontdbname) {
17221722
}
17231723

17241724
/*
1725-
* Get the path to the afm file for a user-specifed font
1725+
* Get the path to the afm file for a user-specified font
17261726
* given a graphics engine font family and the face
17271727
* index (0..4)
17281728
*
@@ -5690,7 +5690,7 @@ static int newTiling(SEXP pattern, PDFDesc *pd)
56905690
PDF_Invalidate(pd);
56915691

56925692
/* Some finalisation that endpage does
5693-
* (to match the newpage initilisation)
5693+
* (to match the newpage initialisation)
56945694
*/
56955695
catDefn("Q\n", contentDefn, pd);
56965696
/* Cannot discard temporary definition because there may have been
@@ -5925,7 +5925,7 @@ static int newMask(SEXP mask, PDFDesc *pd)
59255925
PDF_Invalidate(pd);
59265926

59275927
/* Some finalisation that endpage does
5928-
* (to match the newpage initilisation)
5928+
* (to match the newpage initialisation)
59295929
*/
59305930
catDefn("Q\n", tempDefn, pd);
59315931
/* Cannot discard temporary definition because there may have been
@@ -6123,7 +6123,7 @@ static int newGroup(SEXP source, int op, SEXP destination, PDFDesc *pd)
61236123
UNPROTECT(1);
61246124

61256125
/* Some finalisation that endpage does
6126-
* (to match the newpage initilisation)
6126+
* (to match the newpage initialisation)
61276127
*/
61286128
catDefn("Q\n", tempDefn, pd);
61296129
/* Cannot discard temporary definition because there may have been
@@ -7875,7 +7875,7 @@ static int PDFwriteResourceDictionary(int objOffset, bool endpage,
78757875
}
78767876

78777877
if (streql(pd->colormodel, "srgb")) {
7878-
/* Ojects 5 and 6 are the sRGB color space, if required */
7878+
/* Objects 5 and 6 are the sRGB color space, if required */
78797879
PDFwrite(buf, 100, "/ColorSpace << /sRGB 5 0 R >>\n", pd);
78807880
}
78817881
PDFwrite(buf, 100, ">>\n", pd);

src/library/grDevices/src/devQuartz.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ static int QuartzCreateMask(SEXP mask,
10381038
bitmapInfo = kCGImageAlphaOnly;
10391039
}
10401040

1041-
/* Create bitmap grahics context
1041+
/* Create bitmap graphics context
10421042
* drawing is redirected to this context */
10431043
quartz_bitmap = CGBitmapContextCreate(NULL,
10441044
(size_t) devWidth,
@@ -1581,7 +1581,7 @@ extern CGFontRef CGContextGetFont(CGContextRef);
15811581

15821582
#pragma mark Quartz Font Cache
15831583

1584-
/* Font lookup is expesive yet frequent. Therefore we cache all used CG fonts (which are global to the app). */
1584+
/* Font lookup is expensive yet frequent. Therefore we cache all used CG fonts (which are global to the app). */
15851585

15861586
typedef struct font_cache_entry_s {
15871587
CGFontRef font;
@@ -3311,14 +3311,14 @@ static double darwin_version(void) {
33113311
#include <mach/mach.h>
33123312
#include <servers/bootstrap.h>
33133313

3314-
/* even as of Darwin 9 there is no entry for bootstrap_info in bootrap headers */
3314+
/* even as of Darwin 9 there is no entry for bootstrap_info in bootstrap headers */
33153315
extern kern_return_t bootstrap_info(mach_port_t , /* bootstrap port */
33163316
name_array_t*, mach_msg_type_number_t*, /* service */
33173317
name_array_t*, mach_msg_type_number_t*, /* server */
33183318
bool_array_t*, mach_msg_type_number_t*); /* active */
33193319

33203320
/* returns 1 if window server session service
3321-
(com.apple.windowserver.session) is present in the boostrap
3321+
(com.apple.windowserver.session) is present in the bootstrap
33223322
namespace (pre-Lion) or when a current session is present, active
33233323
and there is no SSH_CONNECTION (Lion and later).
33243324
returns 0 if an error occurred or the service is not

src/library/grDevices/src/devWindows.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ static void SetFont(pGEcontext gc, double rot, gadesc *xd)
693693
* that family (mapped through WindowsFonts()) and face.
694694
*
695695
* If specify face > 4 then get font from face via Rdevga
696-
* (whether specifed family or not).
696+
* (whether specified family or not).
697697
*/
698698
char * fm = gc->fontfamily;
699699
if (!fm[0]) fm = xd->basefontfamily;
@@ -3537,7 +3537,7 @@ SEXP savePlot(SEXP args)
35373537
filename = CADR(args);
35383538
if (!isString(filename) || LENGTH(filename) != 1)
35393539
error(_("invalid filename argument in 'savePlot'"));
3540-
/* in 2.8.0 this will always be passed as native, but be conserative */
3540+
/* in 2.8.0 this will always be passed as native, but be conservative */
35413541
fn = translateCharFP(STRING_ELT(filename, 0));
35423542
type = CADDR(args);
35433543
if (!isString(type) || LENGTH(type) != 1)

src/library/grDevices/src/qdCocoa.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <R.h>
2424
#include <R_ext/QuartzDevice.h>
2525

26-
/* inofficial API that can be used by other applications */
26+
/* unofficial API that can be used by other applications */
2727

2828
#define QCF_SET_PEPTR 1 /* set ProcessEvents function pointer */
2929
#define QCF_SET_FRONT 2 /* set application mode to front */

src/library/grDevices/src/qdCocoa.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
BOOL closing;
4949
BOOL pdfMode; /* this flag is set when printing, bypassing CGLayer to avoid rasterization */
5050
int inLocator;
51-
double locator[2]; /* locaton click position (x,y) */
51+
double locator[2]; /* locator click position (x,y) */
5252
BOOL inHistoryRecall;
5353
int inHistory;
5454
SEXP history[histsize];
@@ -86,7 +86,7 @@ + (QuartzCocoaView*) quartzWindowWithRect: (NSRect) rect andInfo: (void*) info
8686
NSColor* canvasColor = nil;
8787

8888
/* do everything in a try block -- this is not merely theoretical,
89-
for example NSWindow will throw an expection when the supplied
89+
for example NSWindow will throw an exception when the supplied
9090
rect is too big */
9191
@try {
9292
view = [[QuartzCocoaView alloc] initWithFrame: rect andInfo: info];
@@ -102,7 +102,7 @@ + (QuartzCocoaView*) quartzWindowWithRect: (NSRect) rect andInfo: (void*) info
102102
[window setDelegate: view];
103103
[window setContentView: view];
104104
[window setInitialFirstResponder: view];
105-
/* [window setAcceptsMouseMovedEvents:YES]; not neeed now, maybe later */
105+
/* [window setAcceptsMouseMovedEvents:YES]; not needed now, maybe later */
106106
[window setTitle: [NSString stringWithUTF8String: ((QuartzCocoaDevice*)info)->title]];
107107

108108
NSMenu *menu, *mainMenu;
@@ -353,7 +353,7 @@ - (void)drawRect:(NSRect)aRect
353353
{
354354
CGRect rect;
355355
CGContextRef ctx = [[NSGraphicsContext currentContext] graphicsPort];
356-
/* we have to retain our copy, beause we may need to create a layer
356+
/* we have to retain our copy, because we may need to create a layer
357357
based on the context in NewPage outside of drawRect: */
358358
if (ci->context != ctx) {
359359
if (ci->context)

0 commit comments

Comments
 (0)