14.11 Routines Not Shown
The following is a brief description of all the subroutines of basecalc that were not shown in this chapter. All of these can be seen in full in Appendix D.
convButtonChanges the current base and converts a value, if any.
digitButtonGets a digit and assigns it to
Value.displayValCalculates appropriate format string for base.
initTtyPerforms system calls to get user’s current erase, delete, and interrupt characters.
keyToWinTranslates a keycode as if a pad had been selected.
makePixmapMakes a pixmap from bitmap data, shown and described in Chapter 6.
operButtonAn operation. Either does it or waits for next value and = .
printInBaseComposes the string that should be displayed. Called from
Sprintf.specButtonClears a digit, an entry, or all, or toggles unsigned mode.
SprintfA modified version of
sprintf, the standard C utility, which does not print in binary.SprintfcallsprintInBase.winPressedDetermines whether pad pressed was a digit, an operator, a conversion, or a special pad.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access