1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-11-02 19:37:19 -04:00
Commit Graph

146 Commits

Author SHA1 Message Date
Ulrich Müller
a511e03e60 Respect LDFLAGS when linking.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-22 09:26:46 -07:00
Linus Torvalds
c718cb2a4a Show xA0 (nbsp) as a non-printable character
I want to see the difference between space and nbsp, and I consider nbsp
to be a control character, so show it as such.  Even if it is
technically "printable".

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-22 09:25:04 -07:00
Thiago Farina
823786d263 uemacs: display.c: Use the newly introduced xmalloc function.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-16 15:46:43 -08:00
Thiago Farina
6e4aec520e uemacs: Add xmalloc as a wrapper function for malloc.
xmalloc checks the returned pointer and dies if it failed to allocate
the memory.

Use this new function in window.c.
More places will be converted to use xmalloc latter.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-16 08:33:10 -08:00
Thiago Farina
bf3c3ac2bd uemacs: Make some magic variables private to search.c module.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-14 11:28:55 -08:00
Thiago Farina
d6e76cca7b uemacs: input.c: Fix mkstemp warning.
Fix the following warning:

input.c: In function ‘getstring’:
input.c:590: warning: ignoring return value of ‘mkstemp’, declared with attribute warn_unused_result

This add usage.c module for die function.
This also add wrapper.c module for the xmkstemp that is wrapper function
around the original mkstemp function.

Both module codes was largelly based on git, linux and sparse codes.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-14 11:27:57 -08:00
Thiago Farina
f28629471c uemacs: convert typedef struct RMC to struct magic_replacement.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-30 14:39:37 -08:00
Thiago Farina
9744421f3c uemacs: Move MAXNLINE constant from estruct.h to file.c
This constant is used only there, so there is no reason for it to be
in estruct.h

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-28 17:20:07 -08:00
Thiago Farina
a1891f8efc uemacs: Move some constants from estruct.h to posix.c
These two constants are only needed/used by the posix.c file,
so just define them there.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-28 14:16:57 -08:00
Thiago Farina
dff382de1d uemacs: buffer.c: Fix uninitialized struct warning.
This fix the following warning:

  buffer.c: In function ‘nextbuffer’:
  buffer.c:45: warning: ‘bp’ may be used uninitialized in this function

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-28 13:14:31 -08:00
Thiago Farina
ebd4f2f1eb uemacs: convert typedef struct MC to struct magic.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-28 12:29:52 -08:00
Thiago Farina
e1b2f459e2 uemacs: Move uv variable into the eval.c source file.
It's used only there.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-24 08:26:55 +09:00
Li Jie
1cf0fc1609 uemacs: add line.h in names.c to fix compiling error
I got following errors while compiling uemacs:

names.c:132: error: ‘insspace’ undeclared here (not in a function)
names.c:217: error: ‘yank’ undeclared here (not in a function)
make: *** [names.o] Error 1

It looks like names.c needs line.h for function declarations.

Signed-off-by: Li Jie <eltshanli@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-18 08:28:17 -08:00
Thiago Farina
10ae171147 uemacs: Move NBLOCK constant into line.c
This constant is only used in line.c. So just keep it there.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-15 14:07:43 -08:00
Thiago Farina
af19da1a99 uemacs: Move structure line and its functions to its own header file.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-15 08:46:20 -08:00
Pekka Enberg
72a1af4d91 uemacs: Kill dead code
This patch kills #ifdef'd code from display.c and file.c.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-14 15:21:47 -08:00
Thiago Farina
6ceea8ba9b uemacs: convert typedef struct VDESC to struct variable_description.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-06 09:21:41 -07:00
Thiago Farina
fa57a63d57 uemacs: remove forward declaration of 'struct video' from edef.h
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-03 15:09:55 -04:00
Linus Torvalds
85b4f0af1a Merge branch 'master' of git://git.kernel.org/pub/scm/editors/uemacs/uemacs 2010-11-02 09:05:21 -04:00
Thiago Farina
4966cb355e uemacs: get rid of BITMAP typedef.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-02 09:04:48 -04:00
Thiago Farina
6491f4c4f0 uemacs: convert typedef struct WHBLOCK to struct while_block.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-30 18:09:40 -07:00
Thiago Farina
18342f6246 uemacs: Move function declarations from edef.h to efunc.h.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-25 10:07:13 -07:00
Christian Faulhammer
da3d470b8d Fix a tiny typo
Signed-off-by: Christian Faulhammer <christian@faulhammer.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-13 07:34:23 -07:00
Thiago Farina
5664b10291 uemacs/version.c: Add version function to output the version string information.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-07 13:55:02 -07:00
Thiago Farina
74336ca924 uemacs: Get rid of the CALLED macro.
uemacs is not a subprogram and doesn't seem it will be, so there is no reason
to leave this macro. And this macro is defined to 0, so we never reach the path
where we test for this macro.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-07 13:47:00 -07:00
Thiago Farina
1dcc35b309 uemacs: Remove more garbage emacs.* files from the tree.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-07 13:47:00 -07:00
Thiago Farina
b71ee14235 uemacs: Remove two completly unused functions (fnclabel and spal).
The implementation of these functions are doing anything at all at this moment.
So cleanup a bit the code by removing fnclabel and spal functions completly.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-07 13:47:00 -07:00
Pekka Enberg
9f801a8822 uemacs: Remove garbage from the tree
This patch removes bunch of ancient Makefiles and VMS scripts from
uemacs source tree.  If somebody really needs them, they can always look
them up from git repository history.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-29 08:15:23 -07:00
Pekka Enberg
f4ccd49650 uemacs: Clean up program executable
This patch fixes Makefile 'clean' target to clean up program executable 'em'.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-29 08:15:23 -07:00
Pekka Enberg
0f05e53f99 uemacs: Fix return statements
Return statement is not a function so remove superfluous use of parenthesis.

Cc: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-29 08:15:23 -07:00
Pekka Enberg
3246438f73 uemacs: Kill unused lckhello function
This patch kills an unused 'lckhello' function and gets rid of the following
GCC warning:

    CC       lock.o
  lock.c:160: warning: ‘lckhello’ defined but not used

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-29 08:15:23 -07:00
Thiago Farina
bd635515a6 uemacs/efunc.h: Get rid of a duplicated exported type called "names".
This type is already exported in edef.h

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-29 08:15:23 -07:00
Thiago Farina
78f045749f uemacs: Add more two options to the usage output.
Added + and +<n> to the usage output.

Also fixed the following warning:

  main.c: In function ‘main’:
  main.c:121: warning: ‘gline’ may be used uninitialized in this function

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-29 08:15:23 -07:00
Thiago Farina
7622263b45 uemacs: Make getgoal function private to basic.c.
This functions is only used internally by basic.c, so marking it static,
to make it private.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-28 13:59:13 -07:00
Pekka Enberg
799b74b9e7 uemacs: Fix out-of-box build on Mac OS X
This patch fixes out-of-box build on Mac OS X by using "uname -s" to detect the
underlying OS and fixing up defines accordingly.

Cc: Yong Luk Stanley Elijah Goh <stan@t0xt.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-28 13:59:13 -07:00
Yong Luk Stanley Elijah Goh
89fea23de5 uemacs: Compiles on Mac OS X.
Compiles on Mac OS X 10.6.4.

setmode() is renamed to setemode() to avoid conflict with OS X's unistd.h's
setmode().

Modify Makefile to enable the appropriate DEFINES to compile on Mac OS X.

Signed-off-by: Yong Luk Stanley Elijah Goh <stan@t0xt.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-24 10:55:02 -07:00
Thiago Farina
834bfd37aa uemacs: basic.c: Add support to go to the end of the buffer.
There is a case when the user can type something like this:

    em filename +

or even

    em +

Instead of saying "Bogus argument" when the uemacs start, just go to the end of
the buffer like we can do in vim for example.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-21 12:31:25 -07:00
Thiago Farina
8facd84c6f uemacs: Add --help option.
Add a basic usage() function to support the --help option.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-18 12:14:19 -07:00
Thiago Farina
dfc102ce3a uemacs: Add --version option.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-13 12:04:12 -07:00
Thiago Farina
1f271323f8 uemacs: convert typedef struct KILL to struct kill.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-10 15:24:33 -07:00
Thiago Farina
c206895b9e uemacs: evar.h: Add enum function_type.
Replace four macros used to define integer constants with a enum.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-04 11:18:51 -07:00
Thiago Farina
54966da9f0 uemacs: ibmpc.c: Move the functions to the ANSI style declaration.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-02 08:18:24 -07:00
Thiago Farina
81a3a0be6e uemacs: convert typedef struct window_t to struct window.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-01 15:10:23 -07:00
Thiago Farina
af9710adc4 uemacs: convert typedef struct TERM to struct terminal.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-11 13:30:44 -07:00
Thiago Farina
bbf253858a uemacs: convert typedef struct REGION to struct region.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-10 10:26:32 -07:00
Thiago Farina
724c4efc5f uemacs: convert typedef struct NBIND to struct name_bind.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-04 20:14:34 -07:00
Thiago Farina
8403b1d597 uemacs: convert typedef struct KEYTAB to struct key_tab.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-30 15:40:09 -07:00
Thiago Farina
e5e0fbd7e7 uemacs/ansi.c: Convert the old functions style declarations to the new one.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-28 19:22:17 -07:00
Thiago Farina
da18fa4a2f uemacs: Convert typedef struct UVAR to struct user_variable.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-27 22:59:38 -07:00
Thiago Farina
d01bdbdc42 uemacs: convert typedef struct UFUNC to struct user_function.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-27 07:23:58 -07:00