Commit Graph

7659 Commits

Author SHA1 Message Date
stefanf
fd79e6a683 Assign 0.0 to the variable passed to getfloating() if the argument is missing.
MFC after:	1 week
2005-04-13 19:54:03 +00:00
harti
347920afa9 Split VarFind() into a series of functions tailored for the different sets
of flags originally passed to VarFind(). This eliminates the code by
removing a bunch of tests.

Patch:		7.173

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-04-13 11:40:44 +00:00
mdodd
44f26591d0 Add support for more than two datasets. Currently limited to 7 though
the limit is only the number of meaningful graph symbols available.

Statistical comparison is performed between the first dataset and
any further datasets.

No objection by:	 phk
2005-04-13 05:50:56 +00:00
jylefort
73f010cd0d Add myself as a new ports committer.
Approved by:	adamw (mentor)
2005-04-12 20:06:43 +00:00
ru
07d3bbca19 Silence a warning on systems without carp(4). 2005-04-12 08:47:04 +00:00
stefanf
aed8bcfc2b Replace buggy for-loops to skip certain character with strspn(). If *fmt was
'\0' (eg in the invocation 'printf %'), the for-loop would miss the terminating
null character.

MFC after:	1 week
2005-04-11 10:57:54 +00:00
harti
3fcd99fa67 Parse_Init() is gone so remove comments that mention it. 2005-04-11 07:40:54 +00:00
harti
6a44af4932 Remove an unneccesary forward declaration for MainParseArgs().
getopt() may be called several times - make sure to set optreset
to reset it. Cleanup handling of non-option arguments.
Remove some misleading comments.

Patch:		7.171

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-04-11 07:32:49 +00:00
harti
31837fbbe6 Remove the call to Parse_Init() - there is no need to initialize
a static variable to NULL. Forgot this in the previous commit to
parse.[ch].
2005-04-11 07:26:21 +00:00
harti
e0e1cda47d Rework the directive parsing code. Instead of using a lot of strcmp()s
on every line that starts with a dot use a minimal perfect hash
function and a single strcmp() on the first word after the dot
to find out whether it is really a directive call and, if yes, which
one. Then directly dispatch to a handler function for that directive
(or fall through to the dependency handling code). This makes the
directive parse a little bit more strict about the syntax: the directive
word must be followed by a character that is not alphanumerical and not
an underline (making .undefFOO illegal); .endif and .else can only be
followed by comments.
2005-04-11 07:20:10 +00:00
remko
c52e79424b Add myself to the calendar.
MFC after: 	1 week
Approved by:	simon (mentor)
2005-04-10 19:03:48 +00:00
stefanf
60b910d7c2 Remove unused variables. 2005-04-09 14:31:41 +00:00
murray
b54f449e43 Commodore Perry was not 4 years old when he sailed to Japan. Correct
birth year.
2005-04-08 09:50:30 +00:00
joel
231b2a9d26 Add myself (and decrease the average age).
Approved by:	brueffer (mentor)
2005-04-08 09:04:29 +00:00
harti
ad1daccf07 Move the code for parsing .for and .if statements to the place where the
other directives are handled.
2005-04-08 09:03:40 +00:00
harti
da722414da When Parse_Error is called after the top-level Makefile is closed we
have no CURFILE anymore so we cannot print a file name or line number.

When ParseSkipLine() returns NULL (it does this when it has detected an
EOF in an .if block) try to pop the input stack and process the next line
2005-04-07 14:39:38 +00:00
harti
75b2f0b4cc Handle popping of the input stack in ParseReadLine() instead of
Parse_File(). Remove a comment and a piece of code comming from
ancient times when the if-directive read like #if and not .if.
Correctly analyze the first character of a line.
2005-04-07 11:29:39 +00:00
harti
ba01ab9700 Mostly stylistic changes: remove the noPLen field from the Shell
structure - it is just the strlen() of noPrint. Inline JobCondPassSig()
in the only function JobPassSig() using it. Fix the argument types
of JobPrintCommand(). Better parsing for the .SHELL target keywords.
2005-04-07 11:26:15 +00:00
harti
e8348c9f03 There is not much sense in having an else after Punt() and _exit() which
never return. Also use pid_t for variables holding PIDs.
2005-04-05 12:33:54 +00:00
harti
f3be953c78 Put parantheses into 'if (foo && bar & flag)'. While they are not strictly
needed, they are useful for the human reader.
2005-04-05 08:14:40 +00:00
harti
980b8c2099 Remove lots if irritating parantheses and fix two comments.
Checked by:	md5
2005-04-05 08:09:48 +00:00
harti
d697c96c94 Remove the definition for STATIC and just use static. 2005-04-05 07:44:11 +00:00
harti
7786d65f29 Remove unneccessary local prototypes. 2005-04-05 07:43:02 +00:00
harti
a868b14c9b The static tfile is used only in one single function so move it into that
function.
2005-04-05 07:40:40 +00:00
harti
21d8737201 The tfile field of struct Job isn't used anymore since revision 1.22 so
remove it now.
2005-04-05 07:32:12 +00:00
stefanf
7d745ab866 Include <string.h> and <strings.h> for various functions. 2005-04-04 21:19:48 +00:00
pjd
650f7fc58c If they ever tell my story,
let them say I lived in the time of Pope John Paul II,
one of the greatest man...

Je¶li kiedy¶ kto¶ opowie moj± historiê,
niech powie, ¿e ¿y³em w czasach Papie¿a Jana Paw³a II,
jednego z najwspanialszych ludzi, najwspanialszego Polaka...

			-- Pawe³ Jakub Dawidek, atheist
2005-04-03 09:46:06 +00:00
imp
ce6b3c821b Don't refer to devices that don't exist. 2005-04-03 05:19:45 +00:00
tanimura
21cf84ad60 Commemorate the bicentenary of Hans Christian Andersen's birth by
adding his birthday.
2005-04-02 09:27:13 +00:00
tjr
3a8b8f05cd Use rpmatch() instead of checking for responses that begin with 'y'
in queryuser(). This allows users to respond to -ok and -okdir
prompts with any affirmative reply defined by their current locale.
2005-04-02 07:44:12 +00:00
harti
a366657808 Use a type-safe intrusive list to put jobs on the jobs or stoppedJobs list
instead of the generic Lst.
2005-04-01 16:24:25 +00:00
harti
b2e188d271 Remove a forward declaration that isn't needed anymore. 2005-04-01 16:23:48 +00:00
harti
992d45983f Both struct Job and struct Shell are only used inside job.c so there is
no need to have them in a header file that is included by other modules.
Move them both into the c-file.
2005-04-01 13:35:35 +00:00
harti
69c4bf767a Style: fix indentation. 2005-04-01 13:25:45 +00:00
harti
d6f9d698c0 Style: fix indentation. 2005-04-01 13:06:05 +00:00
harti
ae0fcd1f54 Style: indentation. 2005-04-01 13:02:17 +00:00
harti
5eacd6ebd8 Style: Indentation. 2005-04-01 12:42:03 +00:00
harti
52707a6f25 Style: fix indentation. 2005-04-01 12:31:15 +00:00
harti
b4343e6f86 Style: fix indentation. 2005-04-01 11:20:17 +00:00
harti
0f7b53389d Style: fix indentation. 2005-04-01 11:12:29 +00:00
harti
3cb4e5dca4 Style: fix indentation. 2005-04-01 10:53:43 +00:00
cperciva
ccca7719c7 Note the passing of Cameron Grant <cg@FreeBSD.org>.
Approved by:	quiet1
2005-03-31 23:15:14 +00:00
harti
bf21be6c02 Document the new -A flag for ignoring archive errors. 2005-03-31 11:40:53 +00:00
harti
800d083cdf Almost complete rewrite of the archive code (except for the Makefile parsing
part). Archive handling was broken at least since the move from BSD ar/ranlib
to GNU binutils because of the different archive format. This rewrite fixes
this by making make to carry around the defines for all formats (it supports)
so it can support all of them independent of the actually used one. The
supported formats are: traditional BSD (this seems to come from V7 at least,
short names only and __.SYMDEF), BSD4.4 (long names with #1/ and __.SYMDEF)
and SysV (extra name table and //). The only format not supported are broken
traditional archives where the member names are truncated to 15 characters.

Errors in the archive are not ignored anymore, but cause make to stop with
an error message. The command line option -A causes these errors to become
non-fatal. This is almost compatible with previous usage except for the
error message printed in any case.

Use a type-safe intrusive list for the archive cache.

Reviewed by:	Max Okumoto <okumoto@ucsd.edu> (without new error handling)
2005-03-31 11:35:56 +00:00
harti
bdea8226c7 Move the MAX macro to a util.h so it becomes usable in other modules.
Suggested by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-31 11:12:45 +00:00
harti
495f1f48a8 Make the structure for handling the input stack local to the parse
module. The only module accessing it (the current line number) was the
condition module, so pass the current line number as a function argument.
Centralize the pushing of new input sources into one function
ParsePushInput() and rename the function handling the popping from ParseEOF()
to ParsePopInput(). Make the entire thing a little bit clearer, by holding
the current input source in the top element of the stack instead of
using extra variables for this. Use a type-safe intrusive list for the
input stack.
2005-03-30 15:18:58 +00:00
harti
cf97e03db7 Fix a bug introduced in a previous commit: ParseModifier() consumes
characters so it is not safe to move around code from
before it to after it. This should fix problems with building the
documentation.

Patch:		7.170

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-30 15:14:22 +00:00
obrien
f37742ff89 Add directory hierarchy copying example. 2005-03-28 18:18:44 +00:00
obrien
7ba10bc7d4 Note when 'stat' appeared in FreeBSD. 2005-03-28 04:02:45 +00:00
alfred
12a374aa60 When doing the initial open of the proc via procfs, complain if we are
unable to open the /proc/pid/mem file.  Otherwise doing a truss on
a nonexistant pid makes us return success even though no such process
exists.
2005-03-27 12:53:25 +00:00