]> diplodocus.org Git - nmh/log
nmh
12 years agoIf -[no]concat is given to show(1), have it use showmimeproc instead
David Levine [Fri, 11 Apr 2014 02:21:28 +0000 (21:21 -0500)]
If -[no]concat is given to show(1), have it use showmimeproc instead
of showproc and pass those switches along.  This way, show won't pass
them to mhl, which doesn't accept them.

12 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/nmh
Lyndon Nerenberg [Fri, 11 Apr 2014 01:49:18 +0000 (18:49 -0700)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/nmh

12 years agoAdd a note about devel/autotools as a pre-req for building on FreeBSD.
Lyndon Nerenberg [Fri, 11 Apr 2014 01:47:43 +0000 (18:47 -0700)]
Add a note about devel/autotools as a pre-req for building on FreeBSD.

Be a bit more specific about the versions of some OSes we build
in the buildbot cluster.

12 years agoUse a dynamically-allocated buffer for character set conversion, and
Ken Hornstein [Fri, 11 Apr 2014 01:45:14 +0000 (21:45 -0400)]
Use a dynamically-allocated buffer for character set conversion, and
resize it if we get E2BIG.  Also create a test that exercises this
particular problem.

12 years agoDon't clobber "cp"; use dp instead.
Ken Hornstein [Thu, 10 Apr 2014 22:58:39 +0000 (18:58 -0400)]
Don't clobber "cp"; use dp instead.

12 years agoFix bug in error message when reporting character set conversion failure.
Ken Hornstein [Thu, 10 Apr 2014 18:09:18 +0000 (14:09 -0400)]
Fix bug in error message when reporting character set conversion failure.

12 years agoA bad cut-and-paste job made -noinlineonly not work. Patch from
Ken Hornstein [Thu, 10 Apr 2014 16:29:28 +0000 (12:29 -0400)]
A bad cut-and-paste job made -noinlineonly not work.  Patch from
M. Levinson.

12 years agoFix test for inlineonly.
Ken Hornstein [Thu, 10 Apr 2014 16:28:01 +0000 (12:28 -0400)]
Fix test for inlineonly.

12 years agoAdded -dump to w3m and elinks invocations in mhn.defaults.
David Levine [Thu, 10 Apr 2014 12:52:41 +0000 (07:52 -0500)]
Added -dump to w3m and elinks invocations in mhn.defaults.

12 years agoWhen lkfopendata() fails, seqfile is being freed too soon.
Lyndon Nerenberg [Thu, 10 Apr 2014 11:10:34 +0000 (04:10 -0700)]
When lkfopendata() fails, seqfile is being freed too soon.

12 years agoI missed one spot in getln() where the new quoting flag needs to be cleared.
Lyndon Nerenberg [Thu, 10 Apr 2014 11:00:18 +0000 (04:00 -0700)]
I missed one spot in getln() where the new quoting flag needs to be cleared.

12 years agoIf getln() sees a newline as its first character, it incorrectly
Lyndon Nerenberg [Thu, 10 Apr 2014 10:52:17 +0000 (03:52 -0700)]
If getln() sees a newline as its first character, it incorrectly
references a character one byte before the start of its input
buffer.

12 years agoClang's static analyzer reports a potential NULL pointer deref.
Lyndon Nerenberg [Thu, 10 Apr 2014 10:07:16 +0000 (03:07 -0700)]
Clang's static analyzer reports a potential NULL pointer deref.
This is a "shouldn't happen" case, so I have added an assert
to quell the warning, and catch the failure in the off chance
we do get here with last == NULL.

12 years agoRemove dead initialization of fp in main().
Lyndon Nerenberg [Thu, 10 Apr 2014 09:43:36 +0000 (02:43 -0700)]
Remove dead initialization of fp in main().

12 years agoAdded -dump (and -child) to lynx invocation when it's used in
David Levine [Thu, 10 Apr 2014 03:04:58 +0000 (22:04 -0500)]
Added -dump (and -child) to lynx invocation when it's used in
mhshow-show-text/html.

12 years agoFormatting fix, from Mikhail <mp39590@gmail.com>.
Ken Hornstein [Thu, 10 Apr 2014 01:05:07 +0000 (21:05 -0400)]
Formatting fix, from Mikhail <mp39590@gmail.com>.

12 years agoMerge remote-tracking branch 'origin/fix-locking'
David Levine [Thu, 10 Apr 2014 00:19:26 +0000 (19:19 -0500)]
Merge remote-tracking branch 'origin/fix-locking'

12 years agoThe size reported by mhshow test-charset is different with and
David Levine [Wed, 9 Apr 2014 21:32:56 +0000 (16:32 -0500)]
The size reported by mhshow test-charset is different with and
without iconv, so determine it at runtime.

12 years agoUse *ct->c_ceclosefnx() instead of clsoe_encoding() in show_content_aux().
David Levine [Wed, 9 Apr 2014 21:31:06 +0000 (16:31 -0500)]
Use *ct->c_ceclosefnx() instead of clsoe_encoding() in show_content_aux().

12 years agoMerge branch 'mhshow-fixup'
Ken Hornstein [Wed, 9 Apr 2014 20:25:08 +0000 (16:25 -0400)]
Merge branch 'mhshow-fixup'

12 years agoDocument and distribute mhshow.marker
Ken Hornstein [Wed, 9 Apr 2014 20:24:34 +0000 (16:24 -0400)]
Document and distribute mhshow.marker

12 years agoDocument the changes made to mhshow.
Ken Hornstein [Wed, 9 Apr 2014 20:16:18 +0000 (16:16 -0400)]
Document the changes made to mhshow.

12 years agoChange from "concat" to "concatsw" so we don't conflict with the
Ken Hornstein [Wed, 9 Apr 2014 18:53:00 +0000 (14:53 -0400)]
Change from "concat" to "concatsw" so we don't conflict with the
function concat().

12 years agoAdd new flags for -concat/-noconcat, -inlineonly/-noinlineonly, and
Ken Hornstein [Wed, 9 Apr 2014 17:30:42 +0000 (13:30 -0400)]
Add new flags for -concat/-noconcat, -inlineonly/-noinlineonly, and
-textonly/-notextonly;

12 years agoChange things so we only supply a form filename; most programs don't do
Ken Hornstein [Wed, 9 Apr 2014 17:15:28 +0000 (13:15 -0400)]
Change things so we only supply a form filename; most programs don't do
both, and this isn't work the extra hassle.

12 years agoNow only display text and inline content by default.
Ken Hornstein [Wed, 9 Apr 2014 15:29:32 +0000 (11:29 -0400)]
Now only display text and inline content by default.
Use mh-format(5) to display marker text for skipped content.

12 years agolkopen_dot() would block forever if another process held a lock
David Levine [Wed, 9 Apr 2014 02:34:20 +0000 (21:34 -0500)]
lkopen_dot() would block forever if another process held a lock
forever.  Changed it to only retry for 60 seconds, like the other
lkopen's.  And have it indicate that it failed to acquire the lock.

12 years agoInstead of relying on errno to determine if locking failed, pass
David Levine [Sun, 6 Apr 2014 18:55:27 +0000 (13:55 -0500)]
Instead of relying on errno to determine if locking failed, pass
back explicit indication in int * argument to lk(f)opendata() and
lkopenspool().

12 years agoDon't ignore return value of lkfopendata(), most notably of
David Levine [Sun, 6 Apr 2014 16:12:14 +0000 (11:12 -0500)]
Don't ignore return value of lkfopendata(), most notably of
seq_read() in folder_read().  Increased LOCK_RETRIES from 5 to 60.

12 years agoUpdate context and sequences before showing messages in mhn(1),
David Levine [Sat, 5 Apr 2014 01:05:51 +0000 (20:05 -0500)]
Update context and sequences before showing messages in mhn(1),
just like in mhshow(1).

12 years agoMoving closer to fixing mhshow completely. Includes fix from David Levine
Ken Hornstein [Thu, 3 Apr 2014 22:12:56 +0000 (18:12 -0400)]
Moving closer to fixing mhshow completely.  Includes fix from David Levine
for a slight bug in charset conversion.

12 years agoStart of changes for mhshow; compiles, but does nothing (yet).
Ken Hornstein [Wed, 26 Mar 2014 02:41:13 +0000 (22:41 -0400)]
Start of changes for mhshow; compiles, but does nothing (yet).

12 years agomhn.defaults.sh really doesn't need to look in /usr/demo/SOUND
David Levine [Sun, 23 Mar 2014 13:43:56 +0000 (08:43 -0500)]
mhn.defaults.sh really doesn't need to look in /usr/demo/SOUND
for helper programs any more.  If the user has it in their PATH,
it will anyway.

12 years agoAdded mhshow-show-application/pdf detection to mhn.defaults.sh.
David Levine [Sun, 23 Mar 2014 13:30:37 +0000 (08:30 -0500)]
Added mhshow-show-application/pdf detection to mhn.defaults.sh.

12 years agoNote that order is preserved for messages that have the same date,
David Levine [Sun, 23 Mar 2014 13:00:12 +0000 (08:00 -0500)]
Note that order is preserved for messages that have the same date,
when sorting on dates.

12 years agoMove pidcheck() into mhshowsbr.c (the only consumer of it) and make
Ken Hornstein [Fri, 21 Mar 2014 22:53:26 +0000 (18:53 -0400)]
Move pidcheck() into mhshowsbr.c (the only consumer of it) and make
it static.

12 years agoRemove support for -pause/-nopause switches to mhshow(1). This and
Ken Hornstein [Fri, 21 Mar 2014 18:22:58 +0000 (14:22 -0400)]
Remove support for -pause/-nopause switches to mhshow(1).  This and
commit 4c436246f048635446353dadaa68174445c58160 are based on work
originally done by Markus Schnalke.

12 years agoRemove support for parallel content display. This means we can finally drive
Ken Hornstein [Fri, 21 Mar 2014 16:56:37 +0000 (12:56 -0400)]
Remove support for parallel content display.  This means we can finally drive
a stake in the heart of the horrible xpid global!

12 years agoFixed quoting of charset value in mhn.defaults.sh.
David Levine [Thu, 20 Mar 2014 14:40:01 +0000 (09:40 -0500)]
Fixed quoting of charset value in mhn.defaults.sh.

12 years agoRenamed mkstemp(1) man page to mh-mkstemp(1), so it doesn't obscure
David Levine [Sun, 16 Mar 2014 20:03:37 +0000 (15:03 -0500)]
Renamed mkstemp(1) man page to mh-mkstemp(1), so it doesn't obscure
any existing mkstemp(3) page.

12 years agoUpdate the manpage style guide to be consistent about setting program names in
Lyndon Nerenberg [Sun, 16 Mar 2014 19:19:54 +0000 (12:19 -0700)]
Update the manpage style guide to be consistent about setting program names in
boldface always.

12 years agoFixed formatting of program name in mh-mime(7) man page. Removed
David Levine [Sun, 16 Mar 2014 15:40:27 +0000 (10:40 -0500)]
Fixed formatting of program name in mh-mime(7) man page.  Removed
CONTEXT section from mkstemp(1) man page.

12 years agoMoved "mhparam iconv" description to mhparam(1) man page and put
David Levine [Sun, 16 Mar 2014 15:15:41 +0000 (10:15 -0500)]
Moved "mhparam iconv" description to mhparam(1) man page and put
references to it in mh-mime(7), mhfixmsg(1), and mhshow(1) man pages.
Updated mhparam man page description of other configuration
parameters.  Added "Message Rewrite" section to mh-mime page.

12 years agoFixed some of the issues noted by clang --analyze with
David Levine [Sat, 15 Mar 2014 01:25:06 +0000 (20:25 -0500)]
Fixed some of the issues noted by clang --analyze with
mhfixmsg.c and mkstemp.c.

12 years agoFixed fixup of sbr/dtimep.c with flex 2.5.36.
David Levine [Sat, 15 Mar 2014 01:22:07 +0000 (20:22 -0500)]
Fixed fixup of sbr/dtimep.c with flex 2.5.36.

12 years agoModified probe to output sbr/dtimep.c. The flex version is 2.5.36.
David Levine [Sat, 15 Mar 2014 00:56:38 +0000 (19:56 -0500)]
Modified probe to output sbr/dtimep.c.  The flex version is 2.5.36.

12 years agoAdded probe to configure.ac to output flex version (for fed18arm7 build).
David Levine [Sat, 15 Mar 2014 00:16:23 +0000 (19:16 -0500)]
Added probe to configure.ac to output flex version (for fed18arm7 build).

12 years agoCompare character with EOF using signed comparison because
David Levine [Sat, 15 Mar 2014 00:04:45 +0000 (19:04 -0500)]
Compare character with EOF using signed comparison because
EOF can be (and is likely) negative.  This showed up on
arm7, which apparently uses unsigned char for char.

12 years agoSigh. Make localmbox work even if we're not using -debug.
Ken Hornstein [Fri, 14 Mar 2014 19:22:12 +0000 (15:22 -0400)]
Sigh.  Make localmbox work even if we're not using -debug.

12 years agoWhoops, missed a warning groff found.
Ken Hornstein [Fri, 14 Mar 2014 19:21:49 +0000 (15:21 -0400)]
Whoops, missed a warning groff found.

12 years agoFix some typos and make some style changes suggested by Ralph Corderoy
Ken Hornstein [Fri, 14 Mar 2014 18:59:39 +0000 (14:59 -0400)]
Fix some typos and make some style changes suggested by Ralph Corderoy

12 years agoAdd support for printing iconv and localmbox.
Ken Hornstein [Fri, 14 Mar 2014 16:31:23 +0000 (12:31 -0400)]
Add support for printing iconv and localmbox.

12 years agoUpdate for mh-mime.
Ken Hornstein [Thu, 13 Mar 2014 19:53:05 +0000 (15:53 -0400)]
Update for mh-mime.

12 years agoCreate new mh-mime man page, with overview of how MIME handling works in nmh.
Ken Hornstein [Thu, 13 Mar 2014 19:51:32 +0000 (15:51 -0400)]
Create new mh-mime man page, with overview of how MIME handling works in nmh.

12 years agoUpdate and fix some formatting issues.
Ken Hornstein [Thu, 13 Mar 2014 19:11:22 +0000 (15:11 -0400)]
Update and fix some formatting issues.

12 years agoFixed test-mkstemp to work on platforms that don't have mkstemps(3),
David Levine [Tue, 11 Mar 2014 01:26:51 +0000 (20:26 -0500)]
Fixed test-mkstemp to work on platforms that don't have mkstemps(3),
such as CentOS 5.

12 years agoCheck for text/html display programs in this order: w3m, lynx, elinks.
David Levine [Tue, 11 Mar 2014 01:24:46 +0000 (20:24 -0500)]
Check for text/html display programs in this order:  w3m, lynx, elinks.

12 years agoFix minor typo.
Ken Hornstein [Fri, 7 Mar 2014 17:04:46 +0000 (12:04 -0500)]
Fix minor typo.

12 years agoImport Dave Crocker's brief history of email development at Rand.
Lyndon Nerenberg [Fri, 7 Mar 2014 17:05:17 +0000 (09:05 -0800)]
Import Dave Crocker's brief history of email development at Rand.
(Added with his permission.)

12 years agoFixed test/getcwidth.c to build without MULTIBYTE_SUPPORT.
David Levine [Fri, 7 Mar 2014 02:32:14 +0000 (20:32 -0600)]
Fixed test/getcwidth.c to build without MULTIBYTE_SUPPORT.
Found by cppcheck.

12 years agoFixed a few very minor issues that cppcheck noticed.
David Levine [Fri, 7 Mar 2014 02:15:45 +0000 (20:15 -0600)]
Fixed a few very minor issues that cppcheck noticed.

12 years agoRemoved declaration of unused sm_reply from post.c.
David Levine [Fri, 7 Mar 2014 01:46:30 +0000 (19:46 -0600)]
Removed declaration of unused sm_reply from post.c.

12 years agoMade a couple of globals static in smtp.c.
David Levine [Fri, 7 Mar 2014 01:45:37 +0000 (19:45 -0600)]
Made a couple of globals static in smtp.c.

12 years agoChanged unused symbol that gen-ctype-checked creates with NDEBUG
David Levine [Fri, 7 Mar 2014 01:43:47 +0000 (19:43 -0600)]
Changed unused symbol that gen-ctype-checked creates with NDEBUG
from a data object to a function, to remove a global from libmh.a.

12 years agoAdded remedy for compile warnings when built with --with-tls on
David Levine [Fri, 7 Mar 2014 01:39:10 +0000 (19:39 -0600)]
Added remedy for compile warnings when built with --with-tls on
Mac OS 10.7 or later.

12 years agoRemove backup file at end of test-ext-params, and a temp file.
David Levine [Fri, 7 Mar 2014 01:35:22 +0000 (19:35 -0600)]
Remove backup file at end of test-ext-params, and a temp file.

12 years agoPut in check so "attach" is rejected when the draft already has MIME headers.
Ken Hornstein [Thu, 6 Mar 2014 20:45:19 +0000 (15:45 -0500)]
Put in check so "attach" is rejected when the draft already has MIME headers.

12 years agoUpdate test to match reality
Ken Hornstein [Thu, 6 Mar 2014 20:31:01 +0000 (15:31 -0500)]
Update test to match reality

12 years agoUpdate documentation to match reality.
Ken Hornstein [Thu, 6 Mar 2014 20:25:55 +0000 (15:25 -0500)]
Update documentation to match reality.

12 years agoPrevent crash if editfile() is called and both "*ed" and editsave
Ken Hornstein [Thu, 6 Mar 2014 19:59:35 +0000 (14:59 -0500)]
Prevent crash if editfile() is called and both "*ed" and editsave
are NULL.  This can happen if you call "mime" and then run "edit" without
any arguments, if you're running whatnow standalone.

12 years agoRemove unneeded assignment.
Ken Hornstein [Thu, 6 Mar 2014 19:34:34 +0000 (14:34 -0500)]
Remove unneeded assignment.

12 years agoFix up some warnings and problems when iconv doesn't exist.
Ken Hornstein [Thu, 6 Mar 2014 04:31:31 +0000 (23:31 -0500)]
Fix up some warnings and problems when iconv doesn't exist.

12 years agoMerge branch 'extended-params'
Ken Hornstein [Thu, 6 Mar 2014 04:17:17 +0000 (23:17 -0500)]
Merge branch 'extended-params'

12 years agoUpdate pending-release-notes.
Ken Hornstein [Thu, 6 Mar 2014 02:27:25 +0000 (21:27 -0500)]
Update pending-release-notes.

12 years agoMore tests for extended-parameter parsing.
Ken Hornstein [Thu, 6 Mar 2014 02:26:02 +0000 (21:26 -0500)]
More tests for extended-parameter parsing.

12 years agoAdd extra argument to add_param() so it can use the passed-in pointers
Ken Hornstein [Wed, 5 Mar 2014 23:22:56 +0000 (18:22 -0500)]
Add extra argument to add_param() so it can use the passed-in pointers
directly without making copies first.

12 years agoA more complicated RFC 2231 parsing example.
Ken Hornstein [Wed, 5 Mar 2014 20:43:33 +0000 (15:43 -0500)]
A more complicated RFC 2231 parsing example.

12 years agoWhoops, a little TOO hasty on the last bugfix; put back an assignment.
Ken Hornstein [Wed, 5 Mar 2014 20:42:59 +0000 (15:42 -0500)]
Whoops, a little TOO hasty on the last bugfix; put back an assignment.

12 years agoSwitch over to using the token parser instead of isspace(), and
Ken Hornstein [Wed, 5 Mar 2014 20:11:54 +0000 (15:11 -0500)]
Switch over to using the token parser instead of isspace(), and
make sure we have our pointer correct when doing an encoded parameter
that isn't the first one.

12 years agoMove language tag parser into the block so it only gets
Ken Hornstein [Wed, 5 Mar 2014 19:36:43 +0000 (14:36 -0500)]
Move language tag parser into the block so it only gets
invoked on index 0.

12 years agoChange disposition output slightly.
Ken Hornstein [Wed, 5 Mar 2014 19:04:47 +0000 (14:04 -0500)]
Change disposition output slightly.

12 years agoUpdate information to mention RFC 2231.
Ken Hornstein [Wed, 5 Mar 2014 18:48:45 +0000 (13:48 -0500)]
Update information to mention RFC 2231.

12 years agoAdd message/external-body test.
Ken Hornstein [Wed, 5 Mar 2014 18:40:13 +0000 (13:40 -0500)]
Add message/external-body test.

12 years agoUpdate mhlist and other relevant utilities to output disposition information
Ken Hornstein [Wed, 5 Mar 2014 18:03:30 +0000 (13:03 -0500)]
Update mhlist and other relevant utilities to output disposition information
with a new -disposition switch.

12 years agoSome tests for RFC 2231 decoding; seems like it works, but need to stress
Ken Hornstein [Wed, 5 Mar 2014 04:44:09 +0000 (23:44 -0500)]
Some tests for RFC 2231 decoding; seems like it works, but need to stress
it some more.

12 years agoFix up some error reporting, and reassemble partial parameters correctly.
Ken Hornstein [Wed, 5 Mar 2014 04:43:26 +0000 (23:43 -0500)]
Fix up some error reporting, and reassemble partial parameters correctly.

12 years agoFix up a few pointer mishaps; this should now get everything right!
Ken Hornstein [Wed, 5 Mar 2014 03:49:13 +0000 (22:49 -0500)]
Fix up a few pointer mishaps; this should now get everything right!

12 years agoWhoops, forgot to set the name element of the partial parameter structure.
Ken Hornstein [Wed, 5 Mar 2014 03:37:10 +0000 (22:37 -0500)]
Whoops, forgot to set the name element of the partial parameter structure.

12 years agoA few minor fixups; the parser now passes the test suite!
Ken Hornstein [Wed, 5 Mar 2014 00:53:23 +0000 (19:53 -0500)]
A few minor fixups; the parser now passes the test suite!

12 years agoFixes for the MIME parser; kinda works for regular parameters, but
Ken Hornstein [Tue, 4 Mar 2014 18:45:19 +0000 (13:45 -0500)]
Fixes for the MIME parser; kinda works for regular parameters, but
still needs some fixes.

12 years agoMore work on extended parameter parser. Does not compile yet.
Ken Hornstein [Tue, 4 Mar 2014 02:52:35 +0000 (21:52 -0500)]
More work on extended parameter parser.  Does not compile yet.

12 years agoIn test/common.sh.in trap, cd to $MH_TEST_DIR before trying
David Levine [Mon, 3 Mar 2014 15:14:09 +0000 (07:14 -0800)]
In test/common.sh.in trap, cd to $MH_TEST_DIR before trying
to remove its Mail subdirectory.  rm on Solaris won't remove
it if it's in the path of the current working directory.

12 years agoMake parse_header_attrs() a private function (there are no longer any
Ken Hornstein [Mon, 3 Mar 2014 05:43:46 +0000 (00:43 -0500)]
Make parse_header_attrs() a private function (there are no longer any
public consumers of it).

12 years agoConvert unqp() to decode_qp(), and make it a public function. Also,
Ken Hornstein [Mon, 3 Mar 2014 05:42:56 +0000 (00:42 -0500)]
Convert unqp() to decode_qp(), and make it a public function.  Also,
handle the case where decode_qp() is passed a character outside of
the normal ASCII range.

12 years agoAdded mkstemp(1), wrapper around mkstemp(3)/mkstemps(3), to
David Levine [Mon, 3 Mar 2014 04:38:57 +0000 (22:38 -0600)]
Added mkstemp(1), wrapper around mkstemp(3)/mkstemps(3), to
auxexec, for use by mhmail.

12 years agoAdded convenience function die() to mhmail.
David Levine [Mon, 3 Mar 2014 02:29:20 +0000 (20:29 -0600)]
Added convenience function die() to mhmail.

12 years agoSwitch over get_ctinfo() to determine the filename based on the filename if
Ken Hornstein [Mon, 3 Mar 2014 02:04:55 +0000 (21:04 -0500)]
Switch over get_ctinfo() to determine the filename based on the filename if
one was not provided.  Remove some unneeded functions as part of this work.

12 years agoAdded recommendation to use nmh-storage profile setting or
David Levine [Sun, 2 Mar 2014 18:00:13 +0000 (12:00 -0600)]
Added recommendation to use nmh-storage profile setting or
non-default -clobber with mhstore -always.

12 years agoAdded check of -noverbose to test-mhstore.
David Levine [Sun, 2 Mar 2014 16:09:18 +0000 (10:09 -0600)]
Added check of -noverbose to test-mhstore.

12 years agoAdded commented explaining use of ci_attrs[0] in
David Levine [Sun, 2 Mar 2014 15:30:01 +0000 (09:30 -0600)]
Added commented explaining use of ci_attrs[0] in
build_multipart_alt() of mhfixmsg.