summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormongo <mongo@iomega>2016-04-01 16:34:31 -0300
committermongo <mongo@iomega>2016-04-01 16:34:31 -0300
commit0091f5263aebdfefcdeae4a3fa12596f677f3289 (patch)
tree9e642784c544df02265cc10a93f03c7180cee102
parent036566f1fe5713796c3f28038aaa26c537e71600 (diff)
MAXROWS now can be defined in Makefile
-rw-r--r--src/Makefile6
-rw-r--r--src/sc.h9
2 files changed, 12 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index f429f0c..d7eb302 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -129,10 +129,14 @@ XLSX :=
#UNDO :=
UNDO := -DUNDO
+# Set the maximum number of rows in sheet
+# Can be set up to 1048576.
+MAXROWS := 65536
+
#CFLAGS := -O2 -Wall -pipe -g
CFLAGS := $(LINUX) $(FREEBSD) $(NETBSD) $(MACOSX) -O2 -Wall -pipe -g -I/usr/include/libxml2
CFLAGS := $(CFLAGS) $(USECOLORS) $(USELOCALE) $(UNDO) $(SIGVOID) $(DFLT_PAGER)
-CFLAGS := $(CFLAGS) $(IEEE_MATH) $(RINT) $(REGEX) $(LIBRARY)
+CFLAGS := $(CFLAGS) $(IEEE_MATH) $(RINT) $(REGEX) $(LIBRARY) -DMAXROWS=$(MAXROWS)
CFLAGS := $(CFLAGS) $(HELP_PATH) $(SNAME) $(NO_NOTIMEOUT) $(SIMPLE) $(XLS) $(XLSX) $(HISTORY_FILE)
LDLIBS := -lm -lncursesw
diff --git a/src/sc.h b/src/sc.h
index 2bc2d7d..431299b 100644
--- a/src/sc.h
+++ b/src/sc.h
@@ -6,8 +6,13 @@
#define ATBL(tbl, row, col) (*(tbl + row) + (col))
#define MINROWS 100 /* minimum size at startup */
-//#define MAXROWS 1048576 /* MAX rows size of sheet */
-#define MAXROWS 65536 /* MAX rows size of sheet */
+
+/* MAX rows size of sheet. Default 65536. */
+/* Can be changed up to 1048576 in Makefile */
+#ifndef MAXROWS
+#define MAXROWS 65536
+#endif
+
#define MINCOLS 30
#define ABSMAXCOLS 702 /* MAX cols. (ZZ in base 26) */
#define CRROWS 1