Merchants can benefit from greater convenience with a virtual terminal that takes both types of transactions: when customers are present with their debit or credit card or when they need to process a card-not-present transaction, such as over the phone or via email. Card-present and card-not-present versatility.Moreover, PCI validation offers merchants a stamp of approval that the provider is serious about security.īenchmark virtual terminal services should easily integrate with a merchant’s devices, making payment processing as easy as possible. The right virtual terminal should offer cutting-edge tokenization and encryption to protect against credit card fraud. Tokenization, encryption and PCI validation.On linux substitute ansi_support-other.f90 for ansi_support-win.f90. ! In ansi_support-other.f90Ĭompile on windows (using my advanced build system - the command prompt): ifort /exe:ansi.exe ansi_common.f90 ansi_support-win.f90 ansi.f90 On linux, the corresponding module is a bit shorter. IOR(mode, ENABLE_VIRTUAL_TERMINAL_PROCESSING) ) IF (output_handle = INVALID_HANDLE_VALUE) THENĪpi_result = GetConsoleMode(output_handle, mode) Output_handle = GetStdHandle(STD_OUTPUT_HANDLE) INTEGER(DWORD), PARAMETER :: ENABLE_EXTENDED_FLAGS = INT(Z'0080', DWORD) !GCC$ ATTRIBUTES STDCALL :: SetConsoleMode !DEC$ ATTRIBUTES STDCALL :: SetConsoleMode INTEGER(DWORD), INTENT(IN), VALUE :: dwMode INTEGER(DWORD), PARAMETER :: ENABLE_LVB_GRID_WORLDWIDE = INT(Z'0010', DWORD)įUNCTION SetConsoleMode(hConsoleHandle, dwMode) BIND(C, NAME='SetConsoleMode') INTEGER(DWORD), PARAMETER :: DISABLE_NEWLINE_AUTO_RETURN = INT(Z'00008', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_VIRTUAL_TERMINAL_PROCESSING = INT(Z'0004', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_WRAP_AT_EOL_OUTPUT = INT(Z'0002', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_PROCESSED_OUTPUT = INT(Z'0001', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_VIRTUAL_TERMINAL_INPUT = INT(Z'0200', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_WINDOW_INPUT = INT(Z'0008', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_QUICK_EDIT_MODE = INT(Z'0040', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_PROCESSED_INPUT = INT(Z'0001', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_MOUSE_INPUT = INT(Z'0010', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_LINE_INPUT = INT(Z'0002', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_INSERT_MODE = INT(Z'0020', DWORD) INTEGER(DWORD), PARAMETER :: ENABLE_ECHO_INPUT = INT(Z'0004', DWORD) !GCC$ ATTRIBUTES STDCALL :: GetConsoleMode !DEC$ ATTRIBUTES STDCALL :: GetConsoleMode INTEGER(HANDLE), INTENT(IN), VALUE :: hConsoleHandle INTEGER(DWORD), PARAMETER :: STD_ERROR_HANDLE = -12_DWORDįUNCTION GetConsoleMode(hConsoleHandle, lpMode) BIND(C, NAME='GetConsoleMode') INTEGER(DWORD), PARAMETER :: STD_OUTPUT_HANDLE = -11_DWORD INTEGER(DWORD), PARAMETER :: STD_INPUT_HANDLE = -10_DWORD INTEGER(DWORD), INTENT(IN), VALUE :: nStdHandle INTEGER(HANDLE), PARAMETER :: INVALID_HANDLE_VALUE = -1_HANDLEįUNCTION GetStdHandle(nStdHandle) BIND(C, NAME='GetStdHandle') (See one of the plethora of online sources for details on the escape sequences.)įor windows, ansi_support looks like (should also be compilable by gfortran - if you used the ifort provided modules such as IFWIN, this would be shorter): ! In ansi_support-win.f90ĭWORD => C_LONG, & ! C_INT32_T really, but this is per the docs Operating system independent: ! In ansi.f90 This can obviate use of the pre-processor entirely.Ī simple example using that approach, also with an example of using ansi escape sequences, because I'm not sure what "them" refers to in "how do I use them?" Put the logic operating system specific decisions into whatever build system you are using - build systems have to know what sort of operating system they are running on. I very much prefer the approach of abstraction to a set of procedures in a set of platform specific files approach, mentioned by andrew_4619.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |