Skip to content

Commit 9192f59

Browse files
committed
Convert files encoded in Mac OS Roman to UTF-8; replace "sustain on" char. in code with 0xA1 (its codepoint in Sonata).
Convert file with CRLF line endings to Unix. Add a _friendly_ parameter to NameGraphicType() as in NameHeapType(), & replace inline code in BrowseGraphic() with a call to NameGraphicType. Minor cleanup.
1 parent b99d672 commit 9192f59

File tree

13 files changed

+954
-975
lines changed

13 files changed

+954
-975
lines changed

Nightingale.app.zip

-252 Bytes
Binary file not shown.

Nightingale.xcodeproj/donbyrd.mode1

Lines changed: 102 additions & 145 deletions
Large diffs are not rendered by default.

doc/DetailedVersionHistory_2012-16.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,22 @@ purpose and it's #ifdef'd out, but it might be useful with a simpler score.
337337

338338
Make Debug stop complaining about the first Sync of a measure in the clipboard not
339339
being at time zero for the measure; make it stop complaining about valid bboxes of
340-
final measures of right-justified systems.
340+
final measures of right-justified systems. Affects DebugDisplay, DebugUtils.
341341

342342
Minor cleanup. Affects defs.h; Browser, DebugDisplay, DebugUtils, DrawObject, File,
343343
Initialize, SpaceHighLevel, VoiceNumbers.
344+
345+
-------------------------------------------------------------------------------
346+
347+
11-14 Jan.
348+
349+
Convert files encoded in Mac OS Roman to UTF-8; replace "sustain on" char. in code
350+
with 0xA1 (its codepoint in Sonata). Affects DrawObject, Menu, DebugUtils.
351+
352+
Convert file with CRLF line endings to Unix. Affects defs.h.
353+
354+
Add a _friendly_ parameter to NameGraphicType() as in NameHeapType() & replace
355+
inline code in BrowseGraphic() with a call to NameGraphicType. Affects Browser,
356+
InfoDialog, UIFUtils.
357+
358+
Minor cleanup. Affects Browser, Double, InfoDialog, UIFUtils.

doc/NgaleDevelopmentLog.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,3 +1172,41 @@ Also, after creating (and using) a new Nightingale AMNF Prefs, Ngale complains t
11721172
field 69 (whichMIDI) is illegal; its value is 4. I.e., the prototype in the .rsrc (CNFG
11731173
resource) has it as 4, but the only legal values now are 0 and 1. Change that field in
11741174
.rsrc to 0 => OK.
1175+
1176+
-------------------------------------------------------------------------------
1177+
1178+
11 - 15 Jan.
1179+
1180+
Convert files encoded in Mac OS Roman to UTF-8; replace "sustain on" char. in code
1181+
with 0xA1 (its codepoint in Sonata). Affects DrawObject, Menu, DebugUtils.
1182+
1183+
Convert file with CRLF line endings to Unix. Affects defs.h.
1184+
1185+
The pedal mark (SUSTAINON) is now displayed as a digit "5"! It was OK in Ngale 5.5.
1186+
Cause: converting DrawObject.cp from Mac Roman to UTF8 screwed up the char. code;
1187+
in Sonata, it's 0xA1. Replace the char. in source code with 0xA1 => all OK again.
1188+
1189+
The standard "header" on Ngale .cp files says
1190+
1191+
* THIS FILE IS PART OF THE NIGHTINGALE™ PROGRAM AND IS CONFIDENTIAL PROP-
1192+
* ERTY OF ADVANCED MUSIC NOTATION SYSTEMS, INC. IT IS CONSIDERED A TRADE
1193+
* SECRET AND IS NOT TO BE DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED
1194+
* WRITTEN AUTHORIZATION FROM THE OWNER.
1195+
* Copyright © 1988-99 by Advanced Music Notation Systems, Inc. All Rights Reserved.
1196+
1197+
According to SourceTree's display of changes, the update to Double.cp I'm ready to
1198+
commit changes the char. after "NIGHTINGALE" from E-grave to TM, while the updates to
1199+
DrawObject, Menu, & DebugUtils change it from TM to comma / N-tilde / cent sign, and
1200+
add something like a "~" in front of the copyright symbol! Huh? Clearly related to
1201+
encoding. Encodings (according to BBEdit; ** = "Incorrectly formed") and chars. displayed
1202+
(BBEdit on my G5, default font; D-? = black diamond enclosing question mark):
1203+
1204+
file old enc. new enc. char. after "NIGHTINGALE": ST :BBE
1205+
Double UTF8** ISO Latin 1 E-grave => TM D-? => super-a-underline
1206+
DrawObject Mac OS Roman UTF-8 TM => comma/N-tilde/cent sign TM => TM
1207+
Menu Mac OS Roman UTF-8 TM => comma/N-tilde/cent sign TM => TM
1208+
DebugUtils Mac OS Roman UTF-8 TM => comma/N-tilde/cent sign TM => TM
1209+
1210+
It looks like BBEdit on Mac doesn't display Latin-1 properly (no surprise) and
1211+
SourceTree on Mac doesn't display UTR-8 properly (weird). Anyway, almost certainly not
1212+
evidence of a serious problem!

src/CFilesBoth/DrawObject.cp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
/* NOTICE
88
*
9-
* THIS FILE IS PART OF THE NIGHTINGALEª PROGRAM AND IS CONFIDENTIAL PROP-
9+
* THIS FILE IS PART OF THE NIGHTINGALE™ PROGRAM AND IS CONFIDENTIAL PROP-
1010
* ERTY OF ADVANCED MUSIC NOTATION SYSTEMS, INC. IT IS CONSIDERED A TRADE
1111
* SECRET AND IS NOT TO BE DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED
1212
* WRITTEN AUTHORIZATION FROM THE OWNER.
13-
* Copyright © 1988-99 by Advanced Music Notation Systems, Inc. All Rights Reserved.
13+
* Copyright © 1988-99 by Advanced Music Notation Systems, Inc. All Rights Reserved.
1414
*
1515
*/
1616

@@ -1593,14 +1593,14 @@ Boolean GetGraphicDBox(Document *doc,
15931593
SetRect(&r, 0, 0, 2, 2);
15941594
else
15951595
r = (*(PicHandle)picH)->picFrame;
1596-
width = r.right - r.left; /* calculate width and height */
1596+
width = r.right - r.left; /* calculate width and height */
15971597
height = r.bottom - r.top;
15981598
SetDRect(dBox, 0, 0, pt2d(width), pt2d(height));
15991599
}
16001600
return TRUE;
16011601
case GRArpeggio:
16021602
dHeight = qd2d(p->info, pContext->staffHeight, pContext->staffLines);
1603-
SetDRect(dBox, 0, 0, pt2d(3), dHeight); /* Width is crude but seems acceptable */
1603+
SetDRect(dBox, 0, 0, pt2d(3), dHeight); /* Width is crude but seems acceptable */
16041604
return TRUE;
16051605
case GRChar:
16061606
string[0] = 1;
@@ -1609,19 +1609,19 @@ Boolean GetGraphicDBox(Document *doc,
16091609
break;
16101610
case GRMIDISustainOn:
16111611
string[0] = 1;
1612-
string[1] = '¡'; // Shift-option 8
1612+
string[1] = 0xA1; // Mac OS Roman keys: shift-option 8
16131613
pStr = string;
16141614
fontID = doc->musicFontNum;
16151615
break;
16161616
case GRMIDISustainOff:
16171617
string[0] = 2;
1618-
string[1] = '*'; // Shift 8
1618+
string[1] = '*'; // Shift 8
16191619
string[2] = '*';
16201620
pStr = string;
16211621
fontID = doc->musicFontNum;
16221622
break;
16231623
case GRChordSym:
1624-
return FALSE; /* Handled by DrawChordSym */
1624+
return FALSE; /* Handled by DrawChordSym */
16251625
default:
16261626
aGraphicL = FirstSubLINK(pL);
16271627
aGraphic = GetPAGRAPHIC(aGraphicL);
@@ -2004,14 +2004,14 @@ PushLock(GRAPHICheap);
20042004
break;
20052005
case GRMIDISustainOn:
20062006
oneChar[0] = 1;
2007-
oneChar[1] = '¡'; // Shift-option 8
2007+
oneChar[1] = 0xA1; // Mac OS Roman keys: shift-option 8
20082008
TextFace(normal);
20092009
TextFont(doc->musicFontNum);
20102010
DrawString(oneChar);
20112011
break;
20122012
case GRMIDISustainOff:
20132013
oneChar[0] = 1;
2014-
oneChar[1] = '*'; // Shift 8
2014+
oneChar[1] = '*'; // Shift 8
20152015
TextFace(normal);
20162016
TextFont(doc->musicFontNum);
20172017
DrawString(oneChar);
@@ -2098,14 +2098,14 @@ PushLock(GRAPHICheap);
20982098
break;
20992099
case GRMIDISustainOn:
21002100
oneChar[0] = 1;
2101-
oneChar[1] = '¡'; // Shift-option 8
2101+
oneChar[1] = 0xA1; // Mac OS Roman keys: shift-option 8
21022102
PS_FontString(doc, xd, yd,oneChar,
21032103
doc->fontTable[p->fontInd].fontName,
21042104
fontSize, fontStyle);
21052105
break;
21062106
case GRMIDISustainOff:
21072107
oneChar[0] = 1;
2108-
oneChar[1] = '*'; // Shift 8
2108+
oneChar[1] = '*'; // Shift 8
21092109
PS_FontString(doc, xd, yd,oneChar,
21102110
doc->fontTable[p->fontInd].fontName,
21112111
fontSize, fontStyle);

src/CFilesBoth/Menu.cp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
/* NOTICE
44
*
5-
* THIS FILE IS PART OF THE NIGHTINGALEª PROGRAM AND IS CONFIDENTIAL PROP-
5+
* THIS FILE IS PART OF THE NIGHTINGALE™ PROGRAM AND IS CONFIDENTIAL PROP-
66
* ERTY OF ADVANCED MUSIC NOTATION SYSTEMS, INC. IT IS CONSIDERED A TRADE
77
* SECRET AND IS NOT TO BE DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED
88
* WRITTEN AUTHORIZATION FROM THE OWNER.
9-
* Copyright © 1989-99 by Advanced Music Notation Systems, Inc. All Rights Reserved.
9+
* Copyright © 1989-99 by Advanced Music Notation Systems, Inc. All Rights Reserved.
1010
*
1111
*/
1212

@@ -2430,15 +2430,15 @@ static void FixTestMenu(Document *doc, short nSel)
24302430
{
24312431
#ifndef PUBLIC_VERSION
24322432
if (clickMode==ClickErase)
2433-
SetItemMark(testMenu, TS_ClickErase, '¥');
2433+
SetItemMark(testMenu, TS_ClickErase, '');
24342434
else
24352435
SetItemMark(testMenu, TS_ClickErase, noMark);
24362436
if (clickMode==ClickSelect)
2437-
SetItemMark(testMenu, TS_ClickSelect, '¥');
2437+
SetItemMark(testMenu, TS_ClickSelect, '');
24382438
else
24392439
SetItemMark(testMenu, TS_ClickSelect, noMark);
24402440
if (clickMode==ClickFrame)
2441-
SetItemMark(testMenu, TS_ClickFrame, '¥');
2441+
SetItemMark(testMenu, TS_ClickFrame, '');
24422442
else
24432443
SetItemMark(testMenu, TS_ClickFrame, noMark);
24442444

0 commit comments

Comments
 (0)