Browse CVS Repository
Diff of /malonnote/mnModel.cpp
Parent Directory
| Revision Log
| Revision Graph
| Patch
| 287 |
sprintf(newFullPath, "%s/%s", (const char*)dataDirName->mb_str(), (const char*)fileName->mb_str()); |
sprintf(newFullPath, "%s/%s", (const char*)dataDirName->mb_str(), (const char*)fileName->mb_str()); |
| 288 |
|
|
| 289 |
if((fp = fopen(newFullPath, "r")) == NULL) { |
if((fp = fopen(newFullPath, "r")) == NULL) { |
| 290 |
rename(oldFullPath, newFullPath); |
if(rename(oldFullPath, newFullPath) < 0) wxLogMessage(wxT("rename error: errno=[%d]"), errno); |
| 291 |
} |
} |
| 292 |
else if(strcmp(oldFullPath, newFullPath)){ |
else if(strcmp(oldFullPath, newFullPath)){ |
| 293 |
wxLogMessage(wxT("File has already exist. [%s]"), fileName->c_str()); |
wxLogMessage(wxT("File has already exist. [%s]"), fileName->c_str()); |
| 294 |
fclose(fp); |
fclose(fp); |
| 295 |
} |
} |
| 296 |
|
else { |
| 297 |
|
fclose(fp); |
| 298 |
|
} |
| 299 |
|
|
| 300 |
delete oldSubject; |
delete oldSubject; |
| 301 |
delete oldFileName; |
delete oldFileName; |
| 339 |
} |
} |
| 340 |
|
|
| 341 |
while(fgets(buf, MAX_BUF_SIZE, fp)) { |
while(fgets(buf, MAX_BUF_SIZE, fp)) { |
| 342 |
|
#ifdef __WXMAC__ |
| 343 |
|
for(int i = 0; buf[i] != 0; i++) if(buf[i] == (char)MAC_BACKSLASH) buf[i] = '\\'; |
| 344 |
|
#endif |
| 345 |
inbufPtr = buf; |
inbufPtr = buf; |
| 346 |
inbufSize = sizeof(buf); |
inbufSize = sizeof(buf); |
| 347 |
outbufPtr = outbuf; |
outbufPtr = outbuf; |
| 402 |
|
|
| 403 |
memset(inbuf, 0, sizeof(inbuf)); |
memset(inbuf, 0, sizeof(inbuf)); |
| 404 |
strcpy(inbuf,(const char*)text->mb_str()); |
strcpy(inbuf,(const char*)text->mb_str()); |
| 405 |
|
|
| 406 |
|
#ifdef __WXMAC__ |
| 407 |
|
for(int i = 0; inbuf[i] != 0; i++) if(inbuf[i] == (char)MAC_BACKSLASH) inbuf[i] = '\\'; |
| 408 |
|
#endif |
| 409 |
|
|
| 410 |
inbufPtr = inbuf; |
inbufPtr = inbuf; |
| 411 |
inbufSize = strlen(inbufPtr); |
inbufSize = strlen(inbufPtr); |
| 412 |
outbufPtr = outbuf; |
outbufPtr = outbuf; |
|
|
Legend:
| Removed from v.1.9 |
|
| changed lines |
| |
Added in v.1.13 |
|
|
| |