Package list squidview / e739336
Imported Debian patch 0.65-1 Willi Mann 9 years ago
9 changed file(s) with 248 addition(s) and 257 deletion(s). Raw diff Collapse all Expand all
+18
-22
BUGS less more
11
22 I said:
33
4 > On my system the program can segfault when a report is being
5 > generated under certain conditions. This happens when the c++
6 > STL sort function is called too often. Sorting is used to
7 > speed up access to the tables and reduce the time you have
8 > to wait for a report to complete.
4 > On my system the program can segfault when a report is being generated
5 > under certain conditions. This happens when the c++ STL sort function is
6 > called too often. Sorting is used to speed up access to the tables and
7 > reduce the time you have to wait for a report to complete.
98
10 The problem has been found and fixed by Mike Reid (a fellow New
11 Zealander.) I was dereferencing a null pointer in one function
12 and writing to a string that had been c_str() in another - pretty
13 big coding mistakes if you ask me. Naughty boy etc.
9 The problem has been found and fixed by Mike Reid (a fellow New Zealander.)
10 I was dereferencing a null pointer in one function and writing to a string
11 that had been c_str() in another - pretty big coding mistakes if you ask me.
12 Naughty boy etc.
1413
15 For stability reasons my routines are still used, however this
16 is not the fastest solution. You can get about a 20% speed boost
17 if you set "bRepMySort" to "no", as I previously explained:
14 For stability reasons my routines are still used, however this is not the
15 fastest solution. You can get about a 20% speed boost if you set
16 "bRepMySort" to "no", as I previously explained:
1817
19 > There are two variables in squidview.conf which direct
20 > sorting operations. "bRepMySort" can be set to "yes" to use
21 > my sort routines, or "no" otherwise. "iRepFast" is an integer.
22 > After this many lines of processing a sort is made. Therefore
23 > the smaller this number the more often sorts are made. I've
24 > settled on a 10000 value for this; your mileage may vary.
25 > Making "iRepFast" 0 disables sorting completely.
26
27 > Squidview catches segfaults and will tell you if it happened during
28 > the STL sort.
18 > There are two variables in squidview.conf which direct sorting operations.
19 > "bRepMySort" can be set to "yes" to use my sort routines, or "no" otherwise.
20 > "iRepFast" is an integer. After this many lines of processing a sort is made.
21 > Therefore the smaller this number the more often sorts are made. I've
22 > settled on a 10000 value for this; your mileage may vary. Making "iRepFast"
23 > 0 disables sorting completely. Squidview catches segfaults and will tell you
24 > if it happened during the STL sort.
00 >> Squidview history:
1
2 v0.65: 29 February 2004:
3 - faster runs of external programs - help here from Willi Mann of
4 the Debian project
5 - better (and format of) documentation
16
27 v0.64: 17 February 2004:
38 - reverted back to stable, slower sort as a bug still lurks
+125
-140
HOWTO less more
22
33 --Overview
44
5 Squidview is a program meant to display the squid proxy server log
6 file in a nice fashion, providing the log file is in squid's
7 native reporting fashion. It has features such as search, report
8 generation, monitor mode and supports three log files.
9
10 Thus, the program can be used to monitor Internet usage on a
11 networked site. But please note squid has to be running first and
12 this program is not a proactive resource controller. What it can
13 do is tell you who and which sites are consuming the most bandwidth.
5 Squidview is a program meant to display the squid proxy server log file in a
6 nice fashion, providing the log file is in squid's native reporting fashion.
7 It has features such as search, report generation, monitor mode and supports
8 three log files.
9
10 Thus, the program can be used to monitor Internet usage on a networked site.
11 But please note squid has to be running first and this program is not a
12 proactive resource controller. What it can do is tell you who and which sites
13 are consuming the most bandwidth.
1414
1515 --Using squidview
1616
17 Squidview shows each proxy request on one line starting with the
18 user's name (ie the name of the user on the client machine as
19 reported by identd or similar), flags and then the target (ie
20 destination) of the request.
21
22 Should an identd process not be running on the client, squidview
23 can display the client IP address instead of "-", or if you are
24 using an aliases file it can get a name from that. See Reports
25 about this.
26
27 The target bit is truncated if necessary so as to fit the
28 information on one line. There are two methods of truncation
29 (discussed in Reports.)
30
31 Change the selected line with the cursor control keys or the number
32 keypad. Down the bottom, on the status bar, is the time the selected
33 request was made as well how far through the log it is (as a
34 percentage: 0% top, 100% end). Press 'h' to get some help or 'r'
35 for this readme file.
36
37 Also on the status bar will be "Mon Pri". "Mon" means the program
38 will update the screen if new proxy requests are made. Toggle this
39 off by pressing 'm' if you want to remain on a selected line.
40 "Pri" is the primary log file, to switch to another log file press
41 the appropriate key (press 'h' for keys.)
17 Squidview shows each proxy request on one line starting with the user's name
18 (ie the name of the user on the client machine as reported by identd or
19 similar), flags and then the target (ie destination) of the request.
20
21 Should an identd process not be running on the client, squidview can display
22 the client IP address instead of "-", or if you are using an aliases file it
23 can get a name from that. See Reports about this.
24
25 The target bit is truncated if necessary so as to fit the information on one
26 line. There are two methods of truncation (discussed in Reports.)
27
28 Change the selected line with the cursor control keys or the number keypad.
29 Down the bottom, on the status bar, is the time the selected request was made
30 as well how far through the log it is (as a percentage: 0% top, 100% end).
31 Press 'h' to get some help or 'r' for this howto file.
32
33 Also on the status bar will be "Mon Pri". "Mon" means the program will update
34 the screen if new proxy requests are made. Toggle this off by pressing 'm' if
35 you want to remain on a selected line. "Pri" is the primary log file, to switch
36 to another log file press the appropriate key (press 'h' for keys.)
4237
4338 --Flags
4439
45 Between the user and URL columns is the flags field. For example
46 it may be "w2Rf":
40 Between the user and URL columns is the flags field. For example it may be
41 "w2Rf":
4742
4843 'w': a word match on the URL (see Searches below)
4944 '2': bytes transferred was between 0.25MB and 1MB
5045 'R': the request was a cache refresh hit
5146 'f': part of the current focus
5247
53 For a bit of help about these flags select the relevant line and
54 press 'v'.
48 For a bit of help about these flags select the relevant line and press 'v'.
5549
5650 --Searching
5751
58 A search forward is made by the right arrow key, backwards is
59 handled by the left arrow key. But first you need something to
60 search for. Press 'f' to find a piece of text. Both user names and
61 http/ftp addresses can cause a match. Request lines which match
62 are noted by a 'w' in the flags column.
63
64 Multiple search strings are possible, and are necessary when you
65 use skips. Skips tell squidview not to match some requests, such
66 as when the word "sex" is searched for but not when the target is
67 on doubleclick.net (that advertisement server likes to use the word
68 "sex" in URLs.) The following will accomplish that:
52 A search forward is made by the right arrow key, backwards is handled by the
53 left arrow key. But first you need something to search for. Press 'f' to find
54 a piece of text. Both user names and http/ftp addresses can cause a match.
55 Request lines which match are noted by a 'w' in the flags column.
56
57 Multiple search strings are possible, and are necessary when you use skips.
58 Skips tell squidview not to match some requests, such as when the word "sex"
59 is searched for but not when the target is on doubleclick.net (that
60 advertisement server likes to use the word "sex" in URLs.) The following will
61 accomplish that:
6962
7063 !doubleclick.net
7164 sex
7265
73 The requests with "doubleclick.net" in them will be skipped
74 because that piece of text is first and it is preceded with an
75 "!". In doubleclick.net cases the flags column will have a
76 '-' where the word match would have been.
77
78 Note that text you enter with 'f' is placed at the top of the
79 search list so it has priority. Using 'F' (capital F) will add
80 search text to the bottom.
81
82 Your search words can be saved from the search options menu, and
83 you can do some other things there: pick up large requests and
84 focus on a particular user. These two can be turned off when not
85 needed.
66 The requests with "doubleclick.net" in them will be skipped because that piece
67 of text is first and it is preceded with an "!". In doubleclick.net cases the
68 flags column will have a '-' where the word match would have been.
69
70 Note that text you enter with 'f' is placed at the top of the search list so
71 it has priority. Using 'F' (capital F) will add search text to the bottom.
72
73 Your search words can be saved from the search options menu, and you can do
74 some other things there: pick up large requests and focus on a particular user.
75 These two can be turned off when not needed.
8676
8777 --Navigating the log file
8878
89 As well as jumping to the beginning or end of the log file, you
90 can go to a certain percentage through with 'g', or to the
91 beginning of a certain day with 'j' or 'J'. Of course 'home' and
92 'end' work too, if you are using a remote shell and they don't,
93 press '7' or '1' respectfully (look at your number keypad.)
79 As well as jumping to the beginning or end of the log file, you can go to a
80 certain percentage through with 'g', or to the beginning of a certain day with
81 'j' or 'J'. Of course 'home' and 'end' work too, if you are using a remote
82 shell and they don't, press '7' or '1' respectfully (look at your number
83 keypad.)
9484
9585 --User lookup
9686
97 On a selected line you can press 'v' to get a verbose description
98 of it - this is actually a dump of the line to the screen.
99 Squidview will try to match the user to those known in a file
100 called "users", displaying that line in the file. For example
101 the "users" file could have in it:-
87 On a selected line you can press 'v' to get a verbose description of it - this
88 is actually a dump of the line to the screen. Squidview will try to match the
89 user to those known in a file called "users", displaying that line in the file.
90 For example the "users" file could have in it:-
10291
10392 root system administrator
10493
105 The first word on each line must be the login name with no spaces
106 between it and the real name.
94 The first word on each line must be the login name (with no spaces in it) and
95 the real name.
10796
10897 --Common options
10998
110 By default if no login name is available the client's IP number is
111 displayed instead. Change this with "ip instead of null user" to
112 get, instead, reports of bandwidth attributed to "-". The aliases
113 file is another option here. You might specify that 192.168.0.15
114 be displayed as "server4". You need to enable this one because
115 it's off by default.
116
117 Keeping the filename of target also affects the main window. When
118 on, the target URL is shifted left - but not over the domain - so that
119 the type of file can be seen on one line. Otherwise the line is
120 simply truncated to be displayed.
99 By default if no login name is available the client's IP number is displayed
100 instead. Change this with "ip instead of null user" to get, instead, reports
101 of bandwidth attributed to "-". The aliases file is another option here. You
102 might specify that 192.168.0.15 be displayed as "server4". You need to enable
103 this one because it's off by default.
104
105 Keeping the filename of target also affects the main window. When on, the
106 target URL is shifted left - but not over the domain - so that the type of
107 file can be seen on one line. Otherwise the line is simply truncated to be
108 displayed.
121109
122110 --Log a report
123111
124 Make a text or CSV report of search hits. A few options are there.
125 You will need to specify a report file name to view the details.
126 Otherwise you will just get a summary. Reports are placed in ~/.squidview.
127
128 To start or finish the report at a particular point in the log file
129 highlight the line in the main window, press 'l' and then either
130 'a' or 'b'. Press 'a' or 'b' again to toggle it.
131
132 User bandwidth totals can be calculated. The options are search hits
133 or "not veto" (which is mostly everything excluding skips mentioned
134 above.) These are sorted so you can find the heavy internet users.
135
136 Bandwidth totals will find the most popular sites for you. This can
137 be done for one user specifically or for all users as a whole.
138
139 When a word hit is detected it can be written in the report (eg
140 "word hit action: normal text").
141 Text reports are good for viewing with "less"; CSV ones are intended
142 for spreadsheets.
143
144 In the case of normal text reports you may or may not want to see
145 the request size. This information takes up a column. Splitting long
146 lines will show the details on more than one line if need be. Then
147 again, you may only want all "hits" to be shown on just one line.
148
149 The other options are straight forward. Be a bit picky about the CSV
150 field separator - they put just about any characters in URLs. Try a
151 tab (yes, just press 'tab', 'enter') or "*".
152
153 To get a summary report about a particular user, say "graeme", do
154 this:
112 Make a text or CSV report of search hits. A few options here.
113
114 You will need to specify a report file name to view the details. Otherwise you
115 will just get a summary. Reports are placed in ~/.squidview.
116
117 To start or finish the report at a particular point in the log file highlight
118 the line in the main window, press 'l' and then either 'a' or 'b'. Press 'a'
119 or 'b' again to toggle it.
120
121 User bandwidth totals can be calculated. The options are search hits or
122 "not veto" (which is mostly everything excluding skips mentioned above.) These
123 are sorted so you can find the heavy internet users.
124
125 Bandwidth totals will find the most popular sites for you. This can be done for
126 one user specifically or for all users as a whole.
127
128 When a word hit is detected it can be written in the report (eg "word hit
129 action: normal text"). Text reports are good for viewing with "less"; CSV ones
130 are intended for spreadsheets.
131
132 In the case of normal text reports you may or may not want to see the request
133 size. This information takes up a column. Splitting long lines will show the
134 details on more than one line if need be. Then again, you may only want all
135 "hits" to be shown on just one line.
136
137 The other options are straight forward. Be a bit picky about the CSV field
138 separator - they put just about any characters in URLs. Try a tab (yes, just
139 press 'tab', 'enter') or "*".
140
141 To get a summary report about a particular user, say "graeme", do this:
155142 - in search options focus on "graeme"
156143 - go to log a report
157144 - select "domain bandwidth totals"
158145 - select "only focus user graeme"
159146 - and press enter on the previous screen where it says go
160147
161 You will need to unset the above options for reports to come
162 out normally again, and for searches (cursor <-, ->) too.
148 You will need to unset the above options for reports to come out normally
149 again, and for searches (cursor <-, ->) too.
163150
164151 --Filtered reports
165152
166 After making a general report it is possible to filter it for
167 just one user. That way you don't have to rescan the log file
168 with a focus. The downside of this is the target totals the
169 user surfed to can't be calculated.
153 After making a general report it is possible to filter it for just one user.
154 That way you don't have to rescan the log file with a focus. The downside of
155 this is the target totals the user surfed to can't be calculated.
170156
171157 --Tally Mode
172158
173 This mode tells you some statistics about each user's usage of the Web.
174 Given any given starting point, it doesn't have to be at the begining of the
175 log, squidview will gather the data, display it, and then keep it up to
176 date.
159 This mode tells you some statistics about each user's usage of the Web. Given
160 any given starting point, it doesn't have to be at the begining of the log,
161 squidview will gather the data, display it, and then keep it up to date.
177162
178163 So from the main screen press T (capital) and let it work. Then you should
179164 get the tally screen that has the list of users down the left hand side and
180165 their statistics to the right. Most numbers are self explanatory. "Points"
181166 indicate who has used the Web a lot recently. Every web byte is counted and
182167 added to that user's number of points. Then after a certain period of time
183 the points list is aged, eg multiplied by 0.75. This means big users will
184 rise to the top quickly and then slowly progress further down the list if
185 they stop surfing.
186
187 Tally mode can be set to go in monitor mode. Turn that off if you need to
188 stay selected on one user. There are other views and options mentioned in
189 help (h). One of these toggles what to do about requests that have been
190 denied. You may not want to see attempts by computers (often by themselves)
191 "phoning home" regularly. If the status line shows "-d" you won't get
192 these cluttering up your view.
168 the points list is aged, eg multiplied by 0.75. This means big users will rise
169 to the top quickly and then slowly progress further down the list if they stop
170 surfing.
171
172 Tally mode can be set to go in monitor mode. Turn that off if you need to stay
173 selected on one user. There are other views and options mentioned in help (h).
174 One of these toggles what to do about requests that have been denied. You may
175 not want to see attempts by computers (often by themselves) "phoning home"
176 regularly. If the status line shows "-d" you won't get these cluttering up your
177 view.
193178
194179 --One User History
195180
197182 entries only by the specified user. It is useful to discover that user's
198183 recent activity, warranted for example by a spike in his/her tally points.
199184
200 Pressing O (capital) will bring you into this mode using as the user the
201 one currently selected. u will switch to another user.
185 Pressing O (capital) will bring you into this mode using as the user the one
186 currently selected. u will switch to another user.
202187
203188 The numbers on the status line deserve explanation. If they say:
204189
210195 file.
211196
212197 The 90.90% indicates the selected line is that far down the request entries
213 in memory. For your information the request lines aren't actually in
214 memory - just their positions in the log file are.
198 in memory. For your information the request lines aren't actually in memory -
199 just their positions in the log file are.
22 $ ./configure
33 $ make
44
5 The program is c/c++ and uses the ncurses library for obtaining
6 some keystrokes. Old gcc compilers can fail compiling this
7 program; if so start afresh and:
5 The program is c/c++ and uses the ncurses library for obtaining some
6 keystrokes. Old gcc compilers can fail compiling this program; if so start
7 afresh and:
88
99 $ cp Makefile.old Makefile
1010 $ make oldgcc
1111
1212 ... and install manually.
1313
14 If you are compiling on Solaris I have heard of one instance where
15 it is necessary to link against Solaris' own curses library. To do
16 this you need to link against lcurses rather than lncurses.
14 If you are compiling on Solaris I have heard of one instance where it is
15 necessary to link against Solaris' own curses library. To do this you need
16 to link against lcurses rather than lncurses.
1717
1818 --Installation
1919
2020 If "configure" and "make" are successful:
2121
22 # make install
22 # make install-strip
23
24 "make install-strip" will provide a smaller executable than "make install"
25 because the latter has quite a bit of debugging information with it.
2326
24 Or if you aren't the superuser the program will still run if
25 you have read access to the squid log file.
27 Or if you aren't the superuser the program will still run if you have read
28 access to the squid log file.
2629
2730 This program assumes the main squid log file is here:
2831 /usr/local/squid/var/logs/access.log
29 If it isn't just symlink it appropriately from the following
30 default. This directory and links are made in the user's home
31 space when squidview is first run by the user.
32 If it isn't just symlink it appropriately from the following default. This
33 directory and links are made in the user's home space when squidview is first
34 run by the user.
3235
3336 graeme@localhost:~/.squidview$ ls -l
3437 HOWTO -> /usr/local/share/squidview/HOWTO
3841 users
3942 words
4043
41 In this case squidview expects the primary log to be "log1",
42 and the symlink redirects it to where the file actually is. Three
43 log locations are supported which gives you a bit of room for
44 accomodating rotating logs.
44 In this case squidview expects the primary log to be "log1", and the symlink
45 redirects it to where the file actually is. Three log locations are supported
46 which gives you a bit of room for accomodating rotating logs.
4547
46 This tar.gz archive comes with an example access.log named
47 example.log. Symlink it to view it with squidview, or copy it to
48 your ~/.squidview directory. The same applies to the HOWTO.
48 This tar.gz archive comes with an example access.log named example.log.
49 Symlink it to view it with squidview, or copy it to your ~/.squidview
50 directory. The same applies to the HOWTO.
4951
50 "users" and "words" are reporting files - these can be symlinks
51 to /etc if you would rather have these files there. "aliases" is
52 another text file, this time for mapping IP numbers to user-
53 defined names.
52 "users" and "words" are reporting files - these can be symlinks to /etc if
53 you would rather have these files there. "aliases" is another text file,
54 this time for mapping IP numbers to user-defined names.
5455
55 This package comes with example "users", "words" and "aliases"
56 files you can build on.
56 This package comes with example "users", "words" and "aliases" files you can
57 build on.
693693
694694 PACKAGE=squidview
695695
696 VERSION=0.64
696 VERSION=0.65
697697
698698 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
699699 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
906906 CXXFLAGS="$ac_save_CXXFLAGS"
907907 elif test $ac_cv_prog_cxx_g = yes; then
908908 if test "$GXX" = yes; then
909 CXXFLAGS="-O2"
909 CXXFLAGS="-g -O2"
910910 else
911911 CXXFLAGS="-g"
912912 fi
00 AC_INIT(squidview.cpp)
11 AM_CONFIG_HEADER(config.h)
2 AM_INIT_AUTOMAKE(squidview,0.64)
2 AM_INIT_AUTOMAKE(squidview,0.65)
33 AC_PROG_CXX
44 AC_PROG_INSTALL
55
0 squidview (0.65-1) unstable; urgency=low
1
2 * New upstream release
3 * This release fixes most screen corruption upstream. A litte patch
4 was still necessary.
5 * This release should make it into unstable (closes #233280)
6
7 -- Willi Mann <willi@wm1.at> Tue, 2 Mar 2004 16:25:56 +0100
8
09 squidview (0.64-4) unstable; urgency=low
110
211 * Better implementation for additional parameter iWait in RunProgram
312 (thanks Michael Vogt)
4 * This release should make it into unstable (closes #233280)
513
614 -- Willi Mann <willi@wm1.at> Sat, 21 Feb 2004 11:54:28 +0100
715
77 # This is the debhelper compatibility version to use.
88 export DH_COMPAT=3
99
10
1011 # These are used for cross-compiling and for saving the configure script
1112 # from having to guess our platform (since we know it already)
1213 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
1314 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
1415
16 CXX = g++
17 CXXFLAGS = -Wall -g
18 INSTALL = install
19 INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
20 INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
21 INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
22 INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
1523
16 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
17 CFLAGS += -g
24 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25 CXXFLAGS += -O0
26 else
27 CXXFLAGS += -O2
1828 endif
19 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
20 INSTALL_PROGRAM += -s
21 endif
29
30 export CXX CXXFLAGS
2231
2332 config.status: configure
2433 dh_testdir
3333 logic is followable which is something.
3434
3535 Warning: those who complain about the source code might be requested to
36 be the one who rewrites it.
37
36 be the one who rewrites it :)
37
3838 */
3939
4040 #ifdef HAVE_CONFIG_H
4848 #include <string>
4949 #include <vector>
5050 #include <algorithm>
51 #include <iostream>
5251
5352 #include <curses.h>
5453 #include <signal.h>
162161 }
163162
164163
165 // execute a shell command
166 void RunProgram (const string& sCommand, int iErase, int iWait = 0)
164 // clears the screen
165 void MyCls()
166 {
167 attroff (A_REVERSE);
168 clear();
169 refresh();
170 move (0, 0);
171 }
172
173
174 /// execute a shell command
175 void RunProgram(const string& sCommand)
176 {
167177 //Debian - Notes: 1) "reset -Q" resets the size of my terminal (konsole).
168 //2) I don't believe "clear" is a proper way for this sort of
169 //terminal-cleaning.
178 //2) I don't believe "clear" is a proper way for this sort of
179 //terminal-cleaning.
170180 //solution: use endwin() + refresh() + optionally (iWait) standard c++
171 //for waiting.
181 //for waiting.
172182 //This messes up the output in some rare cases with iErase == 0.
173 //Still readable, just not as intended. Additional note: In the
183 //Still readable, just not as intended. Additional note: In the
174184 //original code first call of n,l didn't show anything
175 //reason not clear.
176 //Implementation of iWait was neccessary to keep the non-curses
185 //reason not clear.
186 //Implementation of iWait was neccessary to keep the non-curses
177187 //code in one function. Seems that any call to the curses library
178 //returns to curses mode, what would make it hard to keep the
179 //"Press any" key in the original place.
180
181 {
188 //returns to curses mode, what would make it hard to keep the
189 //"Press any" key in the original place.
190
191 // clear(1) clears the user's bash console (squidview's parent), but this
192 // isn't necessary. And yes, MyCls() is much faster so now used. This bit
193 // of code has been simplified, and if all goes well these comments will
194 // be deleted.
195
196 MyCls();
182197 curs_set (1);
183198 echo();
184199 nocbreak();
185
186 if (wTemp)
187 delwin (wTemp);
188 if(iErase)
189 endwin();
200 //This line doesn't seem to be needed; instead it
201 // caused another screen corruption. Hopefully there are no side effects.
202 // (I can't imagine one)
203 //--> if (wTemp)
204 endwin(); // suggested by endwin(3)
190205 system (sCommand.c_str());
191 cbreak();
192 if (iWait)
193 {
194 cout << "\nPress any key.";
195 cin.get();
196 }
197 if(iErase)
198 refresh();
199 wTemp = newwin (1, 1, LINES - 1, COLS - 1);
200206 keypad (stdscr, TRUE);
201 nonl();
202 cbreak();
203207 curs_set (0);
204208 noecho();
205 if (iErase)
206 {
207 erase();
208 refresh();
209 }
209 cbreak();
210 MyCls();
210211 }
211212
212213
330331 sTemp.assign (iCols - int (sText.length()), ' ');
331332 sTemp += sText;
332333 return sTemp;
333 }
334
335
336 // clears the screen
337 void MyCls()
338 {
339 attroff (A_REVERSE);
340 erase();
341 refresh();
342 move (0, 0);
343334 }
344335
345336
25102501 return;
25112502 }
25122503 sCurrentReport = sRepFileName;
2513 //Debian - modification: add (y/n). I pressed v more than once
2514 //instead of y.
2515 sDispLine = sRepFileName + " made: " + sTemp + "; View? (y/n)";
2504 sDispLine = sRepFileName + " made: " + sTemp + "; View (y/n)? ";
25162505 if (PromptForKey (sDispLine) == 'y')
25172506 {
25182507 sTemp = sViewer + " " +sPathToFiles + "/" + sRepFileName;
2519 RunProgram (sTemp, 1);
2508 RunProgram (sTemp);
25202509 }
25212510 sStatusMessage = "Press 'n' for misc. operations you can do on "
25222511 + sRepFileName;
31373126 break;
31383127
31393128 case 'l':
3140 MyCls();
3141 sTemp = "cd " + sPathToFiles + " ; " +
3129 sTemp = "( cd " + sPathToFiles + " ; " +
31423130 "echo -e \"Current reports:-\n\" ; " +
3143 "ls -l *" + sReportExt;
3144 RunProgram (sTemp, 1, 1);
3145 iPause = 0;
3131 "ls -l *" + sReportExt + " ) | " + sViewer;
3132 RunProgram (sTemp);
31463133 break;
31473134
31483135 case 'd':
31533140 break;
31543141 }
31553142 sTemp = "rm " + sFile;
3156 RunProgram (sTemp, 0);
3143 RunProgram (sTemp);
31573144 sCurrentReport = "";
31583145 break;
31593146
31663153 else
31673154 {
31683155 sTemp = sViewer + " " + sFile;
3169 RunProgram (sTemp, 1);
3156 RunProgram (sTemp);
31703157 }
31713158 break;
31723159
31793166 else
31803167 {
31813168 sTemp = sViewer + " " + sFilter;
3182 RunProgram (sTemp, 1);
3169 RunProgram (sTemp);
31833170 }
31843171 break;
31853172
32533240 if (getch() == 'y')
32543241 {
32553242 sTemp = sViewer + " " + sPathToFiles + "/" + sDest;
3256 RunProgram (sTemp, 1);
3243 RunProgram (sTemp);
32573244 }
32583245 }
32593246 else
33023289 "Press any key to begin";
33033290 getch();
33043291 sTemp = "pine -attach " + sFile + " " + sCurrentEmail;
3305 RunProgram (sTemp, 1);
3292 RunProgram (sTemp);
33063293 break;
33073294
33083295 case 's':
39933980 }
39943981 }
39953982 else
3996 RunProgram (sViewer + " " + sHowToLink, 1);
3983 RunProgram (sViewer + " " + sHowToLink);
39973984 }
39983985
39993986