Commit Graph

9574 Commits

Author SHA1 Message Date
plunky 89eb056b33 remove the lower bound limitation on UUID, it is not necessary or mandated 2007-11-04 09:02:47 +00:00
christos fef32d862e From Anon Ymous: Make this compile without MIME_SUPPORT. 2007-10-30 16:08:11 +00:00
christos e988ecba95 bump date 2007-10-30 02:29:22 +00:00
christos 349d978117 From Anon Ymous:
- Add a "forward" command as requested by garbled@.
  From the manpage:

  forward
	  Takes a list of messages and prompts for an address (or
	  addresses) to forward each message to.  If no message list is
	  specified, the current message is used.  The mail editor is run
	  for each message allowing the user to enter a message that will
	  precede the forward message.  The message is sent as a multi-
	  part/mixed MIME encoded message.

- Add the ability to match messages that do (or do not) contain a
  header field.  E.g., the command "f ! /Subject:" will display the
  list of messages that are missing a "Subject" field.

- Teach savemail() to prefix fake headlines so the mbox doesn't get
  broken.

- Fixed a couple of "bugs" in the attachment editing routine.
2007-10-30 02:28:30 +00:00
christos 2283d346cb From Anon Ymous:
knf changes:
- s/sizeof x/sizeof(x)/.
- remove unnecessary malloc typecasts.
- whitespace nits.
2007-10-29 23:20:37 +00:00
ragge 1990d3d4ad x86 -> i386.
Fix include paths, now compiles.
2007-10-28 10:06:41 +00:00
christos b4403619e0 bump date. 2007-10-27 18:43:37 +00:00
christos 59604b5887 uncomment the group handling documentation. 2007-10-27 18:42:42 +00:00
abs 9e1ca15c9c Add somewhat inelegant logic to handle config.h for now - obviously not
crossbuildable
2007-10-27 18:14:45 +00:00
christos 3670ce19dd - move grutil code to newgrp.
- enable user:group and :group code.
2007-10-27 15:37:45 +00:00
christos 542b6466e3 Move the grutil code from su to here. Requested by ginsbach@ 2007-10-27 15:36:21 +00:00
christos 40a10c757f From Anon Ymous:
- Fix a memory leak in newgrp().  (Noted by ginsbach@.)

- If the new and old groups are the same, addgrp() does nothing so
  exit early.  (Noted by ginsbach@.)

- In newgrp(), if the new group isn't found in the in-core, check the
  group membership list anyway as the in-core list may be full or
  /etc/groups may have been edited since login.  (Requested by
  ginsbach@.)

- Deal with a full in-core group[] array in addgid() rather than
  silently ignoring it and ending up with a group[] array that is
  inconsistent with the current group.

- More explicit error handling in addgroup().
2007-10-27 15:33:25 +00:00
christos 4556f89a2d From Anon Ymous:
- Add a "bounce" command as requested by garbled@.
  From the manpage:

 bounce  Takes a list of messages and prompts for an address to bounce the
         messages to.  All the original header fields are preserved except
         for the ``Delivered-To'', ``X-Original-To'' and ``Status''
         fields.  The new ``To'' field contains the bounce address(es)
         plus any addresses in the old ``To'' field minus the user's local
         address and any on the alternates list.  (See the alternates com-
         mand.)
2007-10-27 15:14:50 +00:00
christos d727506fb5 From Anon Ymous:
- Introduce date_to_tm() and hl_date_to_tm() to parse the date and
  headline date a bit more efficiently.
- If 'tm_isdst' is determined, let strftime(3) handle the '%Z' and
  '%z' formats.  Otherwise, output "-0000" and "???", respectively, to
  help preserve with alignment; strftime(3) will output an empty
  string in these case.
- Change fail() to use the '-d' flag (which sets the 'debug' variable)
  rather than the "debug" _environment_ variable.  This is more
  consistent with other warnings.
- Don't use gcc C extensions, e.g., "case LOW ... HIGH:".
- Define is_WSP() in def.h to be an inline function that for checks
  whitespace (WSP = ' ' or '\t'), as defined in RFC 2822.  Use it
  consistently in place of isblank().
- For consistency, rename skip_blank() to skip_WSP().
- Add inline skip_space() to complement skip_blank() (now skip_WSP).
- Check all ctype(3) calls for argument range issues.
- Whitespace and comment cleanup/changes.
2007-10-23 14:58:43 +00:00
sjg 401ecd47f5 Allow .PATH<suffix> to be used for .include "". 2007-10-22 15:36:13 +00:00
christos 3e94d8f384 Handle 2 digit years, from Anon Ymous 2007-10-19 15:59:55 +00:00
christos 1b946384ef Make the license match to grutil.c 2007-10-18 15:41:50 +00:00
christos e16da7f1bc Put the proper license on this file, using the newgrp.c one. 2007-10-18 13:04:06 +00:00
christos 961c73981f From Anon Ymous:
- general whitespace, lint fixes, error checking
- document the exit status of the command per POSIX
- use the shared with su group adding utilities.
2007-10-17 21:07:49 +00:00
christos 40d5720e00 From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
  *disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
  not ask for a password.
- split out shared code into a separate file.
2007-10-17 21:05:39 +00:00
ad 9c3109d6c5 Add _SC_NPROCESSORS_ONLN and _SC_NPROCESSORS_CONF for sysconf(). These
are extensions but are provided by many Unix systems.
2007-10-15 14:12:54 +00:00
sjg 1d55b1afc4 If we don't have emalloc, we won't have strndup either.
Allows building current make on 2.0.
2007-10-15 01:07:34 +00:00
apb d15c1edea0 Make it easier for the build environment (such as a configure script)
to override the default shell:

* Rename _BASENAME_DEFSHELL to DEFSHELL_CUSTOM, because it's no longer
  always a basename, it might be a full path;
* Rename DEFSHELL to DEFSHELL_INDEX, because it's actually an index into
  an array;
* Provide symbolic names for the possible values if DEFSHELL_INDEX;
* Document how the build environment may set DEFSHELL_INDEX or
  DEFSHELL_CUSTOM to choose the default shell;
* Move the fallback definition of DEFSHELL_INDEX from config.h to job.c,
  because it's used only in job.c.

Discussed with sjg.
2007-10-14 20:22:53 +00:00
jnemeth ba708bffb8 typo 2007-10-14 11:30:37 +00:00
lukem 5a1df86c01 Convert to using raise_default_signal(3). 2007-10-14 11:21:32 +00:00
lukem bd560fde31 Convert to using raise_default_signal(3). 2007-10-14 04:54:34 +00:00
apb ec2d191f5e Revert to revision 1.128. Now that the Var* functions no longer try to
write into const strings, it's safe to pass a truly constant string to
Var_Subst.
2007-10-13 20:01:33 +00:00
apb 7da86686ca Don't write into const strings; not even if we intend to
reinstate the original contents later.
2007-10-13 19:59:52 +00:00
christos a59b81d6d8 strlen returns size_t 2007-10-13 18:28:35 +00:00
apb 67bb324312 * Convert all uses of strdup() to estrdup();
* Use estrndup() in a few cases where it simplifies the code;
* Provide compatibility definitions of strndup and estrndup;
2007-10-13 16:16:41 +00:00
apb 781e1efd0c Oops, missed a few more comments in previous. 2007-10-13 14:32:18 +00:00
apb a8bf2a2f8a Correct documentation for Var_Parse's freePtr arg. It's a pointer to
the thing to be freed (or NULL if nothing to free), not to a pointer to
boolean saying whether or not to free the result.
2007-10-13 13:54:06 +00:00
dsl 5dc59d0d4b When processing .include "../../foo.mk" lexically process the leading ../
against the directory name of the makefile being processed.
Shortens a lot of pathnames (especially in pkgsrc) and significantly
reduces the number of duplicate entries in .MAKE.MAKEFILES
2007-10-13 11:08:05 +00:00
dsl 5651920158 The 'job_prefix' string can be static but not const 'hi xtos'. 2007-10-13 08:58:48 +00:00
dsl fad077a68d If we are going to save the names of all opened makefiles, do so when files
are first processed, not for every line of every loop inside the file.
When (attempting) to check for duplicate names, use the spaces between names
as separators rather than using strstr() - which is slow and wont find
duplicates after an incorect early match.
However the duplicate check is rather broken (especially for pkgsrc) where
names like ../../devel/atk/../../devel/glib2/../../devel/gettext-lib/ \
../../devel/gettext-lib/../../mk/buildlink3/../../mk/bsd.prefs.mk
which need (some form of) realpath() processing.
'cd pkgsrc/xaa/gtk2; make show-var VARNAME=.MAKE.MAKEFILES' shows the problem.
2007-10-12 23:38:27 +00:00
christos 0f19d8c420 static a const string. 2007-10-12 23:13:16 +00:00
christos 31bed26f71 improve on previous 2007-10-12 23:07:04 +00:00
dsl bb4beef604 Var_Subst() seems to write into its input string! So we do need a copy. 2007-10-12 22:49:36 +00:00
dsl 215593ad6c Remove tmp[] buffer and strncpy() call. 2007-10-12 21:47:25 +00:00
sjg 1050c04a22 If _BASENAME_DEFSHELL is defined, it might be a full path,
in which case we should not prepend _PATH_DEFSHELLDIR.
2007-10-11 21:19:28 +00:00
ginsbach 18072a963c More code clean up (KNF): de-__P and ANSI'ify function declarations 2007-10-11 03:42:38 +00:00
ad 7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
ginsbach 09b20b9b68 - add const qualifiers where necessary
- remove unnecessary argument from error(); first argument was always NULL
[changes mostly from FreeBSD]
2007-10-10 02:34:18 +00:00
sjg 3a5409e4eb Fix an off-by-one error in handing mal-formed modifiers.
The issue seems to have been present for some time, only showed up
when running unit-tests on SunOS.
Make sure we get an error message, but otherwise behave as before.
2007-10-09 05:55:03 +00:00
sjg e73405e272 Use .MAKE.MAKEFILES to track all the makefiles that have been read
so they can be used in dependency rules.
2007-10-08 20:26:36 +00:00
christos 3833b1d829 call sysconf, before add paths. From Kurt Schreiner 2007-10-08 12:51:21 +00:00
christos 33631b9b4a call xfree instead of free so that we don't bring in libc's free. 2007-10-08 00:15:05 +00:00
ginsbach 8b26595b3a Changes for standards compliance:
- "If no $set directive is specified in a message text source file,
   all messages shall be located in an implementation-defined default
   message set NL_SETD."
- The n argument to $delset indicates the set number which should be
  in the range 1 to NL_SETMAX.

Standards: The Open Group Base Specifications Issue 6
           IEEE Std 1003.1, 2004 Edition
2007-10-06 02:55:56 +00:00
sjg f28827375c Add the ability to .export variables to the environment. 2007-10-05 15:27:45 +00:00
christos 76f3e041b7 don't zero out the wrong pointer. from Anon Ymous 2007-10-05 14:48:10 +00:00