From 11500a85298218f47d898dcfbef5d5e88792ea69 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 3 Apr 2014 17:30:35 +0400 Subject: [PATCH] 0024794: Drop unused files Standard_osd_ffi.c and Standard_symlink.c --- src/Standard/FILES | 2 - src/Standard/Standard_osd_ffi.c | 427 -------------------------------- src/Standard/Standard_symlink.c | 43 ---- 3 files changed, 472 deletions(-) delete mode 100644 src/Standard/Standard_osd_ffi.c delete mode 100644 src/Standard/Standard_symlink.c diff --git a/src/Standard/FILES b/src/Standard/FILES index 7c1524edc5..fce77adaf1 100755 --- a/src/Standard/FILES +++ b/src/Standard/FILES @@ -57,8 +57,6 @@ Standard_Transient_proto.hxx Standard_TypeDef.hxx Standard_math.cxx Standard_math.hxx -Standard_osd_ffi.c -Standard_symlink.c Standard_values.h Standard_DefineHandle.hxx Standard_UUID.cxx diff --git a/src/Standard/Standard_osd_ffi.c b/src/Standard/Standard_osd_ffi.c deleted file mode 100644 index 0856979a2d..0000000000 --- a/src/Standard/Standard_osd_ffi.c +++ /dev/null @@ -1,427 +0,0 @@ -/* - Copyright (c) 1998-1999 Matra Datavision - Copyright (c) 1999-2014 OPEN CASCADE SAS - - This file is part of Open CASCADE Technology software library. - - This library is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License version 2.1 as published - by the Free Software Foundation, with special exception defined in the file - OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT - distribution for complete text of the license and disclaimer of any warranty. - - Alternatively, this file may be used under the terms of Open CASCADE - commercial license or contractual agreement. -*/ - -/********************************************************** -*/ -/** RBA 12/10/88 -*/ -/** --- -------- -*/ -/** -*/ -/** Fichier : OSD_FFI.C (SUN/UNIX) -*/ -/** Titre : osd_ffi_(dir, name, tab_res, max, l_dir, l_name, l_tab) -*/ -/** char *dir, *nmae, *tab-res; -*/ -/** int *max; -*/ -/** int l_dir, l_name, l_tab; -*/ -/** Retour: -*/ -/** Nombre de fichier trouve (1 ou plus) -*/ -/** 0 sinon. -*/ -/** -*/ -/** Role : Trouver tous les fichier qui ont le meme nom que 'name' sachant -*/ -/** que 'name' peut etre un nom de fichier comportant le caractere -*/ -/** joker '*'. -*/ -/** Exemple : -*/ -/** Appel en Fortran -*/ -/** -*/ -/** integer nb_fichier, osd_ffi -*/ -/** character*80 dir, name -*/ -/** character*80 tab_res(100) -*/ -/** .... -*/ -/** .... -*/ -/** name = 'TOTO*.*' -*/ -/** .... -*/ -/** nb_fichier = osd_ffi(dir, name, tab_res, 100) -*/ -/** -*/ -/** Modifs : - sga 28/04/92 correction bug closedir -*/ -/** - asi 11/04/90 correction de strcmp_joker -*/ -/** - fsa 26/04/90 ajout du tri du tableau tab_res -*/ -/** par ordre aphabethique -*/ -/** - asi 06/09/90 ajout de la directorie aux noms de fichier -*/ -/** retourne -*/ -/** - J.P. TIRAULT le 3-Avril-1992 : Faire le close du directory -*/ -/** apres l'avoir ouvert. -*/ -/** -*/ -/*************************************************************/ -#if defined(_MSC_VER) && !defined(WNT) -#error "Wrong compiler options has been detected. Add /DWNT option for proper compilation!!!!!" -#endif - -#ifndef WNT - -#ifdef HAVE_CONFIG_H -# include -#endif - -/* This hack is required to get HP's c89 to include a definition for DIR */ -#ifdef __hpux -# ifndef _INCLUDE_POSIX_SOURCE -# define _INCLUDE_POSIX_SOURCE -# endif -#endif - -#include -#include -#include -#include -#include - -#ifdef HAVE_DIRENT_H -# include -# define NAMLEN(dirent) strlen((dirent)->d_name) -# ifdef VMS -extern char *vmsify PARAMS ((char *name, int type)); -# endif -#else -# define dirent direct -# define NAMLEN(dirent) (dirent)->d_namlen -# ifdef HAVE_SYS_NDIR_H -# include -# endif -# ifdef HAVE_SYS_DIR_H -# include -# endif -# ifdef HAVE_NDIR_H -# include -# endif -# ifdef HAVE_VMSDIR_H -# include "vmsdir.h" -# endif /* HAVE_VMSDIR_H */ -#endif - -/* In GNU systems, defines this macro for us. */ -#ifdef _D_NAMLEN -# undef NAMLEN -# define NAMLEN(d) _D_NAMLEN(d) -#endif - -#if (defined (POSIX) || defined (VMS) || defined (WINDOWS32)) && !defined (__GNU_LIBRARY__) -/* Posix does not require that the d_ino field be present, and some - systems do not provide it. */ -# define REAL_DIR_ENTRY(dp) 1 -# define FAKE_DIR_ENTRY(dp) -#else -# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) -# define FAKE_DIR_ENTRY(dp) (dp->d_ino = 1) -#endif /* POSIX */ - -DIR *dirp; -struct dirent *dp; - -void tri(int taille, char *list,int l_tab); -int strcmp_joker(char *s1, char *s2); - -int -osd_ffi(char *dir, char *name, char *tab_res, int *max, int l_dir, int l_name, int l_tab) -{ - char file[255], directory[255]; - int ii, jj, kk, nb_file; - - /***** Le Nom de la directory ******/ - if (*dir == ' ') { - directory[0] = '.'; - directory[1] = 0; - } - else { - for (ii=0; iid_name) == 0) { - /*======= On copie sa valeur ========*/ - /* avec la directorie */ - /* jj tab_res, kk la ligne ,ii le nom */ - jj = nb_file * l_tab; - kk = 0; - if (directory[0] != '.') { - for (; kkd_name+ii); ii++,jj++,kk++) - *(tab_res + jj) = *(dp->d_name + ii); - /*======= En completant avec blanc ======*/ - for (; kk0 otherwise -* Modif: asi 11/04/90 correction -***********************************************/ - - -#define TRUE 1 -#define FALSE 0 -#define JOKER '*' - -int -strcmp_joker(char *s1, char *s2) -{ - char *c1=NULL,*c2=NULL; /* sauvegardes */ - int res; - int deb = 1; /* 0 si 1er car est le joker, 1 sinon */ - - while (*s2) { - if (*s1 == JOKER) { - deb = 0; - while(*s1 == JOKER) s1++; - if (*s1) { - while(*s2 && *s2 != *s1) s2++; - c1 = s1, c2 = s2; - } - else return(0); /* s1 fini par un jocker */ - } - else { /* comparaison de 2 car */ - res = *s1++ - *s2++; - if (res != 0) { - /* 1ere chaine pas de joker au debut */ - if (deb) return (res); - else { /* on recherche la meme chaine plus loin */ - s1 = c1, s2 = ++c2; - while(*s2 && *s2 != *s1) s2++; - c2 = s2; - } - } - } - } - while(*s1 == JOKER) s1++; - return(*s1 - *s2); -} - -/************************************************** -* FSA date: 26/04/90 -* --- --------- -* -* Titre : COMPAR (ch1,ch2) -* Role : Comparer ch1 avec ch2 -* retourne : 0 si chaines identiques -* >0 si ch2 avant ch1 -* <0 si ch1 avant ch2 -* Modif : -**************************************************/ - -static int -compar(char *ch1, char *ch2) -{ - /* int strcmp(char *cha, const char *chb); */ - - return(strcmp(ch1,ch2)); -} - -/************************************************** -* FSA date: 26/04/90 -* --- --------- -* -* Titre : TRI (taille,list,l_tab) -* Role : Tri un tableau de chaines par ordre -* alphabetique -* Modif : -**************************************************/ - -void -tri(int taille, char *list,int l_tab) -{ - qsort( list , taille , l_tab ,(int (*)(const void *,const void *)) compar ); -} - -#else -// VERSION WNT -// -#include -#include -#include -#include - -#ifdef VAC -#include // added for VAC++ version -ChG 07081997 -#endif - -#ifdef DOS -#include -static struct _find_t zeptr ; - -#else - -#ifdef VAC -static LPWIN32_FIND_DATA zeptr ; -#else -static struct _finddata_t zeptr ; -#endif - -#endif -#ifdef VAC -HANDLE dirp; -#else -ptrdiff_t dirp; -#endif - -char filespec[255]; - - -int -osd_ffi_(char *dir, char *name, char *tab_res, int *max, int l_dir, int l_name, int l_tab) -{ - char file[255], directory[255]; - int ii, jj, kk, nb_file; -#ifdef VAC - BOOL fini ; -#else - int fini ; -#endif - - /***** Le Nom de la directory ******/ - if (*dir == ' ') { - directory[0] = '.'; - directory[1] = '/'; - directory[2] = 0 ; - } - else { - for (ii=0; ii -#include - -#ifdef __cplusplus -extern "C" int symlink ( const _TCHAR*, const _TCHAR* ); -#endif /* __cplusplus */ -/***/ -/******************************* symlink **************************************/ -/***/ -__declspec( dllexport ) int symlink ( const _TCHAR* name1, const _TCHAR* name2 ) { - - return CopyFile ( name1, name2, FALSE ) == TRUE ? 0 : -1; - -} /* end symlink */ -/***/ -/******************************************************************************/ -#endif -