version 1.1, 2002/09/03 00:41:44 |
version 1.7, 2019/12/13 15:41:36 |
|
|
/* Copyright (c) 1987, 1988 by Software Research Associates, Inc. */ |
/* Copyright (c) 1987, 1988 by Software Research Associates, Inc. */ |
|
|
|
#if defined(ANDROID) |
|
#include <strings.h> |
|
#define index(s,c) strchr(s,c) |
|
#define rindex(s,c) strrchr(s,c) |
|
#endif |
|
|
#ifndef lint |
#ifndef lint |
static char rcsid[]= |
static char rcsid[]= |
"$Id$ (SRA)"; |
"$Id$ (SRA)"; |
#endif /* lint */ |
#endif /* lint */ |
|
|
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <sys/ioctl.h> |
#include <sys/ioctl.h> |
Line 24 static char rcsid[]= |
|
Line 32 static char rcsid[]= |
|
#if defined(__CYGWIN__) |
#if defined(__CYGWIN__) |
#include <sys/dirent.h> |
#include <sys/dirent.h> |
#define direct dirent |
#define direct dirent |
|
#elif defined(sun) || defined(__FreeBSD__) || defined(ANDROID) |
|
#include <dirent.h> |
|
#define direct dirent |
|
#include <unistd.h> |
#else |
#else |
#include <sys/dir.h> |
#include <sys/dir.h> |
#endif |
#endif |
Line 158 init_edit_params () |
|
Line 170 init_edit_params () |
|
set_var ("editmode", "emacs"); |
set_var ("editmode", "emacs"); |
} |
} |
|
|
set_var ("showhist", itoa (lines - 1)); |
sprintf (sbuf, "%d", lines); |
|
set_var ("showhist", sbuf); |
|
|
/* |
/* |
* Read startup file |
* Read startup file |
Line 232 initEmacsBindings (cft, aft) |
|
Line 245 initEmacsBindings (cft, aft) |
|
import (cft, initial_ttymode.c_cc[VDSUSP], self_insert); |
import (cft, initial_ttymode.c_cc[VDSUSP], self_insert); |
*/ |
*/ |
import (cft, initial_ttymode.c_cc[VREPRINT], reprint); |
import (cft, initial_ttymode.c_cc[VREPRINT], reprint); |
|
#ifdef VDISCARD |
import (cft, initial_ttymode.c_cc[VDISCARD], self_insert); |
import (cft, initial_ttymode.c_cc[VDISCARD], self_insert); |
|
#endif |
import (cft, initial_ttymode.c_cc[VWERASE], delete_previous_word); |
import (cft, initial_ttymode.c_cc[VWERASE], delete_previous_word); |
import (cft, initial_ttymode.c_cc[VLNEXT], literal_next); |
import (cft, initial_ttymode.c_cc[VLNEXT], literal_next); |
import (cft, initial_ttymode.c_cc[VERASE], delete_previous_character); |
import (cft, initial_ttymode.c_cc[VERASE], delete_previous_character); |
Line 279 initEmacsBindings (cft, aft) |
|
Line 294 initEmacsBindings (cft, aft) |
|
* Main function of front end program |
* Main function of front end program |
*/ |
*/ |
CHAR * |
CHAR * |
getline() |
mygetline() |
{ |
{ |
int c; |
int c; |
CHAR *execute_command, *check_alias(); |
CHAR *execute_command, *check_alias(); |
Line 1762 expand_file_name () |
|
Line 1777 expand_file_name () |
|
int found = 0; |
int found = 0; |
int i; |
int i; |
int tilde_expanded = 0; |
int tilde_expanded = 0; |
|
#if !defined(ANDROID) |
CHAR *index(), *rindex(); |
CHAR *index(), *rindex(); |
|
#endif |
|
|
if (delimiters == NULL) |
if (delimiters == NULL) |
delimiters = DEFAULT_DELIMITERS; |
delimiters = DEFAULT_DELIMITERS; |
Line 1875 list_file_name () |
|
Line 1892 list_file_name () |
|
CHAR *cp; |
CHAR *cp; |
char dir[256]; |
char dir[256]; |
DIR *dirp, *x_opendir(); |
DIR *dirp, *x_opendir(); |
|
#if !defined(ANDROID) |
CHAR *index(), *rindex(); |
CHAR *index(), *rindex(); |
|
#endif |
|
|
if (delimiters == NULL) |
if (delimiters == NULL) |
delimiters = DEFAULT_DELIMITERS; |
delimiters = DEFAULT_DELIMITERS; |