-
diff -Naur ja2-0.12.1-svn/Build/Editor/Editor_Taskbar_Utils.cc ja2-0.12.1-svn-haiku/Build/Editor/Editor_Taskbar_Utils.cc
|
old
|
new
|
|
| 662 | 662 | if (d.ubLockID != 255) |
| 663 | 663 | swprintf(str, lengthof(str), L"%hs", LockTable[d.ubLockID].ubEditorName); |
| 664 | 664 | else |
| 665 | | wcslcpy(str, L"No Lock ID", lengthof(str)); |
| | 665 | wcsncpy(str, L"No Lock ID", lengthof(str)); |
| 666 | 666 | DisplayWrappedString(x - 10, y - 40, 60, 2, FONT10ARIAL, FONT_LTKHAKI, str, FONT_BLACK, CENTER_JUSTIFIED | MARK_DIRTY); |
| 667 | 667 | |
| 668 | 668 | wchar_t const* trap_type; // HACK000E |
-
diff -Naur ja2-0.12.1-svn/Build/Editor/EditorItems.cc ja2-0.12.1-svn-haiku/Build/Editor/EditorItems.cc
|
old
|
new
|
|
| 405 | 405 | |
| 406 | 406 | if( eInfo.uiItemType != TBAR_MODE_ITEM_TRIGGERS ) |
| 407 | 407 | { |
| 408 | | wcslcpy(pStr, ItemNames[usCounter], lengthof(pStr)); |
| | 408 | wcsncpy(pStr, ItemNames[usCounter], lengthof(pStr)); |
| 409 | 409 | } |
| 410 | 410 | else |
| 411 | 411 | { |
| 412 | 412 | if( i == PRESSURE_ACTION_ID ) |
| 413 | 413 | { |
| 414 | | wcslcpy(pStr, L"Pressure Action", lengthof(pStr)); |
| | 414 | wcsncpy(pStr, L"Pressure Action", lengthof(pStr)); |
| 415 | 415 | } |
| 416 | 416 | else if( i < 2 ) |
| 417 | 417 | { |
| 418 | 418 | if( usCounter == SWITCH ) |
| 419 | | wcslcpy(pStr, L"Panic Trigger1", lengthof(pStr)); |
| | 419 | wcsncpy(pStr, L"Panic Trigger1", lengthof(pStr)); |
| 420 | 420 | else |
| 421 | | wcslcpy(pStr, L"Panic Action1", lengthof(pStr)); |
| | 421 | wcsncpy(pStr, L"Panic Action1", lengthof(pStr)); |
| 422 | 422 | } |
| 423 | 423 | else if( i < 4 ) |
| 424 | 424 | { |
| 425 | 425 | if( usCounter == SWITCH ) |
| 426 | | wcslcpy(pStr, L"Panic Trigger2", lengthof(pStr)); |
| | 426 | wcsncpy(pStr, L"Panic Trigger2", lengthof(pStr)); |
| 427 | 427 | else |
| 428 | | wcslcpy(pStr, L"Panic Action2", lengthof(pStr)); |
| | 428 | wcsncpy(pStr, L"Panic Action2", lengthof(pStr)); |
| 429 | 429 | } |
| 430 | 430 | else if( i < 6 ) |
| 431 | 431 | { |
| 432 | 432 | if( usCounter == SWITCH ) |
| 433 | | wcslcpy(pStr, L"Panic Trigger3", lengthof(pStr)); |
| | 433 | wcsncpy(pStr, L"Panic Trigger3", lengthof(pStr)); |
| 434 | 434 | else |
| 435 | | wcslcpy(pStr, L"Panic Action3", lengthof(pStr)); |
| | 435 | wcsncpy(pStr, L"Panic Action3", lengthof(pStr)); |
| 436 | 436 | } |
| 437 | 437 | else |
| 438 | 438 | { |
-
diff -Naur ja2-0.12.1-svn/Build/Editor/EditorMercs.cc ja2-0.12.1-svn-haiku/Build/Editor/EditorMercs.cc
|
old
|
new
|
|
| 1965 | 1965 | swprintf(str, lengthof(str), L"Click on the gridno where you wish to move after you %ls the door.", keyword); |
| 1966 | 1966 | break; |
| 1967 | 1967 | case SCHEDULE_INSTRUCTIONS_GRIDNO: |
| 1968 | | wcslcpy(str, L"Click on the gridno where you wish to move to.", lengthof(str)); |
| | 1968 | wcsncpy(str, L"Click on the gridno where you wish to move to.", lengthof(str)); |
| 1969 | 1969 | break; |
| 1970 | 1970 | case SCHEDULE_INSTRUCTIONS_SLEEP: |
| 1971 | | wcslcpy(str, L"Click on the gridno where you wish to sleep at. Person will automatically return to original position after waking up.", lengthof(str)); |
| | 1971 | wcsncpy(str, L"Click on the gridno where you wish to sleep at. Person will automatically return to original position after waking up.", lengthof(str)); |
| 1972 | 1972 | default: |
| 1973 | 1973 | return; |
| 1974 | 1974 | } |
-
diff -Naur ja2-0.12.1-svn/Build/Editor/LoadScreen.cc ja2-0.12.1-svn-haiku/Build/Editor/LoadScreen.cc
|
old
|
new
|
|
| 1033 | 1033 | |
| 1034 | 1034 | static BOOLEAN ExtractFilenameFromFields(void) |
| 1035 | 1035 | { |
| 1036 | | wcslcpy(gzFilename, GetStringFromField(0), lengthof(gzFilename)); |
| | 1036 | wcsncpy(gzFilename, GetStringFromField(0), lengthof(gzFilename)); |
| 1037 | 1037 | return ValidFilename(); |
| 1038 | 1038 | } |
| 1039 | 1039 | |
-
diff -Naur ja2-0.12.1-svn/Build/Editor/Sector_Summary.cc ja2-0.12.1-svn-haiku/Build/Editor/Sector_Summary.cc
|
old
|
new
|
|
| 2347 | 2347 | gfOverrideDirty = TRUE; |
| 2348 | 2348 | } |
| 2349 | 2349 | if( !wcslen( str ) ) |
| 2350 | | wcslcpy(gszDisplayName, L"test.dat", lengthof(gszDisplayName)); |
| | 2350 | wcsncpy(gszDisplayName, L"test.dat", lengthof(gszDisplayName)); |
| 2351 | 2351 | } |
| 2352 | 2352 | |
| 2353 | 2353 | void ApologizeOverrideAndForceUpdateEverything() |
-
diff -Naur ja2-0.12.1-svn/Build/Laptop/AIMMembers.cc ja2-0.12.1-svn-haiku/Build/Laptop/AIMMembers.cc
|
old
|
new
|
|
| 1291 | 1291 | //Title & Name |
| 1292 | 1292 | if( gubVideoConferencingMode == AIM_VIDEO_INIT_MODE) |
| 1293 | 1293 | { |
| 1294 | | wcslcpy(sMercName, VideoConfercingText[AIM_MEMBER_CONNECTING], lengthof(sMercName)); |
| | 1294 | wcsncpy(sMercName, VideoConfercingText[AIM_MEMBER_CONNECTING], lengthof(sMercName)); |
| 1295 | 1295 | DrawTextToScreen(sMercName, AIM_MEMBER_VIDEO_NAME_X, AIM_MEMBER_VIDEO_NAME_Y, 0, FONT12ARIAL, AIM_M_VIDEO_TITLE_COLOR, FONT_MCOLOR_BLACK, LEFT_JUSTIFIED); |
| 1296 | 1296 | } |
| 1297 | 1297 | else |
| … |
… |
|
| 1430 | 1430 | } |
| 1431 | 1431 | else |
| 1432 | 1432 | { |
| 1433 | | wcslcpy(wTemp, wDollarTemp, lengthof(wTemp)); |
| | 1433 | wcsncpy(wTemp, wDollarTemp, lengthof(wTemp)); |
| 1434 | 1434 | } |
| 1435 | 1435 | DrawTextToScreen(wTemp, AIM_CONTRACT_CHARGE_AMOUNNT_X + 1, AIM_CONTRACT_CHARGE_AMOUNNT_Y + 3, 0, AIM_M_VIDEO_CONTRACT_AMOUNT_FONT, AIM_M_VIDEO_CONTRACT_AMOUNT_COLOR, FONT_MCOLOR_BLACK, LEFT_JUSTIFIED); |
| 1436 | 1436 | } |
-
diff -Naur ja2-0.12.1-svn/Build/Laptop/BobbyRGuns.cc ja2-0.12.1-svn-haiku/Build/Laptop/BobbyRGuns.cc
|
old
|
new
|
|
| 850 | 850 | |
| 851 | 851 | // ammo or gun? |
| 852 | 852 | AmmoKind const calibre = item->usItemClass == IC_AMMO ? Magazine[item->ubClassIndex].ubCalibre : Weapon[item->ubClassIndex].ubCalibre; |
| 853 | | wcslcpy(zTemp, BobbyRayAmmoCaliber[calibre], lengthof(zTemp)); |
| | 853 | wcsncpy(zTemp, BobbyRayAmmoCaliber[calibre], lengthof(zTemp)); |
| 854 | 854 | |
| 855 | 855 | ReduceStringLength(zTemp, lengthof(zTemp), BOBBYR_GRID_PIC_WIDTH, BOBBYR_ITEM_NAME_TEXT_FONT); |
| 856 | 856 | DrawTextToScreen(zTemp, BOBBYR_ITEM_WEIGHT_NUM_X, usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, RIGHT_JUSTIFIED); |
-
diff -Naur ja2-0.12.1-svn/Build/Laptop/Finances.cc ja2-0.12.1-svn-haiku/Build/Laptop/Finances.cc
|
old
|
new
|
|
| 828 | 828 | case PAY_SPECK_FOR_MERC: |
| 829 | 829 | case PURCHASED_FLOWERS: |
| 830 | 830 | case TRANSACTION_FEE: |
| 831 | | wcslcpy(pString, pTransactionText[code], Length); |
| | 831 | wcsncpy(pString, pTransactionText[code], Length); |
| 832 | 832 | break; |
| 833 | 833 | |
| 834 | 834 | case CANCELLED_INSURANCE: |
-
diff -Naur ja2-0.12.1-svn/Build/Laptop/Florist_Order_Form.cc ja2-0.12.1-svn-haiku/Build/Laptop/Florist_Order_Form.cc
|
old
|
new
|
|
| 372 | 372 | RemoveButton( guiFlowerOrderGalleryButton ); |
| 373 | 373 | |
| 374 | 374 | //Store the text fields |
| 375 | | wcslcpy(gsSentimentTextField, GetStringFromField(1), lengthof(gsSentimentTextField)); |
| 376 | | wcslcpy(gsNameTextField, GetStringFromField(2), lengthof(gsNameTextField)); |
| | 375 | wcsncpy(gsSentimentTextField, GetStringFromField(1), lengthof(gsSentimentTextField)); |
| | 376 | wcsncpy(gsNameTextField, GetStringFromField(2), lengthof(gsNameTextField)); |
| 377 | 377 | gbCurrentlySelectedCard = -1; |
| 378 | 378 | |
| 379 | 379 | |
| … |
… |
|
| 743 | 743 | UINT8 const text_field_id = GetActiveFieldID(); |
| 744 | 744 | if (text_field_id == 1) |
| 745 | 745 | { // The personel sentiment field |
| 746 | | wcslcpy(gsSentimentTextField, GetStringFromField(text_field_id), lengthof(gsSentimentTextField)); |
| | 746 | wcsncpy(gsSentimentTextField, GetStringFromField(text_field_id), lengthof(gsSentimentTextField)); |
| 747 | 747 | } |
| 748 | 748 | else if (text_field_id == 2) |
| 749 | 749 | { // The name field |
| 750 | | wcslcpy(gsNameTextField, GetStringFromField(text_field_id), lengthof(gsNameTextField)); |
| | 750 | wcsncpy(gsNameTextField, GetStringFromField(text_field_id), lengthof(gsNameTextField)); |
| 751 | 751 | } |
| 752 | 752 | |
| 753 | 753 | SetActiveField(0); |
| … |
… |
|
| 802 | 802 | |
| 803 | 803 | //disable the text entry fields |
| 804 | 804 | // DisableAllTextFields(); |
| 805 | | wcslcpy(gsSentimentTextField, GetStringFromField(1), lengthof(gsSentimentTextField)); |
| | 805 | wcsncpy(gsSentimentTextField, GetStringFromField(1), lengthof(gsSentimentTextField)); |
| 806 | 806 | KillTextInputMode(); |
| 807 | 807 | |
| 808 | 808 | //disable the clear order and accept order buttons, (their rendering interferes with the drop down graphics) |
| … |
… |
|
| 947 | 947 | wchar_t sText[FLOR_CARD_TEXT_TITLE_SIZE]; |
| 948 | 948 | CleanOutControlCodesFromString(sTemp, sText); |
| 949 | 949 | |
| 950 | | wcslcpy(gsSentimentTextField, sText, lengthof(gsSentimentTextField)); |
| | 950 | wcsncpy(gsSentimentTextField, sText, lengthof(gsSentimentTextField)); |
| 951 | 951 | |
| 952 | 952 | gbCurrentlySelectedCard = -1; |
| 953 | 953 | |
-
diff -Naur ja2-0.12.1-svn/Build/Laptop/Insurance_Contract.cc ja2-0.12.1-svn-haiku/Build/Laptop/Insurance_Contract.cc
|
old
|
new
|
|
| 490 | 490 | |
| 491 | 491 | //display the amount of time the merc has left on their Regular contract |
| 492 | 492 | if (is_dead) |
| 493 | | wcslcpy(sText, pMessageStrings[MSG_LOWERCASE_NA], lengthof(sText)); |
| | 493 | wcsncpy(sText, pMessageStrings[MSG_LOWERCASE_NA], lengthof(sText)); |
| 494 | 494 | else |
| 495 | 495 | swprintf( sText, lengthof(sText), L"%d", GetTimeRemainingOnSoldiersContract( pSoldier ) ); |
| 496 | 496 | |
| … |
… |
|
| 515 | 515 | |
| 516 | 516 | //if the soldier has insurance, disply the length of time the merc has left |
| 517 | 517 | if (is_dead) |
| 518 | | wcslcpy(sText, pMessageStrings[MSG_LOWERCASE_NA], lengthof(sText)); |
| | 518 | wcsncpy(sText, pMessageStrings[MSG_LOWERCASE_NA], lengthof(sText)); |
| 519 | 519 | else if( pSoldier->usLifeInsurance != 0 ) |
| 520 | 520 | swprintf( sText, lengthof(sText), L"%d", GetTimeRemainingOnSoldiersInsuranceContract( pSoldier ) ); |
| 521 | 521 | |
| … |
… |
|
| 558 | 558 | |
| 559 | 559 | if (is_dead) |
| 560 | 560 | { |
| 561 | | wcslcpy(sText, L"$0", lengthof(sText)); |
| | 561 | wcsncpy(sText, L"$0", lengthof(sText)); |
| 562 | 562 | } |
| 563 | 563 | //display the amount owing |
| 564 | 564 | DrawTextToScreen(sText, dx + 32, dy + 179, 72, INS_FONT_MED, INS_FONT_COLOR, FONT_MCOLOR_BLACK, RIGHT_JUSTIFIED); |
-
diff -Naur ja2-0.12.1-svn/Build/Laptop/Personnel.cc ja2-0.12.1-svn-haiku/Build/Laptop/Personnel.cc
|
old
|
new
|
|
| 655 | 655 | else |
| 656 | 656 | { |
| 657 | 657 | //nick name |
| 658 | | wcslcpy(sString, s.name, lengthof(sString)); |
| | 658 | wcsncpy(sString, s.name, lengthof(sString)); |
| 659 | 659 | } |
| 660 | 660 | FindFontCenterCoordinates(CHAR_NAME_LOC_X, 0, CHAR_NAME_LOC_WIDTH, 0, sString, CHAR_NAME_FONT, &sX, &sY); |
| 661 | 661 | MPrint(sX, CHAR_NAME_Y, sString); |
| … |
… |
|
| 737 | 737 | } |
| 738 | 738 | else |
| 739 | 739 | { |
| 740 | | wcslcpy(sString, pPOWStrings[1], lengthof(sString)); |
| | 740 | wcsncpy(sString, pPOWStrings[1], lengthof(sString)); |
| 741 | 741 | } |
| 742 | 742 | mprintf(pers_stat_x, pers_stat_y[0], L"%ls:", str_stat_health); |
| 743 | 743 | FindFontRightCoordinates(pers_stat_x, 0, TEXT_BOX_WIDTH - 20, 0, sString, PERS_FONT, &sX, &sY); |
| … |
… |
|
| 1167 | 1167 | |
| 1168 | 1168 | SetFontDestBuffer(FRAME_BUFFER); |
| 1169 | 1169 | |
| 1170 | | wcslcpy(sString, ItemNames[item_idx], lengthof(sString)); |
| | 1170 | wcsncpy(sString, ItemNames[item_idx], lengthof(sString)); |
| 1171 | 1171 | ReduceStringLength(sString, lengthof(sString), 171 - 75, FONT10ARIAL); |
| 1172 | 1172 | MPrint(PosX + 65, PosY + 3, sString); |
| 1173 | 1173 | |
| … |
… |
|
| 1188 | 1188 | |
| 1189 | 1189 | if (item.usItemClass & IC_GUN) |
| 1190 | 1190 | { |
| 1191 | | wcslcpy(sString, AmmoCaliber[Weapon[item.ubClassIndex].ubCalibre], lengthof(sString)); |
| | 1191 | wcsncpy(sString, AmmoCaliber[Weapon[item.ubClassIndex].ubCalibre], lengthof(sString)); |
| 1192 | 1192 | ReduceStringLength(sString, lengthof(sString), 171 - 75, FONT10ARIAL); |
| 1193 | 1193 | MPrint(PosX + 65, PosY + 15, sString); |
| 1194 | 1194 | } |
-
diff -Naur ja2-0.12.1-svn/Build/SaveLoadGame.cc ja2-0.12.1-svn-haiku/Build/SaveLoadGame.cc
|
old
|
new
|
|
| 272 | 272 | else |
| 273 | 273 | { |
| 274 | 274 | if (GameDesc[0] == L'\0') GameDesc = pMessageStrings[MSG_NODESC]; |
| 275 | | wcslcpy(desc, GameDesc, lengthof(desc)); |
| | 275 | wcsncpy(desc, GameDesc, lengthof(desc)); |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | MakeFileManDirectory(g_savegame_dir); |
-
diff -Naur ja2-0.12.1-svn/Build/SaveLoadScreen.cc ja2-0.12.1-svn-haiku/Build/SaveLoadScreen.cc
|
old
|
new
|
|
| 552 | 552 | INT8 const id = GetActiveFieldID(); |
| 553 | 553 | if (id == 0 || id == -1) return false; |
| 554 | 554 | |
| 555 | | wcslcpy(gzGameDescTextField, GetStringFromField(id), lengthof(gzGameDescTextField)); |
| | 555 | wcsncpy(gzGameDescTextField, GetStringFromField(id), lengthof(gzGameDescTextField)); |
| 556 | 556 | return true; |
| 557 | 557 | } |
| 558 | 558 | |
| … |
… |
|
| 873 | 873 | } |
| 874 | 874 | else if (header.uiDay * NUM_SEC_IN_DAY + header.ubHour * NUM_SEC_IN_HOUR + header.ubMin * NUM_SEC_IN_MIN <= STARTING_TIME) |
| 875 | 875 | { |
| 876 | | wcslcpy(location, gpStrategicString[STR_PB_NOTAPPLICABLE_ABBREVIATION], lengthof(location)); |
| | 876 | wcsncpy(location, gpStrategicString[STR_PB_NOTAPPLICABLE_ABBREVIATION], lengthof(location)); |
| 877 | 877 | } |
| 878 | 878 | else |
| 879 | 879 | { |
| 880 | | wcslcpy(location, gzLateLocalizedString[STR_LATE_14], lengthof(location)); |
| | 880 | wcsncpy(location, gzLateLocalizedString[STR_LATE_14], lengthof(location)); |
| 881 | 881 | } |
| 882 | 882 | ReduceStringLength(location, lengthof(location), SLG_SECTOR_WIDTH, font); |
| 883 | 883 | DrawTextToScreen(location, x + SLG_SECTOR_OFFSET_X, y, 0, font, foreground, FONT_MCOLOR_BLACK, LEFT_JUSTIFIED); |
-
diff -Naur ja2-0.12.1-svn/Build/Strategic/Auto_Resolve.cc ja2-0.12.1-svn-haiku/Build/Strategic/Auto_Resolve.cc
|
old
|
new
|
|
| 1546 | 1546 | cell->usIndex = s->ubBodyType == REGFEMALE ? ELITEF_FACE : face; |
| 1547 | 1547 | s->sSectorX = ar->ubSectorX; |
| 1548 | 1548 | s->sSectorY = ar->ubSectorY; |
| 1549 | | wcslcpy(s->name, name, lengthof(s->name)); |
| | 1549 | wcsncpy(s->name, name, lengthof(s->name)); |
| 1550 | 1550 | } |
| 1551 | 1551 | return cell; |
| 1552 | 1552 | } |
| … |
… |
|
| 1562 | 1562 | cell->usIndex = face; |
| 1563 | 1563 | s->sSectorX = ar->ubSectorX; |
| 1564 | 1564 | s->sSectorY = ar->ubSectorY; |
| 1565 | | wcslcpy(s->name, gpStrategicString[STR_AR_CREATURE_NAME], lengthof(s->name)); |
| | 1565 | wcsncpy(s->name, gpStrategicString[STR_AR_CREATURE_NAME], lengthof(s->name)); |
| 1566 | 1566 | } |
| 1567 | 1567 | return cell; |
| 1568 | 1568 | } |
| … |
… |
|
| 1674 | 1674 | AssertMsg(s, "Failed to create militia soldier for autoresolve."); |
| 1675 | 1675 | s->sSectorX = ar->ubSectorX; |
| 1676 | 1676 | s->sSectorY = ar->ubSectorY; |
| 1677 | | wcslcpy(s->name, gpStrategicString[STR_AR_MILITIA_NAME], lengthof(s->name)); |
| | 1677 | wcsncpy(s->name, gpStrategicString[STR_AR_MILITIA_NAME], lengthof(s->name)); |
| 1678 | 1678 | } |
| 1679 | 1679 | |
| 1680 | 1680 | if (gubEnemyEncounterCode != CREATURE_ATTACK_CODE) |
-
diff -Naur ja2-0.12.1-svn/Build/Strategic/Map_Screen_Interface.cc ja2-0.12.1-svn-haiku/Build/Strategic/Map_Screen_Interface.cc
|
old
|
new
|
|
| 1717 | 1717 | fhr->iX = x; |
| 1718 | 1718 | fhr->iY = y; |
| 1719 | 1719 | fhr->iW = width; |
| 1720 | | wcslcpy(fhr->FastHelpText, text, lengthof(fhr->FastHelpText)); |
| | 1720 | wcsncpy(fhr->FastHelpText, text, lengthof(fhr->FastHelpText)); |
| 1721 | 1721 | giSizeOfInterfaceFastHelpTextList = 1; |
| 1722 | 1722 | } |
| 1723 | 1723 | |
-
diff -Naur ja2-0.12.1-svn/Build/Strategic/Merc_Contract.cc ja2-0.12.1-svn-haiku/Build/Strategic/Merc_Contract.cc
|
old
|
new
|
|
| 777 | 777 | if (elsewhere == SECTOR(x, y) && z == 0) goto no_choice; |
| 778 | 778 | |
| 779 | 779 | // Set strings for generic buttons |
| 780 | | wcslcpy(gzUserDefinedButton1, town_sector, lengthof(gzUserDefinedButton1)); |
| | 780 | wcsncpy(gzUserDefinedButton1, town_sector, lengthof(gzUserDefinedButton1)); |
| 781 | 781 | GetShortSectorString(SECTORX(elsewhere), SECTORY(elsewhere), gzUserDefinedButton2, lengthof(gzUserDefinedButton2)); |
| 782 | 782 | |
| 783 | 783 | wchar_t const* const town = g_towns_locative[GetTownIdForSector(elsewhere)]; |
-
diff -Naur ja2-0.12.1-svn/Build/Strategic/Player_Command.cc ja2-0.12.1-svn-haiku/Build/Strategic/Player_Command.cc
|
old
|
new
|
|
| 29 | 29 | UINT32 const facilities = SectorInfo[SECTOR(x, y)].uiFacilitiesFlags; |
| 30 | 30 | if (facilities == 0) |
| 31 | 31 | { |
| 32 | | wcslcpy(buf, sFacilitiesStrings[0], length); |
| | 32 | wcsncpy(buf, sFacilitiesStrings[0], length); |
| 33 | 33 | return; |
| 34 | 34 | } |
| 35 | 35 | |
-
diff -Naur ja2-0.12.1-svn/Build/Strategic/Quest_Debug_System.cc ja2-0.12.1-svn-haiku/Build/Strategic/Quest_Debug_System.cc
|
old
|
new
|
|
| 3239 | 3239 | if (pSoldier != NULL && pSoldier->uiStatusFlags & SOLDIER_OFF_MAP) |
| 3240 | 3240 | { |
| 3241 | 3241 | //the soldier is on schedule |
| 3242 | | wcslcpy(pzText, L"On Schdl.", Length); |
| | 3242 | wcsncpy(pzText, L"On Schdl.", Length); |
| 3243 | 3243 | } |
| 3244 | 3244 | |
| 3245 | 3245 | //if the soldier is dead |
| 3246 | 3246 | else if( gMercProfiles[ usProfileID ].bMercStatus == MERC_IS_DEAD ) |
| 3247 | 3247 | { |
| 3248 | | wcslcpy(pzText, L"Dead", Length); |
| | 3248 | wcsncpy(pzText, L"Dead", Length); |
| 3249 | 3249 | } |
| 3250 | 3250 | |
| 3251 | 3251 | //the soldier is in this sector |
-
diff -Naur ja2-0.12.1-svn/Build/Strategic/StrategicMap.cc ja2-0.12.1-svn-haiku/Build/Strategic/StrategicMap.cc
|
old
|
new
|
|
| 1520 | 1520 | void GetSectorIDString(INT16 const x, INT16 const y, INT8 const z, wchar_t* const buf, size_t const length, BOOLEAN const detailed) |
| 1521 | 1521 | { |
| 1522 | 1522 | #ifdef JA2DEMO |
| 1523 | | wcslcpy(buf, L"Demoville", length); |
| | 1523 | wcsncpy(buf, L"Demoville", length); |
| 1524 | 1524 | #else |
| 1525 | 1525 | if (x <= 0 || y <= 0 || z < 0) /* Empty? */ |
| 1526 | 1526 | { |
-
diff -Naur ja2-0.12.1-svn/Build/Tactical/Enemy_Soldier_Save.cc ja2-0.12.1-svn-haiku/Build/Tactical/Enemy_Soldier_Save.cc
|
old
|
new
|
|
| 748 | 748 | dp->sInsertionGridNo = curr->pBasicPlacement->usStartingGridNo; |
| 749 | 749 | } |
| 750 | 750 | |
| 751 | | wcslcpy(dp->name, s.name, lengthof(dp->name)); |
| | 751 | wcsncpy(dp->name, s.name, lengthof(dp->name)); |
| 752 | 752 | |
| 753 | 753 | // Copy patrol points |
| 754 | 754 | dp->bPatrolCnt = s.bPatrolCnt; |
-
diff -Naur ja2-0.12.1-svn/Build/Tactical/Interface_Dialogue.cc ja2-0.12.1-svn-haiku/Build/Tactical/Interface_Dialogue.cc
|
old
|
new
|
|
| 2730 | 2730 | // NOW overwrite name with true name in profile |
| 2731 | 2731 | // copy new nickname into soldier structure |
| 2732 | 2732 | { |
| 2733 | | wcslcpy(gMercProfiles[ubTargetNPC].zNickname, gMercProfiles[ubTargetNPC].zName, lengthof(gMercProfiles[ubTargetNPC].zNickname)); |
| | 2733 | wcsncpy(gMercProfiles[ubTargetNPC].zNickname, gMercProfiles[ubTargetNPC].zName, lengthof(gMercProfiles[ubTargetNPC].zNickname)); |
| 2734 | 2734 | SOLDIERTYPE* const pSoldier = FindSoldierByProfileID(ubTargetNPC); |
| 2735 | 2735 | if ( pSoldier ) |
| 2736 | 2736 | { |
| 2737 | | wcslcpy(pSoldier->name, gMercProfiles[ubTargetNPC].zNickname, lengthof(pSoldier->name)); |
| | 2737 | wcsncpy(pSoldier->name, gMercProfiles[ubTargetNPC].zNickname, lengthof(pSoldier->name)); |
| 2738 | 2738 | } |
| 2739 | 2739 | } |
| 2740 | 2740 | break; |
-
diff -Naur ja2-0.12.1-svn/Build/Tactical/Interface_Items.cc ja2-0.12.1-svn-haiku/Build/Tactical/Interface_Items.cc
|
old
|
new
|
|
| 4778 | 4778 | } |
| 4779 | 4779 | else |
| 4780 | 4780 | { |
| 4781 | | wcslcpy(pStr, ShortItemNames[o.usItem], lengthof(pStr)); |
| | 4781 | wcsncpy(pStr, ShortItemNames[o.usItem], lengthof(pStr)); |
| 4782 | 4782 | } |
| 4783 | 4783 | INT16 sFontX; |
| 4784 | 4784 | INT16 sFontY; |
| … |
… |
|
| 5192 | 5192 | } |
| 5193 | 5193 | else if (usItem == NOTHING) |
| 5194 | 5194 | { |
| 5195 | | wcslcpy(dst, L"", length); |
| | 5195 | wcsncpy(dst, L"", length); |
| 5196 | 5196 | } |
| 5197 | 5197 | else |
| 5198 | 5198 | { |
-
diff -Naur ja2-0.12.1-svn/Build/Tactical/Soldier_Create.cc ja2-0.12.1-svn-haiku/Build/Tactical/Soldier_Create.cc
|
old
|
new
|
|
| 892 | 892 | |
| 893 | 893 | default: goto no_name; // XXX fishy |
| 894 | 894 | } |
| 895 | | wcslcpy(s.name, name, lengthof(s.name)); |
| | 895 | wcsncpy(s.name, name, lengthof(s.name)); |
| 896 | 896 | no_name: |
| 897 | 897 | |
| 898 | 898 | GeneratePaletteForSoldier(&s, c.ubSoldierClass); |
-
diff -Naur ja2-0.12.1-svn/Build/TileEngine/Render_Dirty.cc ja2-0.12.1-svn-haiku/Build/TileEngine/Render_Dirty.cc
|
old
|
new
|
|
| 502 | 502 | v->uiFontID = font; |
| 503 | 503 | v->ubFontFore = foreground; |
| 504 | 504 | v->ubFontBack = background; |
| 505 | | wcslcpy(v->zText, text, lengthof(v->zText)); |
| | 505 | wcsncpy(v->zText, text, lengthof(v->zText)); |
| 506 | 506 | } |
| 507 | 507 | return v; |
| 508 | 508 | } |
-
diff -Naur ja2-0.12.1-svn/Build/Utils/Text_Input.cc ja2-0.12.1-svn-haiku/Build/Utils/Text_Input.cc
|
old
|
new
|
|
| 250 | 250 | { |
| 251 | 251 | n->ubStrLen = wcslen(szInitText); |
| 252 | 252 | Assert(n->ubStrLen <= ubMaxChars); |
| 253 | | wcslcpy(n->szString, szInitText, ubMaxChars + 1); |
| | 253 | wcsncpy(n->szString, szInitText, ubMaxChars + 1); |
| 254 | 254 | } |
| 255 | 255 | else |
| 256 | 256 | { |
| … |
… |
|
| 345 | 345 | { |
| 346 | 346 | curr->ubStrLen = (UINT8)wcslen(szNewText); |
| 347 | 347 | Assert(curr->ubStrLen <= curr->ubMaxChars); |
| 348 | | wcslcpy(curr->szString, szNewText, curr->ubMaxChars + 1); |
| | 348 | wcsncpy(curr->szString, szNewText, curr->ubMaxChars + 1); |
| 349 | 349 | } |
| 350 | 350 | else if (!curr->fUserField) |
| 351 | 351 | { |
-
diff -Naur ja2-0.12.1-svn/Build/Utils/WordWrap.cc ja2-0.12.1-svn-haiku/Build/Utils/WordWrap.cc
|
old
|
new
|
|
| 477 | 477 | RestWidth -= CharWidth; |
| 478 | 478 | } |
| 479 | 479 | |
| 480 | | wcslcpy(pString + i, Dots, Length - i); |
| | 480 | wcsncpy(pString + i, Dots, Length - i); |
| 481 | 481 | } |
-
diff -Naur ja2-0.12.1-svn/Makefile ja2-0.12.1-svn-haiku/Makefile
|
old
|
new
|
|
| 111 | 111 | CXXFLAGS += $(CFLAGS) |
| 112 | 112 | |
| 113 | 113 | LDFLAGS += $(LDFLAGS_SDL) |
| 114 | | LDFLAGS += -lm |
| | 114 | LDFLAGS += |
| 115 | 115 | |
| 116 | 116 | ifdef WITH_ZLIB |
| 117 | 117 | LDFLAGS += -lz |