File: notes

package info (click to toggle)
xspread 3.1.1c-9
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,836 kB
  • ctags: 1,426
  • sloc: ansic: 19,342; yacc: 499; lisp: 231; makefile: 198; sh: 28; sed: 4
file content (195 lines) | stat: -rw-r--r-- 7,690 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
Current Xspread supporter:
Included below
	1) High level list of change from Xspread3.1.1 to this version.
	2) A detailed list of changes to xspread.
	3) A note I sent earlier.


					-Jeff Buhrt
					Ameritech Services, Inc.
					317-265-7426
				I-net:	jeff@appf.ci.in.ameritech.com

***********************
Major things that have changed (Xspread3.1.1 to this version)
	-X & Curses (text/sc) mode will automatically be selected based on
		availability of X libs, $DISPLAY, etc.
		-X can be deselected (curses used) by adding '-X' to xspread
	-Gnu autoconfig creates a 'configure' script that automatically
		searchs for system features vs hand updating configs.
	-The Quick Reference card, scqref (formerly a separate program),
	 which xspread has never printed, can be printed by: 
			xspread -q	# text format output
			xspread -qt	# troff -ms format output
			xspread -h	# prints usage from help.c vs version.c
					(allows qref to use same data)
	-Addition of functions:
		evalall, @irr, read (read text strings)
		[copy can now copy to a cell (it figures out the size needed)]
	-Corrected/added
		-enhanced vi support
		-Framemaker table support (file suffix/format)
		-Get/Put/etc. now consistant on filling in with defaults
		-cleaned code for portability & limiting compiler warnings
	-Makefile now builds 'pxspread' (the name carried from 'psc')
		-Psc will take ascii files and try to convert them into
		 xspread data.
	-Tested on AIX 3.2.5 & 4.1.3, AT&T SysV R3.2.3, Linux slackware 1.59

***********************
CHANGES:
1) ierr = 1; // means no error ?
	-ierr = 0 makes more sense for no error

other: (grep JEFFB)
	-format.c: 0 fill and precision might not always work together
	-graphic_main.c:	~line209
		note: case 0 will never be called

graphic_main.c:	
	-~line950	graphic_skipscale() was never 
	-NULL==0 (most of the time) thus case 0 is skipped 
	-I moved: graphic_init(), graphic_read_defn(), graphic_write_defn()
	 to the bottom, they are needed whether we have X11 or not

cleaned up a few places where:
	-NULL was used vs the integer 0
	-if (pointer = funt())	-> if ((pointer = funt()) != NULL)
		because is (x = 0) intended or (x == 0)
		-gcc suggests adding extra '()' as a minimum, the
		 most readable is to be explict in the compare

moved message(char *) into util.c to be next to error(char *) which
	-does almost the same thing (different display line and a sleep).
	-scXstuff.c isn't used in !DOINGX mode

added missing function prototypes
	-'function PROTO((arg1, arg2, ...))' is now used vs the old __STDC__
	 listing each function twice (once with and once without args).
	-PROTO() is eather '#define PROTO(x) x' [when we are ansi and can
	 handle function arguments in prototypes] 
	 or '#define PROTO(x)' [when we are traditional K&R]

Things that are shared should be defined in a common header included by
both files so the compiler can cross check. (extension of above) 
(added missing)
Ex:	the struct's: freeents & freeenodes
	functions

added '{}' around the structure initializer pairs in [es]res.sed
	-They are used to produce: experres.h and statres.h respectively,
	 which are included by lex.c.
	-This allows gram.y to have more comments on what things mean. 

Curses:
	-Fixed a few curses problems that DOINGX didn't take into account,
	including but not limited to:
		-move(x,y) (incorrect) was used vs move(y,x) in clearlines()
	-Added HAVE_X*: now supports curses & X in the same executable
	-DOINGX was dropped and replaced...

screen.c
	-in update() 'char field[]' didn't need to be static
	-added safety checking of default screen size to make sure
	 curses xspread could run w/ a file as stdin
	 [this was very stumping until I realized xspread never left update(),
	  it was constantly try to place the center row/col between two
	  impossible limits]

get/put default directories
	-auto adding $HOME to the path on a get/put makes life harder,
	 you have to backspace over/edit out the expanded path, if
	 people store everything in their $HOME maybe. What if I am
	 in a directory path hundreds of chars deep (maybe?), the default
	 should be where I am.
	-a possiblity is a .xspreadrc that has personal preferences...
	FIXED BY: using what default said before and some very nice
	 code that was sent in after Sc6.28 (but never used in a released
	 version of sc).

Other
	-name change: error() -> scerror() for ansi/gcc/AIX conflict
	-eres.sed/sres.sed now put {} each line (struct element) and
		handle comments in gram.y (detail above)
	-The W command will give as much space as needed to a label in 
	 the last column being written, so can be used with r to read and
	 write arb line length text files.
	-added FRAME table type suffix. 
	-Centralized table suffix generation. 


gram.y
	-added comments (merged from my local version)
%	-added the finacial function IRR -Internal Rate of Return
		'@irr()' computes internal-rate-of-return over a range
		 containing a cash flow.
%	-added S_READ -read a string delimited file to a range
		'r [range_or_var]' command which reads the contents of a file
		 as strings into a range or starting at a cell.
%	-added S_EVALALL
		command 'evalall' for use in scripts (the default is
		not to to any evaluation while reading a file)
%	-S_COPY to a var, ex: copy to a50 from a10:f30
		(make the destination conform to the source)

%-needs added to doc/* files

vi.c
	-support for D and C in edit mode, as well as c$, d$, c0, d0. 
	 Man and help pages.
	-fixed incorrect interpretation of cl command at end of line


TODO:
auto-config PAGER (use env) if fails use internal
CRYPT same as above...
SIGTSTP causes an endless loop (curses on Linux)

CHECK:
	-reg*c*mp don't seem to work same way
	-probe for:
		-HAVE_X11*

***********
I just noticed the [somewhat] new Xspread3.x code...

Some notes on the new Xspread3.1.1:
1) In the C code: '\0' should be used vs NULL to end strings
	NULL is a pointer, '\0' end of string, 0 an integer
	(CDC even had a few UNIX machines where: NULL != '\0' != 0)
2) Makefile: $(OBJS) should not include gram.o so gram.o doesn't
	try to be built by 2 different make targets

3) AIX3.2 needs -lPW for regcmp/regex
4) Per the TODO file:
-TODO-
>	BTW, there is a serious bug concerning functions that return strings
>	(eg @DATE, @SUBSTR): it says "invalid numeric function" or somesuch.
>	This means that eval() instead of seval() is being called for those
>	functions, but I couldn't discover why.  At present, you can't use
>	functions that return strings.

	Strings functions are assigned the string part of a cell.
	Use: label, leftstring, rightstring (verbs in gram.y that call slet())
		vs let (which calls let())

	I always thought that something could be done to make it automatic.
	a) ie: [xspread saying this] 'I know that he said assign this to the 
	   numeric part, but what is given is a string therefor I will just
	   do a 'label' or such vs the let.
	b) rethink the numeric/string idea of cells [note: major change]
5) I will look into what was broken with the curses, aka 'sc' part, of xspread.
6) I have little to no time in the last few years for support of 'sc' and
	would love to turn over the maintainership. Really Xspread is becoming
	stable enough, as long as the text/curses part were supported, just
	to merge officially (become the same product).
-TODO-
>	Currently this is xspread..  One day it will be incorporated
>	with SC.  SC and xspread will be the same program.  
>	I've also noticed that sc.c could not compile if DOINGX is not defined
>	due to the use of userfont which is declared only when DOINGX is
>	defined.  Some of the other defines also still get screwed up.

7) I will answer any questions as needed, etc.