dtcalc: Remove more 'extern' variables in .c files, by putting them in .h. Also reduce scope of vars and funcs with static.

This commit is contained in:
Peter Howkins
2021-11-25 04:29:25 +00:00
parent a9175c896d
commit 9f8dbf6a6c
10 changed files with 94 additions and 111 deletions

View File

@@ -41,21 +41,7 @@
#include <ieeefp.h>
#endif
#include "calctool.h"
void matherr(void); // calctool.c
extern char *base_str[] ; /* Strings for each base value. */
extern char *dtype_str[] ; /* Strings for each display mode value. */
extern char *mode_str[] ; /* Strings for each mode value. */
extern char *ttype_str[] ; /* Strings for each trig type value. */
extern char *vstrs[] ; /* Various strings. */
extern struct button buttons[] ; /* Calculator button values. */
extern struct button mode_buttons[] ; /* Special "mode" buttons. */
extern struct menu_entry menu_entries[] ; /* All the menu strings. */
extern Vars v ; /* Calctool variables and options. */
#include "text.h"
double mods[] = { 1.0, 1.0e-1, 1.0e-2, 1.0e-3, 1.0e-4,
1.0e-5, 1.0e-6, 1.0e-7, 1.0e-8, 1.0e-9,