===========================================================================
| 723 | |
| 724 | //=========================================================================== |
| 725 | Update_t CmdBookmarkSave (int nArgs) |
| 726 | { |
| 727 | g_ConfigState.Reset(); |
| 728 | |
| 729 | ConfigSave_PrepareHeader( PARAM_CAT_BOOKMARKS, CMD_BOOKMARK_CLEAR ); |
| 730 | |
| 731 | int iBookmark = 0; |
| 732 | while (iBookmark < MAX_BOOKMARKS) |
| 733 | { |
| 734 | if (g_aBookmarks[ iBookmark ].bSet) |
| 735 | { |
| 736 | g_ConfigState.PushLineFormat( "%s %x %04X\n" |
| 737 | , g_aCommands[ CMD_BOOKMARK_ADD ].m_sName |
| 738 | , iBookmark |
| 739 | , g_aBookmarks[ iBookmark ].nAddress |
| 740 | ); |
| 741 | } |
| 742 | iBookmark++; |
| 743 | } |
| 744 | |
| 745 | if (nArgs) |
| 746 | { |
| 747 | if (! (g_aArgs[ 1 ].bType & TYPE_QUOTED_2)) |
| 748 | return Help_Arg_1( CMD_BOOKMARK_SAVE ); |
| 749 | |
| 750 | if (ConfigSave_BufferToDisk( g_aArgs[ 1 ].sArg, CONFIG_SAVE_FILE_CREATE )) |
| 751 | { |
| 752 | ConsoleBufferPush( "Saved." ); |
| 753 | return ConsoleUpdate(); |
| 754 | } |
| 755 | } |
| 756 | |
| 757 | return UPDATE_CONSOLE_DISPLAY; |
| 758 | } |
| 759 | |
| 760 | |
| 761 |
no test coverage detected