sxemacs
12 years agochore, remove TEXI2DVI redefinitions
Sebastian Freundt [Wed, 14 Mar 2012 12:49:34 +0000 (12:49 +0000)]
chore, remove TEXI2DVI redefinitions

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agochore, mention build chain .el files in lisp's Makefile.am
Sebastian Freundt [Wed, 14 Mar 2012 12:47:09 +0000 (12:47 +0000)]
chore, mention build chain .el files in lisp's Makefile.am

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agochore, mention headers needed for the ase-set emod
Sebastian Freundt [Wed, 14 Mar 2012 09:34:00 +0000 (09:34 +0000)]
chore, mention headers needed for the ase-set emod

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agochore, move systty.h to src/ui/TTY/
Sebastian Freundt [Wed, 14 Mar 2012 08:41:39 +0000 (08:41 +0000)]
chore, move systty.h to src/ui/TTY/

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agochore, put sxe-utils.h into distribution
Sebastian Freundt [Wed, 14 Mar 2012 08:31:03 +0000 (08:31 +0000)]
chore, put sxe-utils.h into distribution

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agochore, remove VPATH fiddling from sxe-srctree.m4
Sebastian Freundt [Tue, 13 Mar 2012 17:21:02 +0000 (17:21 +0000)]
chore, remove VPATH fiddling from sxe-srctree.m4

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agochore, don't mention non-existing files in Makefile.am's
Sebastian Freundt [Tue, 13 Mar 2012 13:18:41 +0000 (13:18 +0000)]
chore, don't mention non-existing files in Makefile.am's

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agochore, name ase-resclass-test.el correctly
Sebastian Freundt [Tue, 13 Mar 2012 13:09:18 +0000 (13:09 +0000)]
chore, name ase-resclass-test.el correctly

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agochore, don't mention non-existing files in Makefile.am's
Sebastian Freundt [Tue, 13 Mar 2012 13:08:47 +0000 (13:08 +0000)]
chore, don't mention non-existing files in Makefile.am's

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agoFix return on non-void function from Rudi
Steve Youngs [Thu, 15 Mar 2012 00:57:36 +0000 (10:57 +1000)]
Fix return on non-void function from Rudi

* merges:
  fix, return with no value, in function returning non-void

12 years agofix, return with no value, in function returning non-void
Ruediger Meier [Wed, 14 Mar 2012 16:55:55 +0000 (17:55 +0100)]
fix, return with no value, in function returning non-void

followup 4da01e95

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
12 years agoCoverity fixes from Nelson
Steve Youngs [Wed, 14 Mar 2012 02:10:25 +0000 (12:10 +1000)]
Coverity fixes from Nelson

* merges:
  Refactor
  Fix build
  Refactor
  Refactoring
  reflow
  Coverity CID 400832 Out of bounds access
  Small optimization

12 years agoMerge branch 'njsf-cov' into for-steve
Nelson Ferreira [Wed, 14 Mar 2012 00:11:04 +0000 (20:11 -0400)]
Merge branch 'njsf-cov' into for-steve

12 years agoRefactor
Nelson Ferreira [Wed, 14 Mar 2012 00:10:38 +0000 (20:10 -0400)]
Refactor

* src/mule/file-coding.c (autodetect_real_coding_system): New
function to reduce indentention of scope. Also as soon as stream
read fails, it returns, thus solving one of the coverity issues.
Several scope reduction refactorings.

* src/mule/file-coding.c (determine_real_coding_system): Call the
new function.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoFix build
Nelson Ferreira [Mon, 12 Mar 2012 02:08:20 +0000 (22:08 -0400)]
Fix build

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoRefactor
Nelson Ferreira [Mon, 12 Mar 2012 01:11:12 +0000 (21:11 -0400)]
Refactor

* src/mule/file-coding.c (determine_real_coding_system): Refactor
condition in inner for loop so that negative branch of the
condition will continue loop, and fall through is the old positive
condition branch.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoRefactoring
Nelson Ferreira [Mon, 12 Mar 2012 01:01:50 +0000 (21:01 -0400)]
Refactoring

* src/mule/file-coding.c (determine_real_coding_system): Static
local variable for the mime name chars and some added explicit
scope braces.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoreflow
Nelson Ferreira [Mon, 12 Mar 2012 00:57:30 +0000 (20:57 -0400)]
reflow

* src/mule/file-coding.c (determine_real_coding_system): Reflow to make it easier to read and refactor.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity CID 400832 Out of bounds access
Nelson Ferreira [Sun, 11 Mar 2012 23:45:52 +0000 (19:45 -0400)]
Coverity CID 400832 Out of bounds access

* src/editfns.c (Ftemp_directory): Use proper size argument with xstrncat

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoSmall optimization
Nelson Ferreira [Sun, 11 Mar 2012 23:42:58 +0000 (19:42 -0400)]
Small optimization

* src/emodules-ng.c (__emodng_open_append_exts): New remain variable to keep
invariant computation...
* src/emodules-ng.c (__emodng_open_prepend_paths_append_exts): Ditto.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoClose Bug #135, fix test suite. From Sebastian
Steve Youngs [Fri, 9 Mar 2012 23:43:14 +0000 (09:43 +1000)]
Close Bug #135, fix test suite. From Sebastian

* merges:
  Summary: fix, initialise cat morphism array properly, harden the tests Keywords: fix bug 135
  fix, change order of bitset in lrecord struct, hash_cache last
  cosmetics, turn morphism extern_inlines into static inlines
  test, run test suite with MALLOC_PERTURB_ set to be extra-harsh to the code
  test, introduce regression test for one MALLOC_PERTURB_ triggered crash
  Summary: fix, make sure ase-heap emits all symbols it needs Keywords: bld/chn

12 years agoDon't put the dumpfile in bin dir from Rudi
Steve Youngs [Fri, 9 Mar 2012 23:26:07 +0000 (09:26 +1000)]
Don't put the dumpfile in bin dir from Rudi

* merges:
  bldchn fix, don't install buildir's dumpfile
  bldchn, install dumpfile into archlibdir
  try to read dumpfile also from libarchdir
  why the hell we don't have always EXEC_PATH available
  bldchn cleanup, remove/re-use some unused dumpfile related AM variables

12 years agoMerge branch 'bug/135' into next
Sebastian Freundt [Fri, 9 Mar 2012 17:16:28 +0000 (17:16 +0000)]
Merge branch 'bug/135' into next

* bug/135:
  Summary: fix, initialise cat morphism array properly, harden the tests Keywords: fix bug 135
  fix, change order of bitset in lrecord struct, hash_cache last
  cosmetics, turn morphism extern_inlines into static inlines
  test, run test suite with MALLOC_PERTURB_ set to be extra-harsh to the code
  test, introduce regression test for one MALLOC_PERTURB_ triggered crash

12 years agoSummary: fix, initialise cat morphism array properly, harden the tests
Sebastian Freundt [Fri, 9 Mar 2012 17:15:02 +0000 (17:15 +0000)]
Summary: fix, initialise cat morphism array properly, harden the tests
Keywords: fix bug 135

This changeset fixes an issue of using uninitialised memory (bug 135).

* src/lrecord.h (set_lheader_implementation): properly initialise lheaders

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agofix, change order of bitset in lrecord struct, hash_cache last
Sebastian Freundt [Fri, 9 Mar 2012 17:14:45 +0000 (17:14 +0000)]
fix, change order of bitset in lrecord struct, hash_cache last

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agocosmetics, turn morphism extern_inlines into static inlines
Sebastian Freundt [Fri, 9 Mar 2012 17:13:46 +0000 (17:13 +0000)]
cosmetics, turn morphism extern_inlines into static inlines

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agotest, run test suite with MALLOC_PERTURB_ set to be extra-harsh to the code
Sebastian Freundt [Fri, 9 Mar 2012 15:00:43 +0000 (15:00 +0000)]
test, run test suite with MALLOC_PERTURB_ set to be extra-harsh to the code

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agotest, introduce regression test for one MALLOC_PERTURB_ triggered crash
Sebastian Freundt [Fri, 9 Mar 2012 14:57:53 +0000 (14:57 +0000)]
test, introduce regression test for one MALLOC_PERTURB_ triggered crash

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agoMerge branch 'bld/x32' into next
Sebastian Freundt [Fri, 9 Mar 2012 12:31:01 +0000 (12:31 +0000)]
Merge branch 'bld/x32' into next

* bld/x32:
  Summary: fix, make sure ase-heap emits all symbols it needs Keywords: bld/chn

12 years agoSummary: fix, make sure ase-heap emits all symbols it needs
Sebastian Freundt [Fri, 9 Mar 2012 12:30:04 +0000 (12:30 +0000)]
Summary: fix, make sure ase-heap emits all symbols it needs
Keywords: bld/chn

This changeset fixes an issue with the ase-heap emodule.  Ctors and
wrappers are now declared and defined in the file that they're used.

* modules/ase/ase-heap.h: kick static inlines, no need to expose them

* modules/ase/ase-heap.c: soak up static inlines decls from the header

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
12 years agobldchn fix, don't install buildir's dumpfile
Ruediger Meier [Thu, 8 Mar 2012 14:32:00 +0000 (15:32 +0100)]
bldchn fix, don't install buildir's dumpfile

This problem became visible since we create the symlink within
archlibdir instead of bindir.
Also we delete $(bindir)/sxemacs.dmp from older installations
because unfortunately sxemacs would still try this first.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
12 years agobldchn, install dumpfile into archlibdir
Ruediger Meier [Thu, 8 Mar 2012 14:16:55 +0000 (15:16 +0100)]
bldchn, install dumpfile into archlibdir

Also we only install the one which is named with dump_id.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
12 years agotry to read dumpfile also from libarchdir
Ruediger Meier [Thu, 8 Mar 2012 14:01:43 +0000 (15:01 +0100)]
try to read dumpfile also from libarchdir

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
12 years agowhy the hell we don't have always EXEC_PATH available
Ruediger Meier [Thu, 8 Mar 2012 13:45:51 +0000 (14:45 +0100)]
why the hell we don't have always EXEC_PATH available

Does this break anything?

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
12 years agobldchn cleanup, remove/re-use some unused dumpfile related AM variables
Ruediger Meier [Wed, 7 Mar 2012 16:52:43 +0000 (17:52 +0100)]
bldchn cleanup, remove/re-use some unused dumpfile related AM variables

This does not change anything.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
12 years agoCoverity and build fixes from Nelson
Steve Youngs [Wed, 7 Mar 2012 22:24:54 +0000 (08:24 +1000)]
Coverity and build fixes from Nelson

* merges:
  Coverity: CID 400010: Improper use of negative value
  Coverity: CID 400001: Logically dead code
  Coverity: CID 400005: Division or modulo by zero
  Coverity: CID 400007: Deference after null check
  Coverity: CID 400831: Out of bonds access
  Coverity: CID 400832: Out of bounds access
  Fix build
  Fix the relocate_fd
  Coverity CID 400833 UNINIT

12 years agoCoverity: CID 400010: Improper use of negative value
Nelson Ferreira [Wed, 7 Mar 2012 15:21:00 +0000 (10:21 -0500)]
Coverity: CID 400010: Improper use of negative value

* src/ui/minibuf.c (echo_area_append): Make sure length<0 also
returns early here.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoMerge branch 'for-steve' into njsf-cov
Nelson Ferreira [Wed, 7 Mar 2012 14:58:51 +0000 (09:58 -0500)]
Merge branch 'for-steve' into njsf-cov

12 years agoCoverity: CID 400001: Logically dead code
Nelson Ferreira [Wed, 7 Mar 2012 14:41:24 +0000 (09:41 -0500)]
Coverity: CID 400001: Logically dead code

* lib-src/etags.c (get_language_from_filename): Rework code a
little so that Coverity does not get fooled by ternary operator.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400005: Division or modulo by zero
Nelson Ferreira [Wed, 7 Mar 2012 14:37:39 +0000 (09:37 -0500)]
Coverity: CID 400005: Division or modulo by zero

* src/media/sound-oss.c (sound_oss_play): Fix gross condition
error of previous change

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400007: Deference after null check
Nelson Ferreira [Wed, 7 Mar 2012 14:36:29 +0000 (09:36 -0500)]
Coverity: CID 400007: Deference after null check

* src/eval.c (Finteractive_p): Make sure btp is not NULL before
dereference.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400831: Out of bonds access
Nelson Ferreira [Wed, 7 Mar 2012 14:32:01 +0000 (09:32 -0500)]
Coverity: CID 400831: Out of bonds access

* src/fileio.c: Provide proper length to xstrncat

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400832: Out of bounds access
Nelson Ferreira [Wed, 7 Mar 2012 14:30:31 +0000 (09:30 -0500)]
Coverity: CID 400832: Out of bounds access

* src/editfns.c (Ftemp_directory): Proper size passed to xstrncat

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoFix build
Nelson Ferreira [Wed, 7 Mar 2012 14:13:54 +0000 (09:13 -0500)]
Fix build

* src/callproc.c (relocate_fd): fix the argument rename usage

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoMerge branch 'master' into for-steve
Nelson Ferreira [Wed, 7 Mar 2012 13:29:21 +0000 (08:29 -0500)]
Merge branch 'master' into for-steve

12 years agoFix the relocate_fd
Nelson Ferreira [Wed, 7 Mar 2012 13:25:49 +0000 (08:25 -0500)]
Fix the relocate_fd

* src/callproc.c (max_filedesc): New function to determine the
actual maximum file descriptor.

* src/callproc.c (relocate_fd): Realized previous use of just dup
was actually better, made sure that the closing of temporary duped
file descriptors was commented.

* src/emacs.c (__sys_stk_sz): Minor cosmetic variable rename.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity CID 400833 UNINIT
Nelson Ferreira [Wed, 7 Mar 2012 12:49:20 +0000 (07:49 -0500)]
Coverity CID 400833 UNINIT

* src/sysdep.c (raw_open): Use the proper argument for open

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agotest suite fixes from Nelson
Steve Youngs [Wed, 7 Mar 2012 03:03:07 +0000 (13:03 +1000)]
test suite fixes from Nelson

* merges:
  Why are quick fixes so bad ? Because they break more than they fix

12 years agoWhy are quick fixes so bad ? Because they break more than they fix
Nelson Ferreira [Wed, 7 Mar 2012 02:47:39 +0000 (21:47 -0500)]
Why are quick fixes so bad ? Because they break more than they fix

* src/emodules-ng.c (__emodng_open_prepend_paths): Fix xstpncpy
arguments. For real this time.

* src/emodules-ng.c (__emodng_open_prepend_paths_append_exts): Ditto.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agotest suite fixes from Nelson
Steve Youngs [Wed, 7 Mar 2012 02:45:29 +0000 (12:45 +1000)]
test suite fixes from Nelson

* merges:
  Improve relocate_fd with dup2
  Fix build

12 years agoMerge branch 'njsf-cov' into for-steve
Nelson Ferreira [Wed, 7 Mar 2012 01:58:18 +0000 (20:58 -0500)]
Merge branch 'njsf-cov' into for-steve

12 years agoImprove relocate_fd with dup2
Nelson Ferreira [Wed, 7 Mar 2012 01:53:56 +0000 (20:53 -0500)]
Improve relocate_fd with dup2

* src/callproc.c (relocate_fd): Satisfy checkers for return values
until proper check of getrlimit is implemented

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoFix build
Nelson Ferreira [Wed, 7 Mar 2012 01:50:52 +0000 (20:50 -0500)]
Fix build

* src/emodules-ng.c (__emodng_open_prepend_paths): Correct usage of xstpcpy size argument.
* src/emodules-ng.c (_adapt_load_path): Ditto.
* src/emodules-ng.c (__emodng_open_prepend_paths_append_exts): Fix indentation

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoFix autoload breakage from prev changeset from Nelson
Steve Youngs [Tue, 6 Mar 2012 22:20:11 +0000 (08:20 +1000)]
Fix autoload breakage from prev changeset from Nelson

* merges:
  Fix introduced bug by coverity fix attempt

12 years agoFix introduced bug by coverity fix attempt
Nelson Ferreira [Tue, 6 Mar 2012 13:25:08 +0000 (08:25 -0500)]
Fix introduced bug by coverity fix attempt

* src/search.c (boyer_moore): User REGEXP_FASTMAP_MASK for the
bit-and instead of the REGEXP_FASTMAP_SIZE (which is clearly
wrong).

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agobuild fix from Nelson
Steve Youngs [Tue, 6 Mar 2012 07:39:44 +0000 (17:39 +1000)]
build fix from Nelson

* merges:
  Make sure list-load-path-shadows can work after dmp

12 years agoCoverity and build chain fixes from Nelson
Steve Youngs [Tue, 6 Mar 2012 07:32:06 +0000 (17:32 +1000)]
Coverity and build chain fixes from Nelson

* merges:
  Coverity: Resource leak: CID 400015
  Fix configure.ac
  Fix configure
  xstrncpy saga
  xstrncpy saga
  xstrncpy saga
  Fix tty build broken in last configure.ac changes
  Do not add tty objects when no tty is available
  Coverity: CID 400005: Division or modulo by zero
  Coverity: CID 400006: Division or modulo by zero
  Coverity: Out of bounds write: CID 21140
  Coverity: CID 400012 Overrun dynamic
  Fix build for branches without tags
  Coverity CID 400013 Printf arg type mismatch
  Coverity: CID 400031: Tainted string
  Coverity: CID 400829: Uninit
  Use dup2 if available for -t. Also check for ttyname and isatty in configure.
  Coverity: CID 400828 Resource leak
  Use AS_IF instead of if some places - be more M4sh friendly
  Update copyright, remove unused ent arguments

12 years agoMake sure list-load-path-shadows can work after dmp
Nelson Ferreira [Tue, 6 Mar 2012 07:18:10 +0000 (02:18 -0500)]
Make sure list-load-path-shadows can work after dmp

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoMerge branch 'master' of ssh://dio.dreamhost.com/~/repos.nelsonferreira.com/git/sxema...
Nelson Ferreira [Tue, 6 Mar 2012 07:13:23 +0000 (02:13 -0500)]
Merge branch 'master' of ssh://dio.dreamhost.com/~/repos.nelsonferreira.com/git/sxemacs into for-steve

12 years agoCoverity: Resource leak: CID 400015
Nelson Ferreira [Tue, 6 Mar 2012 07:10:19 +0000 (02:10 -0500)]
Coverity: Resource leak: CID 400015

* src/callproc.c (relocate_fd): Make sure that dup'ed file
descriptors < min are closed. In addition, make a better version
when dup2 is available.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoMerge remote-tracking branch 'njsf/for-steve' into for-steve
Nelson Ferreira [Tue, 6 Mar 2012 06:29:23 +0000 (01:29 -0500)]
Merge remote-tracking branch 'njsf/for-steve' into for-steve

12 years agoFix configure.ac
Nelson Ferreira [Tue, 6 Mar 2012 06:27:19 +0000 (01:27 -0500)]
Fix configure.ac

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoFix configure
Nelson Ferreira [Tue, 6 Mar 2012 06:02:32 +0000 (01:02 -0500)]
Fix configure

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoxstrncpy saga
Nelson Ferreira [Tue, 6 Mar 2012 05:58:48 +0000 (00:58 -0500)]
xstrncpy saga

* src/emodules-ng.c (__emodng_open_append_exts): Use xstrncpy instead of strncpy
* src/emodules-ng.c (__emodng_open_prepend_paths): Ditto.
* src/emodules-ng.c (__emodng_open_prepend_paths_append_exts): Ditto.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoxstrncpy saga
Nelson Ferreira [Tue, 6 Mar 2012 05:52:11 +0000 (00:52 -0500)]
xstrncpy saga

* src/editfns.c (Ftemp_directory): Use xstrncpy instead of strncpy
and xstrncat instead of strcat

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoxstrncpy saga
Nelson Ferreira [Tue, 6 Mar 2012 05:50:05 +0000 (00:50 -0500)]
xstrncpy saga

* src/database/postgresql.c (Fpq_connectdb): Use xstrncpy instead of strncpy
* src/database/postgresql.c (Fpq_connect_start): Ditto.
* src/database/postgresql.c (Fpq_exec): Ditto.
* src/database/postgresql.c (Fpq_get_result): Ditto.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoFix tty build broken in last configure.ac changes
Nelson Ferreira [Tue, 6 Mar 2012 05:33:16 +0000 (00:33 -0500)]
Fix tty build broken in last configure.ac changes

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoMerge branch 'for-steve' into njsf-tty
Nelson Ferreira [Tue, 6 Mar 2012 03:08:38 +0000 (22:08 -0500)]
Merge branch 'for-steve' into njsf-tty

12 years agoDo not add tty objects when no tty is available
Nelson Ferreira [Tue, 6 Mar 2012 02:50:30 +0000 (21:50 -0500)]
Do not add tty objects when no tty is available

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400005: Division or modulo by zero
Nelson Ferreira [Tue, 6 Mar 2012 01:57:31 +0000 (20:57 -0500)]
Coverity: CID 400005: Division or modulo by zero

* src/media/sound-oss.c (sound_oss_play): Abort early when channels is 0.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400006: Division or modulo by zero
Nelson Ferreira [Tue, 6 Mar 2012 00:53:42 +0000 (19:53 -0500)]
Coverity: CID 400006: Division or modulo by zero

* src/ui/window.c (Fwindow_displayed_text_pixel_height): Make sure
no division by 0 is attempted and use "best heuristic" of just
adding 3.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: Out of bounds write: CID 21140
Nelson Ferreira [Mon, 5 Mar 2012 23:04:10 +0000 (18:04 -0500)]
Coverity: Out of bounds write: CID 21140

* src/search.c (boyer_moore): Make it explicit that the value will
always be within the range of the index. Previously it was a side
effect of the downcast to unsigned char, now its explicit.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400012 Overrun dynamic
Nelson Ferreira [Mon, 5 Mar 2012 22:45:25 +0000 (17:45 -0500)]
Coverity: CID 400012 Overrun dynamic

* lib-src/gnuclient.c (clean_string): Avoid coverity aliasing
shortcomings by reusing the same variable where the length is
calculate for the copy pass.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoFix build for branches without tags
Nelson Ferreira [Mon, 5 Mar 2012 22:43:17 +0000 (17:43 -0500)]
Fix build for branches without tags

* autogen.sh (emacs_is_beta): Correct the text for branches
without the release tags...

* lib-src/make-dump-id.c: Include the config.h from the proper
directory. This was not an issue for a long time, since there was
always a tag when under git control. make-dump-id was only
compiled then. Now in autogen.sh we will always make sure there is
a tree version, so this will no longer be an issue again.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoMerge remote-tracking branch 'njsf/for-steve' into for-steve
Nelson Ferreira [Mon, 5 Mar 2012 19:38:46 +0000 (14:38 -0500)]
Merge remote-tracking branch 'njsf/for-steve' into for-steve

12 years agoMerge remote-tracking branch 'origin/master' into for-steve
Nelson Ferreira [Mon, 5 Mar 2012 19:35:38 +0000 (14:35 -0500)]
Merge remote-tracking branch 'origin/master' into for-steve

12 years agoMerge branch 'master' of ssh://dio.dreamhost.com/~/repos.nelsonferreira.com/git/sxema...
Nelson Ferreira [Mon, 5 Mar 2012 19:34:32 +0000 (14:34 -0500)]
Merge branch 'master' of ssh://dio.dreamhost.com/~/repos.nelsonferreira.com/git/sxemacs into for-steve

12 years agoMerge branch 'master' into njsf-cov
Nelson Ferreira [Mon, 5 Mar 2012 19:33:35 +0000 (14:33 -0500)]
Merge branch 'master' into njsf-cov

12 years agoCoverity CID 400013 Printf arg type mismatch
Nelson Ferreira [Mon, 5 Mar 2012 19:33:11 +0000 (14:33 -0500)]
Coverity CID 400013 Printf arg type mismatch

* lib-src/make-path.c: Include string.h so that strerror is
properly defined.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400031: Tainted string
Nelson Ferreira [Mon, 5 Mar 2012 18:11:52 +0000 (13:11 -0500)]
Coverity: CID 400031: Tainted string

* lib-src/yow.c (main): Make sure argv[2] is not NULL before copying

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400829: Uninit
Nelson Ferreira [Mon, 5 Mar 2012 18:09:31 +0000 (13:09 -0500)]
Coverity: CID 400829: Uninit

* src/media/media.c (Fmedia_stream_aspect): Initialize the
potential return value to nil

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoUse dup2 if available for -t. Also check for ttyname and isatty in configure.
Nelson Ferreira [Mon, 5 Mar 2012 17:52:55 +0000 (12:52 -0500)]
Use dup2 if available for -t. Also check for ttyname and isatty in configure.

* configure.ac: Add some additional functions to check and add the
HAVE_ISATTY and HAVE_TTYNAME

* src/emacs.c (main_1): Enhance the logging of -t with ttyname if
it is available.

* src/emacs.c (main_1): Use raw_open instead of open to avoid
using the format conversion of the filename, which at this early
stage is not setup yet.

* src/emacs.c (main_1): use dup2 if available to dup the opened
file (and then close the original descriptor). This is much more
reliable than close then open, since dup2 will make sure the
descriptor number will be the desired.

* src/eval.c (grow_specpdl): If grow_specpdl is called very early
on specpdl_size is 0 and will loop infinitely here because 2 * 0
== 0 ;)

* src/sysdep.c (raw_open): New function that just calls the system
open with no argument conversion at all

* src/sysfile.h: declare the new raw_open function.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoCoverity: CID 400828 Resource leak
Nelson Ferreira [Mon, 5 Mar 2012 01:19:52 +0000 (20:19 -0500)]
Coverity: CID 400828 Resource leak

* src/emacs.c (main_1): Make sure second dup is fdesc 1

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoxstrncpy updates from Nelson
Steve Youngs [Sun, 4 Mar 2012 23:22:38 +0000 (09:22 +1000)]
xstrncpy updates from Nelson

* merges:
  xstrncpy saga
  xstrncpy saga
  xstrncpy saga
  xstrncpy saga

12 years agoxstrncpy saga
Nelson Ferreira [Sun, 4 Mar 2012 22:12:24 +0000 (17:12 -0500)]
xstrncpy saga

* src/effi.c (Fffi_load_library): use xstrncpy instead of strncpy, strncat

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoxstrncpy saga
Nelson Ferreira [Sun, 4 Mar 2012 21:57:18 +0000 (16:57 -0500)]
xstrncpy saga

* src/dumper.c (pdump_load): Use xstrncpy instead of strcpy

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoxstrncpy saga
Nelson Ferreira [Sun, 4 Mar 2012 21:55:45 +0000 (16:55 -0500)]
xstrncpy saga

* src/sysdep.c (init_system_name): use xstrncpy instead of strcpy

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoxstrncpy saga
Nelson Ferreira [Sun, 4 Mar 2012 21:51:53 +0000 (16:51 -0500)]
xstrncpy saga

* src/sysdep.c (init_system_name): Use xstrncpy instead of strncpy
* src/sysdep.c (readdir): Ditto.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoUse AS_IF instead of if some places - be more M4sh friendly
Nelson Ferreira [Sun, 4 Mar 2012 05:00:09 +0000 (00:00 -0500)]
Use AS_IF instead of if some places - be more M4sh friendly

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoUpdate copyright, remove unused ent arguments
Nelson Ferreira [Sun, 4 Mar 2012 04:57:17 +0000 (23:57 -0500)]
Update copyright, remove unused ent arguments

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoVarious build updates from Nelson
Steve Youngs [Sun, 4 Mar 2012 01:48:48 +0000 (11:48 +1000)]
Various build updates from Nelson

* merges:
  Add the new silent-rules options to the list of known configure opts
  Warn about ignored tty 'with' options. Fix if with missing fi
  Add additional tty lib 'with' options
  issue warning when no tty nor window system available
  Enable silent building, ie --enable-silent-rules and make V=0
  Correct the remote configuration command message
  new SXE_CHECK_LINK_LIB macro
  Add summary for additional tty libraries
  Rename git-to-steve -> git-for-steve
  xstrncpy saga
  Better checking of string and memory operations. Also, add define FORBID_STRCPY to make runtime asserts on usage of strcpy, strcat and stpcpy.
  xstrncpy saga
  xstrncpy saga
  xstrncpy saga
  xstrncpy saga

12 years agoAdd the new silent-rules options to the list of known configure opts
Steve Youngs [Sun, 4 Mar 2012 01:48:00 +0000 (11:48 +1000)]
Add the new silent-rules options to the list of known configure opts

* m4/sxe-aux.m4 (_SXE_CHECK_PURE_OPT): Add silent-rules options to
list of known configure opts.

Signed-off-by: Steve Youngs <steve@sxemacs.org>
12 years agoFFI update from Aidan
Steve Youngs [Sun, 4 Mar 2012 01:00:55 +0000 (11:00 +1000)]
FFI update from Aidan

* merges:
  Avoid namespace pollution, runtime consing, #'define-ffi-function

12 years agoAvoid namespace pollution, runtime consing, #'define-ffi-function
Aidan Kehoe [Sat, 3 Mar 2012 15:19:35 +0000 (15:19 +0000)]
Avoid namespace pollution, runtime consing, #'define-ffi-function

12 years agoMerge remote-tracking branch 'njsf/for-steve' into for-steve
Nelson Ferreira [Sat, 3 Mar 2012 05:33:54 +0000 (00:33 -0500)]
Merge remote-tracking branch 'njsf/for-steve' into for-steve

12 years agoMerge branch 'master' of ssh://dio.dreamhost.com/~/repos.nelsonferreira.com/git/sxema...
Nelson Ferreira [Sat, 3 Mar 2012 05:33:34 +0000 (00:33 -0500)]
Merge branch 'master' of ssh://dio.dreamhost.com/~/repos.nelsonferreira.com/git/sxemacs into for-steve

12 years agoWarn about ignored tty 'with' options. Fix if with missing fi
Nelson Ferreira [Sat, 3 Mar 2012 05:30:44 +0000 (00:30 -0500)]
Warn about ignored tty 'with' options. Fix if with missing fi

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoAdd additional tty lib 'with' options
Nelson Ferreira [Sat, 3 Mar 2012 05:17:10 +0000 (00:17 -0500)]
Add additional tty lib 'with' options

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoissue warning when no tty nor window system available
Nelson Ferreira [Sat, 3 Mar 2012 05:14:44 +0000 (00:14 -0500)]
issue warning when no tty nor window system available

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
12 years agoEnable silent building, ie --enable-silent-rules and make V=0
Nelson Ferreira [Sat, 3 Mar 2012 05:11:28 +0000 (00:11 -0500)]
Enable silent building, ie --enable-silent-rules and make V=0

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>