Skip to content

Commit

Permalink
Remove some redundant comments, update end-of-proc comments
Browse files Browse the repository at this point in the history
* Comments about the purpose of a string were important before
  localization, but are now mostly handled by the resource name.

* Comments for `.endproc` lines can get out of sync. Fix em!

No binary changes.
  • Loading branch information
inexorabletash committed Oct 24, 2024
1 parent 2c13b0c commit 091a81b
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion desk.acc/control.panel.s
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ kDALeft = (kScreenWidth - kDAWidth)/2
kDATop = (kScreenHeight - kMenuBarHeight - kDAHeight)/2 + kMenuBarHeight

str_title:
PASCAL_STRING res_string_window_title ; window title
PASCAL_STRING res_string_window_title

.params winfo
window_id: .byte kDAWindowId
Expand Down
2 changes: 1 addition & 1 deletion desk.acc/eyes.s
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ kDALeft = (kScreenWidth - kDAWidth)/2
kDATop = (kScreenHeight - kMenuBarHeight - kDAHeight)/2 + kMenuBarHeight

str_title:
PASCAL_STRING res_string_window_title ; window title
PASCAL_STRING res_string_window_title

.params winfo
window_id: .byte kDAWindowId
Expand Down
2 changes: 1 addition & 1 deletion desk.acc/joystick.s
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ kDALeft = (kScreenWidth - kDAWidth)/2
kDATop = (kScreenHeight - kMenuBarHeight - kDAHeight)/2 + kMenuBarHeight

str_title:
PASCAL_STRING res_string_window_title ; window title
PASCAL_STRING res_string_window_title

.params winfo
window_id: .byte kDAWindowId
Expand Down
2 changes: 1 addition & 1 deletion desk.acc/key.caps.s
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ nextwinfo: .addr 0
.endparams

str_title:
PASCAL_STRING res_string_window_title ; window title
PASCAL_STRING res_string_window_title

background_pattern:
.byte %11011101
Expand Down
2 changes: 1 addition & 1 deletion desk.acc/options.s
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ kDALeft = (kScreenWidth - kDAWidth)/2
kDATop = (kScreenHeight - kMenuBarHeight - kDAHeight)/2 + kMenuBarHeight

str_title:
PASCAL_STRING res_string_window_title ; window title
PASCAL_STRING res_string_window_title

.params winfo
window_id: .byte kDAWindowId
Expand Down
2 changes: 1 addition & 1 deletion desk.acc/puzzle.s
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ nextwinfo: .addr 0
pencopy: .byte MGTK::pencopy
notpenXOR: .byte MGTK::notpenXOR

name: PASCAL_STRING res_string_window_title ; window title
name: PASCAL_STRING res_string_window_title

scrambled_flag:
.byte 0
Expand Down
2 changes: 1 addition & 1 deletion desk.acc/show.image.file.s
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ str_a2hr_suffix:

.proc LZ4FH
.include "../lib/lz4fh6502.s"
.endproc
.endproc ; LZ4FH
LZ4FH__in_src := LZ4FH::in_src
LZ4FH__in_dst := LZ4FH::in_dst

Expand Down
6 changes: 3 additions & 3 deletions desk.acc/this.apple.s
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ nextwinfo: .addr 0
.endparams

str_title:
PASCAL_STRING res_string_window_title ; dialog title
PASCAL_STRING res_string_window_title

notpencopy: .byte MGTK::notpencopy

Expand Down Expand Up @@ -644,11 +644,11 @@ str_prodos_version:
kVersionStrPatch = res_const_prodos_version_pattern_offset3

str_slot_n:
PASCAL_STRING res_string_slot_n_pattern ; dialog label
PASCAL_STRING res_string_slot_n_pattern
kStrSlotNOffset = res_const_slot_n_pattern_offset1

str_memory_prefix:
PASCAL_STRING res_string_memory_prefix ; dialog label
PASCAL_STRING res_string_memory_prefix

str_memory_kb_suffix:
PASCAL_STRING res_string_memory_kb_suffix ; memory size suffix for kilobytes
Expand Down
2 changes: 1 addition & 1 deletion desktop.system/desktop.system.s
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ set_bit:

syscap: .byte 0

.endproc
.endproc ; DetectSystem

.include "../lib/detect_lcmeve.s"
.include "../lib/detect_megaii.s"
Expand Down
64 changes: 32 additions & 32 deletions desktop/auxmem.s
Original file line number Diff line number Diff line change
Expand Up @@ -61,73 +61,73 @@
label_apple:
PASCAL_STRING kGlyphSolidApple
label_file:
PASCAL_STRING res_string_menu_bar_item_file ; menu bar item
PASCAL_STRING res_string_menu_bar_item_file
label_edit:
PASCAL_STRING res_string_menu_bar_item_edit ; menu bar item
PASCAL_STRING res_string_menu_bar_item_edit
label_view:
PASCAL_STRING res_string_menu_bar_item_view ; menu bar item
PASCAL_STRING res_string_menu_bar_item_view
label_special:
PASCAL_STRING res_string_menu_bar_item_special ; menu bar item
PASCAL_STRING res_string_menu_bar_item_special
label_startup:
PASCAL_STRING res_string_menu_bar_item_startup ; menu bar item
PASCAL_STRING res_string_menu_bar_item_startup
label_selector:
PASCAL_STRING res_string_menu_bar_item_selector ; menu bar item
PASCAL_STRING res_string_menu_bar_item_selector

label_new_folder:
PASCAL_STRING res_string_menu_item_new_folder ; menu item
PASCAL_STRING res_string_menu_item_new_folder
label_open:
PASCAL_STRING res_string_menu_item_open ; menu item
PASCAL_STRING res_string_menu_item_open
label_close:
PASCAL_STRING res_string_menu_item_close ; menu item
PASCAL_STRING res_string_menu_item_close
label_close_all:
PASCAL_STRING res_string_menu_item_close_all ; menu item
PASCAL_STRING res_string_menu_item_close_all
label_delete_selection:
PASCAL_STRING res_string_menu_item_delete_selection ; menu item
PASCAL_STRING res_string_menu_item_delete_selection
label_eject:
PASCAL_STRING res_string_menu_item_eject ; menu item
PASCAL_STRING res_string_menu_item_eject
label_quit:
PASCAL_STRING res_string_menu_item_quit ; menu item
PASCAL_STRING res_string_menu_item_quit

label_cut:
PASCAL_STRING res_string_menu_item_cut ; menu item
PASCAL_STRING res_string_menu_item_cut
label_copy:
PASCAL_STRING res_string_menu_item_copy ; menu item
PASCAL_STRING res_string_menu_item_copy
label_paste:
PASCAL_STRING res_string_menu_item_paste ; menu item
PASCAL_STRING res_string_menu_item_paste
label_clear:
PASCAL_STRING res_string_menu_item_clear ; menu item
PASCAL_STRING res_string_menu_item_clear
label_select_all:
PASCAL_STRING res_string_menu_item_select_all ; menu item
PASCAL_STRING res_string_menu_item_select_all

label_by_icon:
PASCAL_STRING res_string_menu_item_by_icon ; menu item
PASCAL_STRING res_string_menu_item_by_icon
label_by_small_icon:
PASCAL_STRING res_string_menu_item_by_small_icon ; menu item
PASCAL_STRING res_string_menu_item_by_small_icon
label_by_name:
PASCAL_STRING res_string_menu_item_by_name ; menu item
PASCAL_STRING res_string_menu_item_by_name
label_by_date:
PASCAL_STRING res_string_menu_item_by_date ; menu item
PASCAL_STRING res_string_menu_item_by_date
label_by_size:
PASCAL_STRING res_string_menu_item_by_size ; menu item
PASCAL_STRING res_string_menu_item_by_size
label_by_type:
PASCAL_STRING res_string_menu_item_by_type ; menu item
PASCAL_STRING res_string_menu_item_by_type

label_check_all_drives:
PASCAL_STRING res_string_menu_item_check_all_drives ; menu item
PASCAL_STRING res_string_menu_item_check_all_drives
label_check_drive:
PASCAL_STRING res_string_menu_item_check_drive ; menu item
PASCAL_STRING res_string_menu_item_check_drive
label_format_disk:
PASCAL_STRING res_string_menu_item_format_disk ; menu item
PASCAL_STRING res_string_menu_item_format_disk
label_erase_disk:
PASCAL_STRING res_string_menu_item_erase_disk ; menu item
PASCAL_STRING res_string_menu_item_erase_disk
label_disk_copy:
PASCAL_STRING res_string_menu_item_disk_copy ; menu item
PASCAL_STRING res_string_menu_item_disk_copy
label_get_info:
PASCAL_STRING res_string_menu_item_get_info ; menu item
PASCAL_STRING res_string_menu_item_get_info
label_rename_icon:
PASCAL_STRING res_string_menu_item_rename_icon ; menu item
PASCAL_STRING res_string_menu_item_rename_icon
label_duplicate_icon:
PASCAL_STRING res_string_menu_item_duplicate ; menu item
PASCAL_STRING res_string_menu_item_duplicate
label_make_link:
PASCAL_STRING res_string_menu_item_make_link

Expand Down
6 changes: 3 additions & 3 deletions desktop/main.s
Original file line number Diff line number Diff line change
Expand Up @@ -5220,7 +5220,7 @@ check_double_click:
jeq HandleVolumeIconDrag

FALL_THROUGH_TO HandleFileIconDrag
.endproc
.endproc ; HandleIconClick

;;; ============================================================
;;; Inputs: A = `IconTK::DragHighlighted` return value, and
Expand Down Expand Up @@ -6197,7 +6197,7 @@ same_or_desktop:

;; Icons moved on desktop - update and redraw
jmp RedrawSelectedIcons
.endproc ; HandleVolumeIconClick
.endproc ; HandleVolumeIconDrag

;;; ============================================================

Expand Down Expand Up @@ -14905,7 +14905,7 @@ done: rts

MGTK_CALL MGTK::OpenWindow, winfo_rename_dialog
rts
.endproc ; OpenDialogWindow
.endproc ; OpenRenameWindow

;;; ============================================================

Expand Down
26 changes: 13 additions & 13 deletions desktop/res.s
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ kRadioButtonLeft = 332
;;; ============================================================

label_copy_selection:
PASCAL_STRING res_string_menu_item_copy_selection ; menu item / dialog title
PASCAL_STRING res_string_menu_item_copy_selection

;;; ============================================================

Expand Down Expand Up @@ -752,13 +752,13 @@ device_name_table:

;;; Startup menu items (populated by slot scan at startup)

startup_menu_item_1: PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
startup_menu_item_2: PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
startup_menu_item_3: PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
startup_menu_item_4: PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
startup_menu_item_5: PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
startup_menu_item_6: PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
startup_menu_item_7: PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
startup_menu_item_1: PASCAL_STRING res_string_menu_item_slot_pattern
startup_menu_item_2: PASCAL_STRING res_string_menu_item_slot_pattern
startup_menu_item_3: PASCAL_STRING res_string_menu_item_slot_pattern
startup_menu_item_4: PASCAL_STRING res_string_menu_item_slot_pattern
startup_menu_item_5: PASCAL_STRING res_string_menu_item_slot_pattern
startup_menu_item_6: PASCAL_STRING res_string_menu_item_slot_pattern
startup_menu_item_7: PASCAL_STRING res_string_menu_item_slot_pattern
kStartupMenuItemSlotOffset = res_const_menu_item_slot_pattern_offset1

;;; ============================================================
Expand Down Expand Up @@ -787,13 +787,13 @@ selector_menu:
.assert kMenuItemIdSelectorRun = SelectorAction::run, error, "enum mismatch"

label_add:
PASCAL_STRING res_string_menu_item_add_entry ; menu item / dialog title
PASCAL_STRING res_string_menu_item_add_entry ; also dialog title
label_edit:
PASCAL_STRING res_string_menu_item_edit_entry ; menu item / dialog title
PASCAL_STRING res_string_menu_item_edit_entry ; also dialog title
label_del:
PASCAL_STRING res_string_menu_item_delete_entry ; menu item / dialog title
PASCAL_STRING res_string_menu_item_delete_entry ; also dialog title
label_run:
PASCAL_STRING res_string_menu_item_run_entry ; menu item / dialog title
PASCAL_STRING res_string_menu_item_run_entry ; also dialog title

kDAMenuItemSize = 19 ; length (1) + filename (15) + folder glyphs prefix (3)

Expand All @@ -810,7 +810,7 @@ apple_menu:
ASSERT_RECORD_TABLE_SIZE @items, kMenuSizeApple, .sizeof(MGTK::MenuItem)

label_about:
PASCAL_STRING res_string_menu_item_about ; menu item
PASCAL_STRING res_string_menu_item_about
label_about_this_apply:
PASCAL_STRING res_string_menu_item_about_this_apple

Expand Down
12 changes: 6 additions & 6 deletions disk_copy/auxlc.s
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ menu_facilities:
kMenuItemIdDiskCopy = 2

label_file:
PASCAL_STRING res_string_dc_menu_bar_item_file ; menu bar item
PASCAL_STRING res_string_dc_menu_bar_item_file
label_facilities:
PASCAL_STRING res_string_menu_bar_item_facilities ; menu bar item
PASCAL_STRING res_string_menu_bar_item_facilities

label_desktop:
PASCAL_STRING .sprintf(res_string_version_format_long, kDeskTopProductName, ::kDeskTopVersionMajor, ::kDeskTopVersionMinor, kDeskTopVersionSuffix)
Expand All @@ -128,13 +128,13 @@ label_copyright3:
PASCAL_STRING res_string_copyright_line3 ; menu item

label_quit:
PASCAL_STRING res_string_dc_menu_item_quit ; menu item
PASCAL_STRING res_string_dc_menu_item_quit

label_quick_copy:
PASCAL_STRING res_string_menu_item_quick_copy ; menu item
PASCAL_STRING res_string_menu_item_quick_copy

label_disk_copy:
PASCAL_STRING res_string_dc_menu_item_disk_copy ; menu item
PASCAL_STRING res_string_dc_menu_item_disk_copy

;;; ============================================================

Expand Down Expand Up @@ -265,7 +265,7 @@ pensize_frame: .byte kBorderDX, kBorderDY

DEFINE_LABEL select_source, res_string_prompt_select_source, 270, 46
str_select_destination:
PASCAL_STRING res_string_prompt_select_destination ; dialog label
PASCAL_STRING res_string_prompt_select_destination

DEFINE_POINT point_status, kDialogWidth/2, 68
DEFINE_RECT rect_status, 8, 57, kDialogWidth-8, 68
Expand Down
20 changes: 10 additions & 10 deletions selector/app.s
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ str_apple:
PASCAL_STRING kGlyphSolidApple

str_file:
PASCAL_STRING res_string_menu_bar_item_file ; menu bar item
PASCAL_STRING res_string_menu_bar_item_file
str_startup:
PASCAL_STRING res_string_menu_bar_item_startup ; menu bar item
PASCAL_STRING res_string_menu_bar_item_startup

str_a2desktop:
PASCAL_STRING .sprintf(res_string_version_format_long, kDeskTopProductName, ::kDeskTopVersionMajor, ::kDeskTopVersionMinor, kDeskTopVersionSuffix)
Expand All @@ -109,23 +109,23 @@ str_copyright3:
PASCAL_STRING res_string_copyright_line3 ; menu item

str_run_a_program:
PASCAL_STRING res_string_menu_item_run_a_program ; menu item
PASCAL_STRING res_string_menu_item_run_a_program


str_slot_x1:
PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
PASCAL_STRING res_string_menu_item_slot_pattern
str_slot_x2:
PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
PASCAL_STRING res_string_menu_item_slot_pattern
str_slot_x3:
PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
PASCAL_STRING res_string_menu_item_slot_pattern
str_slot_x4:
PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
PASCAL_STRING res_string_menu_item_slot_pattern
str_slot_x5:
PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
PASCAL_STRING res_string_menu_item_slot_pattern
str_slot_x6:
PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
PASCAL_STRING res_string_menu_item_slot_pattern
str_slot_x7:
PASCAL_STRING res_string_menu_item_slot_pattern ; menu item
PASCAL_STRING res_string_menu_item_slot_pattern
kStrSlotXOffset = res_const_menu_item_slot_pattern_offset1


Expand Down

0 comments on commit 091a81b

Please sign in to comment.