mirror of https://github.com/ksherlock/dict.git
Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Kelvin Sherlock | 91f4b65920 | |
Kelvin Sherlock | 1155573111 | |
Kelvin Sherlock | 8085d2c934 |
11
nda.c
11
nda.c
|
@ -46,7 +46,6 @@ void NDAResourceShutDown(NDAResourceCookie *cookie);
|
|||
Word NDAResourceStartUp(Word memID, Word access, NDAResourceCookie *cookie);
|
||||
|
||||
Word MyID;
|
||||
Word ipid;
|
||||
Word FlagTCP;
|
||||
Word ToolsLoaded;
|
||||
GrafPortPtr MyWindow;
|
||||
|
@ -107,7 +106,7 @@ void AppendText(word length, char *cp) {
|
|||
size = TextHandleUsed + length;
|
||||
if (size > TextHandleSize) {
|
||||
size += 4095;
|
||||
size &= ~4096;
|
||||
size &= ~4095;
|
||||
|
||||
if (h) {
|
||||
HUnlock(h);
|
||||
|
@ -154,7 +153,7 @@ void SetText(void) {
|
|||
longword oldStart, oldEnd;
|
||||
|
||||
TESetSelection((Pointer)-1, (Pointer)-1, TECtrlHandle);
|
||||
TESetText(teDataIsTextBox2|teTextIsPtr, (Ref)*TextHandle, TextHandleUsed, NULL, NULL, TECtrlHandle);
|
||||
TESetText(teDataIsTextBox2|teTextIsPtr, (Ref)*TextHandle, TextHandleUsed, 0, NULL, TECtrlHandle);
|
||||
|
||||
|
||||
TextHandleUsed = 0;
|
||||
|
@ -395,7 +394,6 @@ pascal word HandleRequest(word request, longword dataIn, longword dataOut) {
|
|||
|
||||
if (request == TCPIPSaysNetworkDown) {
|
||||
FlagTCP = false;
|
||||
ipid = 0;
|
||||
UpdateStatus(true);
|
||||
}
|
||||
SetCurResourceApp(oldRApp);
|
||||
|
@ -434,7 +432,6 @@ void NDAInit(Word code) {
|
|||
ToolsLoaded = false;
|
||||
|
||||
MyID = MMStartUp();
|
||||
ipid = 0;
|
||||
st = st_none;
|
||||
} else {
|
||||
if (ToolsLoaded)
|
||||
|
@ -448,6 +445,7 @@ void NDAClose(void) {
|
|||
|
||||
AcceptRequests(ReqName, MyID, NULL);
|
||||
ConnectionAbort(&connection);
|
||||
st = st_none;
|
||||
|
||||
CloseWindow(MyWindow);
|
||||
MyWindow = NULL;
|
||||
|
@ -469,6 +467,7 @@ GrafPortPtr NDAOpen(void) {
|
|||
TextHandle = NULL;
|
||||
TextHandleSize = 0;
|
||||
TextHandleSize = 0;
|
||||
st = st_none;
|
||||
|
||||
if (!ToolsLoaded) {
|
||||
if (NDAStartUpTools(MyID, &ss)) {
|
||||
|
@ -541,7 +540,7 @@ void DoDefine(void) {
|
|||
|
||||
handle = (Handle)GetCtlHandleFromID(MyWindow, rCtrlTE);
|
||||
|
||||
TESetText(teDataIsTextBlock, (Ref)"", 0, NULL, NULL, handle);
|
||||
TESetText(teDataIsTextBlock|teTextIsPtr, (Ref)"", 0, 0, NULL, handle);
|
||||
|
||||
GetLETextByID(MyWindow, rCtrlLE, (StringPtr)word_to_define);
|
||||
|
||||
|
|
6
nda.rez
6
nda.rez
|
@ -114,7 +114,7 @@ resource rText (0x4) {
|
|||
resource rComment (1) {
|
||||
"Dict NDA\n\n"
|
||||
"Written by Kelvin W Sherlock\n"
|
||||
"2018-2019"
|
||||
"2018-2021"
|
||||
};
|
||||
|
||||
resource rVersion (1) {
|
||||
|
@ -123,9 +123,9 @@ resource rVersion (1) {
|
|||
0,
|
||||
0,
|
||||
alpha,
|
||||
0
|
||||
1
|
||||
},
|
||||
verUS,
|
||||
"Dict",
|
||||
"(C) 2018-2019 Kelvin Sherlock "
|
||||
"(C) 2018-2021 Kelvin Sherlock "
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue