亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? relocatable.c

?? 研讀AxCrypt對加解密的處理方法
?? C
字號:
/* Provide relocatable packages.
   Copyright (C) 2003-2004 Free Software Foundation, Inc.
   Written by Bruno Haible <bruno@clisp.org>, 2003.

   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU Library General Public License as published
   by the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
   USA.  */


/* Tell glibc's <stdio.h> to provide a prototype for getline().
   This must come before <config.h> because <config.h> may include
   <features.h>, and once <features.h> has been included, it's too late.  */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE	1
#endif

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

/* Specification.  */
#include "relocatable.h"

#if ENABLE_RELOCATABLE

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifdef NO_XMALLOC
# define xmalloc malloc
#else
# include "xalloc.h"
#endif

#if defined _WIN32 || defined __WIN32__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif

#if DEPENDS_ON_LIBCHARSET
# include <libcharset.h>
#endif
#if DEPENDS_ON_LIBICONV && HAVE_ICONV
# include <iconv.h>
#endif
#if DEPENDS_ON_LIBINTL && ENABLE_NLS
# include <libintl.h>
#endif

/* Faked cheap 'bool'.  */
#undef bool
#undef false
#undef true
#define bool int
#define false 0
#define true 1

/* Pathname support.
   ISSLASH(C)           tests whether C is a directory separator character.
   IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.
 */
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
  /* Win32, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
# define HAS_DEVICE(P) \
    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
     && (P)[1] == ':')
# define IS_PATH_WITH_DIR(P) \
    (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
#else
  /* Unix */
# define ISSLASH(C) ((C) == '/')
# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
# define FILE_SYSTEM_PREFIX_LEN(P) 0
#endif

/* Original installation prefix.  */
static char *orig_prefix;
static size_t orig_prefix_len;
/* Current installation prefix.  */
static char *curr_prefix;
static size_t curr_prefix_len;
/* These prefixes do not end in a slash.  Anything that will be concatenated
   to them must start with a slash.  */

/* Sets the original and the current installation prefix of this module.
   Relocation simply replaces a pathname starting with the original prefix
   by the corresponding pathname with the current prefix instead.  Both
   prefixes should be directory names without trailing slash (i.e. use ""
   instead of "/").  */
static void
set_this_relocation_prefix (const char *orig_prefix_arg,
			    const char *curr_prefix_arg)
{
  if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
      /* Optimization: if orig_prefix and curr_prefix are equal, the
	 relocation is a nop.  */
      && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
    {
      /* Duplicate the argument strings.  */
      char *memory;

      orig_prefix_len = strlen (orig_prefix_arg);
      curr_prefix_len = strlen (curr_prefix_arg);
      memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
#ifdef NO_XMALLOC
      if (memory != NULL)
#endif
	{
	  memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
	  orig_prefix = memory;
	  memory += orig_prefix_len + 1;
	  memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
	  curr_prefix = memory;
	  return;
	}
    }
  orig_prefix = NULL;
  curr_prefix = NULL;
  /* Don't worry about wasted memory here - this function is usually only
     called once.  */
}

/* Sets the original and the current installation prefix of the package.
   Relocation simply replaces a pathname starting with the original prefix
   by the corresponding pathname with the current prefix instead.  Both
   prefixes should be directory names without trailing slash (i.e. use ""
   instead of "/").  */
void
set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
{
  set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);

  /* Now notify all dependent libraries.  */
#if DEPENDS_ON_LIBCHARSET
  libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
#endif
#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
  libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
#endif
#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
  libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
#endif
}

#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)

/* Convenience function:
   Computes the current installation prefix, based on the original
   installation prefix, the original installation directory of a particular
   file, and the current pathname of this file.  Returns NULL upon failure.  */
#ifdef IN_LIBRARY
#define compute_curr_prefix local_compute_curr_prefix
static
#endif
const char *
compute_curr_prefix (const char *orig_installprefix,
		     const char *orig_installdir,
		     const char *curr_pathname)
{
  const char *curr_installdir;
  const char *rel_installdir;

  if (curr_pathname == NULL)
    return NULL;

  /* Determine the relative installation directory, relative to the prefix.
     This is simply the difference between orig_installprefix and
     orig_installdir.  */
  if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
      != 0)
    /* Shouldn't happen - nothing should be installed outside $(prefix).  */
    return NULL;
  rel_installdir = orig_installdir + strlen (orig_installprefix);

  /* Determine the current installation directory.  */
  {
    const char *p_base = curr_pathname + FILE_SYSTEM_PREFIX_LEN (curr_pathname);
    const char *p = curr_pathname + strlen (curr_pathname);
    char *q;

    while (p > p_base)
      {
	p--;
	if (ISSLASH (*p))
	  break;
      }

    q = (char *) xmalloc (p - curr_pathname + 1);
#ifdef NO_XMALLOC
    if (q == NULL)
      return NULL;
#endif
    memcpy (q, curr_pathname, p - curr_pathname);
    q[p - curr_pathname] = '\0';
    curr_installdir = q;
  }

  /* Compute the current installation prefix by removing the trailing
     rel_installdir from it.  */
  {
    const char *rp = rel_installdir + strlen (rel_installdir);
    const char *cp = curr_installdir + strlen (curr_installdir);
    const char *cp_base =
      curr_installdir + FILE_SYSTEM_PREFIX_LEN (curr_installdir);

    while (rp > rel_installdir && cp > cp_base)
      {
	bool same = false;
	const char *rpi = rp;
	const char *cpi = cp;

	while (rpi > rel_installdir && cpi > cp_base)
	  {
	    rpi--;
	    cpi--;
	    if (ISSLASH (*rpi) || ISSLASH (*cpi))
	      {
		if (ISSLASH (*rpi) && ISSLASH (*cpi))
		  same = true;
		break;
	      }
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
	    /* Win32, Cygwin, OS/2, DOS - case insignificant filesystem */
	    if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
		!= (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
	      break;
#else
	    if (*rpi != *cpi)
	      break;
#endif
	  }
	if (!same)
	  break;
	/* The last pathname component was the same.  opi and cpi now point
	   to the slash before it.  */
	rp = rpi;
	cp = cpi;
      }

    if (rp > rel_installdir)
      /* Unexpected: The curr_installdir does not end with rel_installdir.  */
      return NULL;

    {
      size_t curr_prefix_len = cp - curr_installdir;
      char *curr_prefix;

      curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
#ifdef NO_XMALLOC
      if (curr_prefix == NULL)
	return NULL;
#endif
      memcpy (curr_prefix, curr_installdir, curr_prefix_len);
      curr_prefix[curr_prefix_len] = '\0';

      return curr_prefix;
    }
  }
}

#endif /* !IN_LIBRARY || PIC */

#if defined PIC && defined INSTALLDIR

/* Full pathname of shared library, or NULL.  */
static char *shared_library_fullname;

#if defined _WIN32 || defined __WIN32__

/* Determine the full pathname of the shared library when it is loaded.  */

BOOL WINAPI
DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
{
  (void) reserved;

  if (event == DLL_PROCESS_ATTACH)
    {
      /* The DLL is being loaded into an application's address range.  */
      static char location[MAX_PATH];

      if (!GetModuleFileName (module_handle, location, sizeof (location)))
	/* Shouldn't happen.  */
	return FALSE;

      if (!IS_PATH_WITH_DIR (location))
	/* Shouldn't happen.  */
	return FALSE;

      shared_library_fullname = strdup (location);
    }

  return TRUE;
}

#else /* Unix */

static void
find_shared_library_fullname ()
{
#if defined __linux__ && __GLIBC__ >= 2
  /* Linux has /proc/self/maps. glibc 2 has the getline() function.  */
  FILE *fp;

  /* Open the current process' maps file.  It describes one VMA per line.  */
  fp = fopen ("/proc/self/maps", "r");
  if (fp)
    {
      unsigned long address = (unsigned long) &find_shared_library_fullname;
      for (;;)
	{
	  unsigned long start, end;
	  int c;

	  if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
	    break;
	  if (address >= start && address <= end - 1)
	    {
	      /* Found it.  Now see if this line contains a filename.  */
	      while (c = getc (fp), c != EOF && c != '\n' && c != '/')
		continue;
	      if (c == '/')
		{
		  size_t size;
		  int len;

		  ungetc (c, fp);
		  shared_library_fullname = NULL; size = 0;
		  len = getline (&shared_library_fullname, &size, fp);
		  if (len >= 0)
		    {
		      /* Success: filled shared_library_fullname.  */
		      if (len > 0 && shared_library_fullname[len - 1] == '\n')
			shared_library_fullname[len - 1] = '\0';
		    }
		}
	      break;
	    }
	  while (c = getc (fp), c != EOF && c != '\n')
	    continue;
	}
      fclose (fp);
    }
#endif
}

#endif /* WIN32 / Unix */

/* Return the full pathname of the current shared library.
   Return NULL if unknown.
   Guaranteed to work only on Linux and Woe32.  */
static char *
get_shared_library_fullname ()
{
#if !(defined _WIN32 || defined __WIN32__)
  static bool tried_find_shared_library_fullname;
  if (!tried_find_shared_library_fullname)
    {
      find_shared_library_fullname ();
      tried_find_shared_library_fullname = true;
    }
#endif
  return shared_library_fullname;
}

#endif /* PIC */

/* Returns the pathname, relocated according to the current installation
   directory.  */
const char *
relocate (const char *pathname)
{
#if defined PIC && defined INSTALLDIR
  static int initialized;

  /* Initialization code for a shared library.  */
  if (!initialized)
    {
      /* At this point, orig_prefix and curr_prefix likely have already been
	 set through the main program's set_program_name_and_installdir
	 function.  This is sufficient in the case that the library has
	 initially been installed in the same orig_prefix.  But we can do
	 better, to also cover the cases that 1. it has been installed
	 in a different prefix before being moved to orig_prefix and (later)
	 to curr_prefix, 2. unlike the program, it has not moved away from
	 orig_prefix.  */
      const char *orig_installprefix = INSTALLPREFIX;
      const char *orig_installdir = INSTALLDIR;
      const char *curr_prefix_better;

      curr_prefix_better =
	compute_curr_prefix (orig_installprefix, orig_installdir,
			     get_shared_library_fullname ());
      if (curr_prefix_better == NULL)
	curr_prefix_better = curr_prefix;

      set_relocation_prefix (orig_installprefix, curr_prefix_better);

      initialized = 1;
    }
#endif

  /* Note: It is not necessary to perform case insensitive comparison here,
     even for DOS-like filesystems, because the pathname argument was
     typically created from the same Makefile variable as orig_prefix came
     from.  */
  if (orig_prefix != NULL && curr_prefix != NULL
      && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
    {
      if (pathname[orig_prefix_len] == '\0')
	/* pathname equals orig_prefix.  */
	return curr_prefix;
      if (ISSLASH (pathname[orig_prefix_len]))
	{
	  /* pathname starts with orig_prefix.  */
	  const char *pathname_tail = &pathname[orig_prefix_len];
	  char *result =
	    (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);

#ifdef NO_XMALLOC
	  if (result != NULL)
#endif
	    {
	      memcpy (result, curr_prefix, curr_prefix_len);
	      strcpy (result + curr_prefix_len, pathname_tail);
	      return result;
	    }
	}
    }
  /* Nothing to relocate.  */
  return pathname;
}

#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩有码一区二区三区| 日韩一区二区在线观看| 久草精品在线观看| 亚洲国产精品一区二区www| 国产精品剧情在线亚洲| 久久久久久**毛片大全| 久久精品夜夜夜夜久久| 国产欧美日韩激情| 欧美国产日本视频| 亚洲视频香蕉人妖| 一区二区三区四区不卡在线| 亚洲人成在线观看一区二区| 亚洲老司机在线| 亚洲成人av电影| 美女免费视频一区| 久久99久国产精品黄毛片色诱| 久久精品国产免费看久久精品| 精品一区二区三区久久久| 国产麻豆一精品一av一免费| 国产成人激情av| 91网站最新地址| 欧美日韩国产综合草草| 精品国一区二区三区| 国产婷婷色一区二区三区| 中文字幕在线免费不卡| 亚洲一区二区三区激情| 免费在线成人网| av在线一区二区三区| 欧美午夜免费电影| 精品处破学生在线二十三| 最新国产の精品合集bt伙计| 亚洲福利视频一区二区| 国产一区啦啦啦在线观看| 91麻豆文化传媒在线观看| 欧美日韩视频一区二区| 久久综合久久综合九色| 亚洲欧美日韩国产成人精品影院| 午夜精品一区二区三区免费视频 | 日韩欧美国产综合一区| 欧美刺激午夜性久久久久久久| 国产欧美日韩中文久久| 一区二区三区视频在线观看| 激情六月婷婷综合| 北条麻妃一区二区三区| 日韩午夜在线观看| 一区二区三区在线观看欧美| 激情五月激情综合网| 欧美一a一片一级一片| 亚洲精品在线电影| 亚洲国产精品麻豆| 成人在线视频首页| 精品国产在天天线2019| 一区二区三区欧美亚洲| 国产精品996| 欧美日韩www| 国产精品成人免费精品自在线观看| 裸体一区二区三区| 色先锋资源久久综合| 国产日韩精品一区| 另类综合日韩欧美亚洲| 欧美高清你懂得| 亚洲国产精品精华液网站| 99久久精品国产一区二区三区| 久久亚洲精品小早川怜子| 五月婷婷综合网| 欧美日韩在线直播| 亚洲伦在线观看| av电影在线观看完整版一区二区| 久久午夜国产精品| 久久国产精品99精品国产| 91精品国产综合久久久久| 亚洲图片自拍偷拍| 欧美亚洲综合一区| 亚洲成在线观看| 欧美欧美欧美欧美| 一区二区三区不卡视频| 在线视频国内自拍亚洲视频| 亚洲美女少妇撒尿| 91国偷自产一区二区三区观看| 国产精品福利一区| 成人国产精品免费观看动漫| 不卡的av电影| 日本一区二区三区国色天香| 美美哒免费高清在线观看视频一区二区 | 国产主播一区二区| 欧美大片免费久久精品三p| 美日韩黄色大片| 91精品国产91久久久久久一区二区| 视频在线观看一区| 欧美性猛交xxxxxx富婆| 亚洲私人影院在线观看| 色视频成人在线观看免| 国产精品国产三级国产普通话三级| 97精品视频在线观看自产线路二| 亚洲天堂精品视频| 欧美精品日韩一本| 国产原创一区二区三区| 国产精品视频免费| 91啦中文在线观看| 亚洲激情在线播放| 欧美老年两性高潮| 九色|91porny| 亚洲欧洲一区二区在线播放| 色婷婷av一区二区三区gif| 亚洲午夜精品一区二区三区他趣| 成人av在线一区二区| 亚洲色图都市小说| 欧美亚洲日本国产| 另类小说视频一区二区| 国产日产亚洲精品系列| 色系网站成人免费| 人人爽香蕉精品| 国产精品成人免费在线| 欧美日韩亚洲综合一区| 久久国产精品第一页| 中文字幕一区二区在线观看| 欧美老肥妇做.爰bbww视频| 激情综合色综合久久| 亚洲欧美另类小说| wwwwww.欧美系列| 欧美亚洲高清一区二区三区不卡| 国产乱理伦片在线观看夜一区| 亚洲乱码国产乱码精品精98午夜| 精品国产一区二区三区忘忧草| 一本大道久久a久久精二百 | 91美女视频网站| 激情六月婷婷综合| 首页欧美精品中文字幕| 亚洲国产成人私人影院tom| 欧美丰满嫩嫩电影| av电影一区二区| 国产精品自拍av| 日本大胆欧美人术艺术动态| 综合在线观看色| 久久精品一区四区| 欧美大片在线观看一区二区| 一本大道久久精品懂色aⅴ| 国产一区二区三区四区五区入口| 天天色综合天天| 亚洲综合色自拍一区| 国产人妖乱国产精品人妖| 日韩欧美一二三| 日韩女优av电影在线观看| 欧美人动与zoxxxx乱| 欧美日韩专区在线| 欧美性三三影院| 欧美体内she精高潮| 色婷婷亚洲一区二区三区| 风间由美性色一区二区三区| 国产一区二区三区免费| 激情综合网天天干| 精品一区二区免费看| 国产综合久久久久影院| 国产自产2019最新不卡| 精品一区二区久久| 精品一区二区三区视频| 日韩成人av影视| 六月婷婷色综合| 麻豆中文一区二区| 黑人巨大精品欧美一区| 美国十次了思思久久精品导航| 热久久一区二区| 久久不见久久见免费视频7| 精品一二三四区| 成人小视频免费在线观看| jlzzjlzz欧美大全| 色视频一区二区| 在线播放91灌醉迷j高跟美女 | 91在线视频播放地址| 不卡一卡二卡三乱码免费网站| 激情综合色播五月| 国产suv精品一区二区883| 成人久久视频在线观看| 91丨九色丨蝌蚪富婆spa| 91久久精品网| 精品久久久久久无| 国产精品免费丝袜| 一级日本不卡的影视| 日韩精品视频网| 久久97超碰色| 91一区二区在线| 欧美久久久影院| 久久久久久久综合日本| 中文字幕亚洲欧美在线不卡| 亚洲一二三四在线| 韩国av一区二区三区四区| 成人深夜在线观看| 欧美色综合影院| 国产亚洲婷婷免费| 一区二区三区在线影院| 激情偷乱视频一区二区三区| 99久久综合色| 精品国产亚洲在线| 樱花草国产18久久久久| 九九九精品视频| 欧美在线观看视频一区二区三区| 亚洲精品一区二区三区香蕉| 亚洲一二三四久久| 高清在线观看日韩| 日韩一区二区三区av|