Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove AMIGA #31

Merged
merged 3 commits into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1903,10 +1903,6 @@ CPROTO = cproto $(PROTO_FLAGS) -DPROTO \
$(CPROTO) -DFEAT_GUI $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@

os_amiga.pro: os_amiga.c
$(CPROTO) -DAMIGA -UHAVE_CONFIG_H -DBPTR=char* $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@

os_win32.pro: os_win32.c
$(CPROTO) -DWIN32 -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
Expand Down
12 changes: 0 additions & 12 deletions src/evalfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

#if defined(FEAT_EVAL) || defined(PROTO)

#ifdef AMIGA
# include <time.h> /* for strftime() */
#endif

#ifdef VMS
# include <float.h>
#endif
Expand Down Expand Up @@ -3264,14 +3260,12 @@ f_empty(typval_T *argvars, typval_T *rettv)
static void
f_environ(typval_T *argvars UNUSED, typval_T *rettv)
{
#if !defined(AMIGA)
int i = 0;
char_u *entry, *value;
# ifdef MSWIN
extern wchar_t **_wenviron;
# else
extern char **environ;
# endif

if (rettv_dict_alloc(rettv) != OK)
return;
Expand Down Expand Up @@ -6275,12 +6269,6 @@ f_has(typval_T *argvars, typval_T *rettv)
int n = FALSE;
static char *(has_list[]) =
{
#ifdef AMIGA
"amiga",
# ifdef FEAT_ARP
"arp",
# endif
#endif
#ifdef __BEOS__
"beos",
#endif
Expand Down
27 changes: 0 additions & 27 deletions src/ex_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1649,11 +1649,7 @@ do_shell(
save_nwr = no_wait_return;
if (swapping_screen())
no_wait_return = FALSE;
# ifdef AMIGA
wait_return(term_console ? -1 : msg_silent == 0); // see below
# else
wait_return(msg_silent == 0);
# endif
no_wait_return = save_nwr;
}
}
Expand All @@ -1663,29 +1659,6 @@ do_shell(
if (!keep_termcap) // if keep_termcap is TRUE didn't stop termcap
#endif
starttermcap(); // start termcap if not done by wait_return()

/*
* In an Amiga window redrawing is caused by asking the window size.
* If we got an interrupt this will not work. The chance that the
* window size is wrong is very small, but we need to redraw the
* screen. Don't do this if ':' hit in wait_return(). THIS IS UGLY
* but it saves an extra redraw.
*/
#ifdef AMIGA
if (skip_redraw) /* ':' hit in wait_return() */
{
if (msg_silent == 0)
redraw_later_clear();
}
else if (term_console)
{
OUT_STR(IF_EB("\033[0 q", ESC_STR "[0 q")); /* get window size */
if (got_int && msg_silent == 0)
redraw_later_clear(); /* if got_int is TRUE, redraw needed */
else
must_redraw = 0; /* no extra redraw needed */
}
#endif
}

/* display any error messages now */
Expand Down
11 changes: 0 additions & 11 deletions src/ex_cmds2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2458,13 +2458,6 @@ do_in_path(
char_u **files;
int i;
int did_one = FALSE;
#ifdef AMIGA
struct Process *proc = (struct Process *)FindTask(0L);
APTR save_winptr = proc->pr_WindowPtr;

/* Avoid a requester here for a volume that doesn't exist. */
proc->pr_WindowPtr = (APTR)-1L;
#endif

/* Make a copy of 'runtimepath'. Invoking the callback may change the
* value. */
Expand Down Expand Up @@ -2560,10 +2553,6 @@ do_in_path(
}
}

#ifdef AMIGA
proc->pr_WindowPtr = save_winptr;
#endif

return did_one ? OK : FAIL;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ex_docmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -10568,7 +10568,7 @@ get_view_file(int c)
else if (vim_ispathsep(*p))
{
*s++ = '=';
#if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) || defined(VMS)
#if defined(BACKSLASH_IN_FILENAME) || defined(VMS)
if (*p == ':')
*s++ = '-';
else
Expand Down
7 changes: 2 additions & 5 deletions src/feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# if defined(UNIX) || defined(MSWIN) || defined(MACOS_X)
# define FEAT_HUGE
# else
# if defined(MSWIN) || defined(VMS) || defined(AMIGA)
# if defined(MSWIN) || defined(VMS)
# define FEAT_BIG
# else
# define FEAT_NORMAL
Expand Down Expand Up @@ -365,8 +365,7 @@
* +printer ":hardcopy" command
* +postscript Printing uses PostScript file output.
*/
#if defined(FEAT_NORMAL) && (defined(MSWIN) || defined(FEAT_EVAL)) \
&& !defined(AMIGA)
#if defined(FEAT_NORMAL) && (defined(MSWIN) || defined(FEAT_EVAL))
# define FEAT_PRINTER
#endif
#if defined(FEAT_PRINTER) && ((defined(MSWIN) && defined(MSWINPS)) \
Expand Down Expand Up @@ -933,7 +932,6 @@
* +mouse Any mouse support (any of the above enabled).
*/
/* OS/2 and Amiga console have no mouse support */
#if !defined(AMIGA)
# ifdef FEAT_NORMAL
# define FEAT_MOUSE_XTERM
# endif
Expand All @@ -949,7 +947,6 @@
# if defined(FEAT_NORMAL) && defined(MSWIN)
# define DOS_MOUSE
# endif
#endif

/*
* Note: Only one of the following may be defined:
Expand Down
23 changes: 0 additions & 23 deletions src/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -6345,9 +6345,6 @@ vim_rename(char_u *from, char_u *to)
int n;
char *errmsg = NULL;
char *buffer;
#ifdef AMIGA
BPTR flock;
#endif
stat_T st;
long perm;
#ifdef HAVE_ACL
Expand Down Expand Up @@ -6442,27 +6439,7 @@ vim_rename(char_u *from, char_u *to)
* two files when the mch_rename() fails.
*/

#ifdef AMIGA
/*
* With MSDOS-compatible filesystems (crossdos, messydos) it is possible
* that the name of the "to" file is the same as the "from" file, even
* though the names are different. To avoid the chance of accidentally
* deleting the "from" file (horror!) we lock it during the remove.
*
* When used for making a backup before writing the file: This should not
* happen with ":w", because startscript() should detect this problem and
* set buf->b_shortname, causing modname() to return a correct ".bak" file
* name. This problem does exist with ":w filename", but then the
* original file will be somewhere else so the backup isn't really
* important. If autoscripting is off the rename may fail.
*/
flock = Lock((UBYTE *)from, (long)ACCESS_READ);
#endif
mch_remove(to);
#ifdef AMIGA
if (flock)
UnLock(flock);
#endif

/*
* First try a normal rename, return if it works.
Expand Down
16 changes: 0 additions & 16 deletions src/findfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1718,13 +1718,6 @@ find_file_in_path_option(
char_u *file_name = NULL;
char_u *buf = NULL;
int rel_to_curdir;
# ifdef AMIGA
struct Process *proc = (struct Process *)FindTask(0L);
APTR save_winptr = proc->pr_WindowPtr;

// Avoid a requester here for a volume that doesn't exist.
proc->pr_WindowPtr = (APTR)-1L;
# endif

if (first == TRUE)
{
Expand Down Expand Up @@ -1764,10 +1757,6 @@ find_file_in_path_option(
|| vim_ispathsep(ff_file_to_find[0])
// handle "c:name" as absolute path
|| (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':')
# endif
# ifdef AMIGA
// handle ":tmp" as absolute path
|| ff_file_to_find[0] == ':'
# endif
)
{
Expand Down Expand Up @@ -1911,9 +1900,6 @@ find_file_in_path_option(
}

theend:
# ifdef AMIGA
proc->pr_WindowPtr = save_winptr;
# endif
return file_name;
}

Expand Down Expand Up @@ -2612,7 +2598,6 @@ expand_in_path(
void
simplify_filename(char_u *filename)
{
#ifndef AMIGA // Amiga doesn't have "..", it uses "/"
int components = 0;
char_u *p, *tail, *start;
int stripping_disabled = FALSE;
Expand Down Expand Up @@ -2812,5 +2797,4 @@ simplify_filename(char_u *filename)
p = getnextcomp(p);
}
} while (*p != NUL);
#endif // !AMIGA
}
24 changes: 0 additions & 24 deletions src/getchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -2325,30 +2325,6 @@ vgetorpeek(int advance)
keylen = 0;
if (keylen == 0) /* no matching terminal code */
{
#ifdef AMIGA /* check for window bounds report */
if (typebuf.tb_maplen == 0 && (typebuf.tb_buf[
typebuf.tb_off] & 0xff) == CSI)
{
for (s = typebuf.tb_buf + typebuf.tb_off + 1;
s < typebuf.tb_buf + typebuf.tb_off
+ typebuf.tb_len
&& (VIM_ISDIGIT(*s) || *s == ';'
|| *s == ' ');
++s)
;
if (*s == 'r' || *s == '|') /* found one */
{
del_typebuf((int)(s + 1 -
(typebuf.tb_buf + typebuf.tb_off)), 0);
/* get size and redraw screen */
shell_resized();
continue;
}
if (*s == NUL) /* need more characters */
keylen = KEYLEN_PART_KEY;
}
if (keylen >= 0)
#endif
/* When there was a matching mapping and no
* termcode could be replaced after another one,
* use that mapping (loop around). If there was
Expand Down
2 changes: 1 addition & 1 deletion src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ EXTERN char e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
EXTERN char e_sandbox[] INIT(= N_("E48: Not allowed in sandbox"));
#endif
EXTERN char e_secure[] INIT(= N_("E523: Not allowed here"));
#if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN) \
#if defined(MACOS_X) || defined(MSWIN) \
|| defined(UNIX) || defined(VMS)
EXTERN char e_screenmode[] INIT(= N_("E359: Screen mode setting not supported"));
#endif
Expand Down
22 changes: 1 addition & 21 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2171,12 +2171,6 @@ command_line_scan(mparm_T *parmp)
#endif
#ifdef FEAT_DIFF
case 'd': /* "-d" 'diff' */
# ifdef AMIGA
/* check for "-dev {device}" */
if (argv[0][argv_idx] == 'e' && argv[0][argv_idx + 1] == 'v')
want_argument = TRUE;
else
# endif
parmp->diff_mode = TRUE;
break;
#endif
Expand Down Expand Up @@ -2629,7 +2623,7 @@ read_stdin(void)
TIME_MSG("reading stdin");

check_swap_exists_action();
#if !(defined(AMIGA) || defined(MACOS_X))
#if !(defined(MACOS_X))
/*
* Close stdin and dup it from stderr. Required for GPM to work
* properly, and for running external commands.
Expand Down Expand Up @@ -3026,13 +3020,6 @@ source_startup_scripts(mparm_T *parmp)
}
else if (!silent_mode)
{
#ifdef AMIGA
struct Process *proc = (struct Process *)FindTask(0L);
APTR save_winptr = proc->pr_WindowPtr;

/* Avoid a requester here for a volume that doesn't exist. */
proc->pr_WindowPtr = (APTR)-1L;
#endif

/*
* Get system wide defaults, if the file name is defined.
Expand Down Expand Up @@ -3138,9 +3125,6 @@ source_startup_scripts(mparm_T *parmp)
if (secure == 2)
need_wait_return = TRUE;
secure = 0;
#ifdef AMIGA
proc->pr_WindowPtr = save_winptr;
#endif
}
TIME_MSG("sourcing vimrc file(s)");
}
Expand Down Expand Up @@ -3356,10 +3340,6 @@ usage(void)
main_msg(_("-r\t\t\tList swap files and exit"));
main_msg(_("-r (with file name)\tRecover crashed session"));
main_msg(_("-L\t\t\tSame as -r"));
#ifdef AMIGA
main_msg(_("-f\t\t\tDon't use newcli to open window"));
main_msg(_("-dev <device>\t\tUse <device> for I/O"));
#endif
#ifdef FEAT_ARABIC
main_msg(_("-A\t\t\tStart in Arabic mode"));
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/mbyte.c
Original file line number Diff line number Diff line change
Expand Up @@ -6607,7 +6607,7 @@ convert_setup_ext(
return OK;
}

#if defined(FEAT_GUI) || defined(AMIGA) || defined(MSWIN) \
#if defined(FEAT_GUI) || defined(MSWIN) \
|| defined(PROTO)
/*
* Do conversion on typed input characters in-place.
Expand Down
Loading