* cmd.c: Remove OS/2 specific code.

* file.c: Likewise.
* main.c: Likewise.
This commit is contained in:
Pavel Roskin 2002-01-17 07:23:50 +00:00
parent 030d1bf2ad
commit 73ed832576
4 changed files with 6 additions and 75 deletions

View File

@ -1,5 +1,9 @@
2002-01-17 Pavel Roskin <proski@gnu.org>
* cmd.c: Remove OS/2 specific code.
* file.c: Likewise.
* main.c: Likewise.
* main.h: Remove dead declarations.
* setup.c: Remove defunct extension alignment support.
* util.c: Likewise.

View File

@ -19,11 +19,6 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <config.h>
#ifdef __os2__
# define INCL_DOSFILEMGR
# define INCL_DOSMISC
# define INCL_DOSERROR
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>

View File

@ -570,7 +570,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
return temp_status;
}
#endif /* !OS2_NT */
#ifndef __os2__
while (ctx->preserve &&
(mc_chmod (dst_path, sb.st_mode & ctx->umask_kill) < 0)){
temp_status = file_error (_(" Cannot chmod target file \"%s\" \n %s "), dst_path);
@ -578,7 +577,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
continue;
return temp_status;
}
#endif /* !__os2__ */
return FILE_CONT;
}
}
@ -829,11 +827,7 @@ copy_dir_dir (FileOpContext *ctx, char *s, char *d, int toplevel,
off_t *progress_count,
double *progress_bytes)
{
#ifdef __os2__
DIR *next;
#else
struct dirent *next;
#endif /* !__os2__ */
struct stat buf, cbuf;
DIR *reading;
char *path, *mdpath, *dest_file, *dest_dir;
@ -1018,19 +1012,10 @@ copy_dir_dir (FileOpContext *ctx, char *s, char *d, int toplevel,
}
}
#ifdef __os2__
/* The OS/2 mc_readdir returns a block of memory DIR
* next should be freed: .ado
*/
if (!next)
g_free (next);
#endif /* __os2__ */
g_free (path);
}
mc_closedir (reading);
/* .ado: Directories can not have permission set in OS/2 */
#ifndef __os2__
if (ctx->preserve){
mc_chmod (dest_dir, cbuf.st_mode & ctx->umask_kill);
utb.actime = cbuf.st_atime;
@ -1038,7 +1023,6 @@ copy_dir_dir (FileOpContext *ctx, char *s, char *d, int toplevel,
mc_utime(dest_dir, &utb);
}
#endif /* !__os2__ */
ret:
g_free (dest_dir);
g_free (parent_dirs);
@ -1351,11 +1335,6 @@ recursive_erase (FileOpContext *ctx, char *s, off_t *progress_count, double *pro
else
return_status = erase_file (ctx, path, progress_count, progress_bytes, 0);
g_free (path);
/* .ado: OS/2 returns a block of memory DIR to next and must be freed */
#ifdef __os2__
if (!next)
g_free (next);
#endif /* __os2__ */
}
mc_closedir (reading);
if (return_status != FILE_CONT)

View File

@ -26,13 +26,6 @@
# include <windows.h>
#endif
#ifdef __os2__
# define INCL_DOS
# define INCL_DOSFILEMGR
# define INCL_DOSERRORS
# include <os2.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -99,9 +92,7 @@
#include "cmd.h" /* Normal commands */
#include "hotlist.h"
#include "panelize.h"
#ifndef __os2__
# include "learn.h"
#endif
#include "learn.h"
#include "listmode.h"
#include "background.h"
#include "ext.h" /* For flush_extension_file() */
@ -700,9 +691,7 @@ do_execute (const char *shell, const char *command, int flags)
if (console_flag)
restore_console ();
#ifndef __os2__
unlink (control_file);
#endif
if (!use_subshell && !(flags & EXECUTE_INTERNAL && command)) {
printf ("%s%s%s\n", last_paused ? "\r\n":"", prompt, command);
last_paused = 0;
@ -760,9 +749,7 @@ do_execute (const char *shell, const char *command, int flags)
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
parse_control_file ();
#ifndef __os2__
unlink (control_file);
#endif
do_refresh ();
use_dash (TRUE);
}
@ -2145,40 +2132,6 @@ init_sigfatals (void)
}
#elif defined (__os2__)
/* OS/2 Version */
# define CONTROL_FILE "\\mc.%d.control"
char control_file [sizeof (CONTROL_FILE) + 8];
void
OS_Setup (void)
{
/* .ado: This does not work: */
/* DosSMSetTitle ((PSZ) "This is my app"); */
/* In DEF: IMPORTS
DosSMSetTitle = SESMGR.DOSSMSETTITLE */
shell = getenv ("COMSPEC");
if (!shell || !*shell)
shell = get_default_shell ();
mc_home = get_mc_lib_dir ();
}
static void
sigchld_handler_no_subshell (int sig)
{
}
void
init_sigchld (void)
{
}
void
init_sigfatals (void)
{
/* Nothing to be done on the OS/2, Windows/NT */
}
#else
/* Unix version */
@ -2274,7 +2227,7 @@ init_sigchld (void)
}
}
#endif /* _OS_NT, __os2__, UNIX */
#endif /* _OS_NT, UNIX */
static void
print_mc_usage (void)