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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jmemname.c

?? JPEG source code converts the image into compressed format
?? C
字號:
/*
 * jmemname.c
 *
 * Copyright (C) 1992-1997, Thomas G. Lane.
 * This file is part of the Independent JPEG Group's software.
 * For conditions of distribution and use, see the accompanying README file.
 *
 * This file provides a generic implementation of the system-dependent
 * portion of the JPEG memory manager.  This implementation assumes that
 * you must explicitly construct a name for each temp file.
 * Also, the problem of determining the amount of memory available
 * is shoved onto the user.
 */

#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jmemsys.h"		/* import the system-dependent declarations */

#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare malloc(),free() */
extern void * malloc JPP((size_t size));
extern void free JPP((void *ptr));
#endif

#ifndef SEEK_SET		/* pre-ANSI systems may not define this; */
#define SEEK_SET  0		/* if not, assume 0 is correct */
#endif

#ifdef DONT_USE_B_MODE		/* define mode parameters for fopen() */
#define READ_BINARY	"r"
#define RW_BINARY	"w+"
#else
#ifdef VMS			/* VMS is very nonstandard */
#define READ_BINARY	"rb", "ctx=stm"
#define RW_BINARY	"w+b", "ctx=stm"
#else				/* standard ANSI-compliant case */
#define READ_BINARY	"rb"
#define RW_BINARY	"w+b"
#endif
#endif


/*
 * Selection of a file name for a temporary file.
 * This is system-dependent!
 *
 * The code as given is suitable for most Unix systems, and it is easily
 * modified for most non-Unix systems.  Some notes:
 *  1.  The temp file is created in the directory named by TEMP_DIRECTORY.
 *      The default value is /usr/tmp, which is the conventional place for
 *      creating large temp files on Unix.  On other systems you'll probably
 *      want to change the file location.  You can do this by editing the
 *      #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h.
 *
 *  2.  If you need to change the file name as well as its location,
 *      you can override the TEMP_FILE_NAME macro.  (Note that this is
 *      actually a printf format string; it must contain %s and %d.)
 *      Few people should need to do this.
 *
 *  3.  mktemp() is used to ensure that multiple processes running
 *      simultaneously won't select the same file names.  If your system
 *      doesn't have mktemp(), define NO_MKTEMP to do it the hard way.
 *      (If you don't have <errno.h>, also define NO_ERRNO_H.)
 *
 *  4.  You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c
 *      will cause the temp files to be removed if you stop the program early.
 */

#ifndef TEMP_DIRECTORY		/* can override from jconfig.h or Makefile */
#define TEMP_DIRECTORY  "/usr/tmp/" /* recommended setting for Unix */
#endif

static int next_file_num;	/* to distinguish among several temp files */

#ifdef NO_MKTEMP

#ifndef TEMP_FILE_NAME		/* can override from jconfig.h or Makefile */
#define TEMP_FILE_NAME  "%sJPG%03d.TMP"
#endif

#ifndef NO_ERRNO_H
#include <errno.h>		/* to define ENOENT */
#endif

/* ANSI C specifies that errno is a macro, but on older systems it's more
 * likely to be a plain int variable.  And not all versions of errno.h
 * bother to declare it, so we have to in order to be most portable.  Thus:
 */
#ifndef errno
extern int errno;
#endif


LOCAL(void)
select_file_name (char * fname)
{
  FILE * tfile;

  /* Keep generating file names till we find one that's not in use */
  for (;;) {
    next_file_num++;		/* advance counter */
    sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num);
    if ((tfile = fopen(fname, READ_BINARY)) == NULL) {
      /* fopen could have failed for a reason other than the file not
       * being there; for example, file there but unreadable.
       * If <errno.h> isn't available, then we cannot test the cause.
       */
#ifdef ENOENT
      if (errno != ENOENT)
	continue;
#endif
      break;
    }
    fclose(tfile);		/* oops, it's there; close tfile & try again */
  }
}

#else /* ! NO_MKTEMP */

/* Note that mktemp() requires the initial filename to end in six X's */
#ifndef TEMP_FILE_NAME		/* can override from jconfig.h or Makefile */
#define TEMP_FILE_NAME  "%sJPG%dXXXXXX"
#endif

LOCAL(void)
select_file_name (char * fname)
{
  next_file_num++;		/* advance counter */
  sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num);
  mktemp(fname);		/* make sure file name is unique */
  /* mktemp replaces the trailing XXXXXX with a unique string of characters */
}

#endif /* NO_MKTEMP */


/*
 * Memory allocation and freeing are controlled by the regular library
 * routines malloc() and free().
 */

GLOBAL(void *)
jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
{
  return (void *) malloc(sizeofobject);
}

GLOBAL(void)
jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
{
  free(object);
}


/*
 * "Large" objects are treated the same as "small" ones.
 * NB: although we include FAR keywords in the routine declarations,
 * this file won't actually work in 80x86 small/medium model; at least,
 * you probably won't be able to process useful-size images in only 64KB.
 */

GLOBAL(void FAR *)
jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
{
  return (void FAR *) malloc(sizeofobject);
}

GLOBAL(void)
jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
{
  free(object);
}


/*
 * This routine computes the total memory space available for allocation.
 * It's impossible to do this in a portable way; our current solution is
 * to make the user tell us (with a default value set at compile time).
 * If you can actually get the available space, it's a good idea to subtract
 * a slop factor of 5% or so.
 */

#ifndef DEFAULT_MAX_MEM		/* so can override from makefile */
#define DEFAULT_MAX_MEM		1000000L /* default: one megabyte */
#endif

GLOBAL(long)
jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
		    long max_bytes_needed, long already_allocated)
{
  return cinfo->mem->max_memory_to_use - already_allocated;
}


/*
 * Backing store (temporary file) management.
 * Backing store objects are only used when the value returned by
 * jpeg_mem_available is less than the total space needed.  You can dispense
 * with these routines if you have plenty of virtual memory; see jmemnobs.c.
 */


METHODDEF(void)
read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
		    void FAR * buffer_address,
		    long file_offset, long byte_count)
{
  if (fseek(info->temp_file, file_offset, SEEK_SET))
    ERREXIT(cinfo, JERR_TFILE_SEEK);
  if (JFREAD(info->temp_file, buffer_address, byte_count)
      != (size_t) byte_count)
    ERREXIT(cinfo, JERR_TFILE_READ);
}


METHODDEF(void)
write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
		     void FAR * buffer_address,
		     long file_offset, long byte_count)
{
  if (fseek(info->temp_file, file_offset, SEEK_SET))
    ERREXIT(cinfo, JERR_TFILE_SEEK);
  if (JFWRITE(info->temp_file, buffer_address, byte_count)
      != (size_t) byte_count)
    ERREXIT(cinfo, JERR_TFILE_WRITE);
}


METHODDEF(void)
close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
{
  fclose(info->temp_file);	/* close the file */
  unlink(info->temp_name);	/* delete the file */
/* If your system doesn't have unlink(), use remove() instead.
 * remove() is the ANSI-standard name for this function, but if
 * your system was ANSI you'd be using jmemansi.c, right?
 */
  TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name);
}


/*
 * Initial opening of a backing-store object.
 */

GLOBAL(void)
jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
			 long total_bytes_needed)
{
  select_file_name(info->temp_name);
  if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL)
    ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
  info->read_backing_store = read_backing_store;
  info->write_backing_store = write_backing_store;
  info->close_backing_store = close_backing_store;
  TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
}


/*
 * These routines take care of any system-dependent initialization and
 * cleanup required.
 */

GLOBAL(long)
jpeg_mem_init (j_common_ptr cinfo)
{
  next_file_num = 0;		/* initialize temp file name generator */
  return DEFAULT_MAX_MEM;	/* default for max_memory_to_use */
}

GLOBAL(void)
jpeg_mem_term (j_common_ptr cinfo)
{
  /* no work */
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲h精品动漫在线观看| 国产一区久久久| 国内精品第一页| 菠萝蜜视频在线观看一区| 欧美性一二三区| 五月天一区二区三区| 视频一区国产视频| 不卡的av网站| 久久久不卡影院| 奇米色一区二区| 欧美日韩三级一区二区| 国产精品传媒在线| 国产精品一区专区| 精品国产三级a在线观看| 婷婷中文字幕综合| 欧美日韩午夜影院| 亚洲最色的网站| 色哟哟在线观看一区二区三区| 国产欧美一区二区三区网站| 久久精品久久精品| 欧美高清dvd| 三级不卡在线观看| 欧美日韩高清在线| 视频一区二区三区入口| 欧美日韩综合一区| 亚洲一区二区三区三| 91香蕉视频黄| 亚洲精品久久久久久国产精华液| 波多野结衣一区二区三区| 久久久久久亚洲综合影院红桃| 久久国产免费看| 精品国产髙清在线看国产毛片| 久久99精品久久久久| 2021中文字幕一区亚洲| 国产在线看一区| 久久品道一品道久久精品| 国产黄人亚洲片| 国产女同互慰高潮91漫画| av电影在线观看一区| 国产精品二三区| 欧美亚洲高清一区二区三区不卡| 一区二区不卡在线播放 | 国产精品情趣视频| 成人av影视在线观看| 亚洲人午夜精品天堂一二香蕉| 欧美性受极品xxxx喷水| 免费成人在线网站| 精品蜜桃在线看| 国产91精品在线观看| 中文字幕日本不卡| 欧美色图第一页| 黑人巨大精品欧美黑白配亚洲 | 欧美福利视频导航| 免费观看成人鲁鲁鲁鲁鲁视频| 久久免费美女视频| 99免费精品视频| 亚洲v日本v欧美v久久精品| 欧美一区二区三区四区在线观看| 韩国欧美一区二区| 亚洲色图在线看| 欧美一区永久视频免费观看| 国精产品一区一区三区mba桃花| 国产精品高潮呻吟久久| 欧美高清视频www夜色资源网| 国产一区在线观看麻豆| 一区二区三区四区不卡在线| 日韩一级黄色大片| va亚洲va日韩不卡在线观看| 日日夜夜精品视频免费| 国产免费观看久久| 欧美一区二区三区视频| 成人午夜av电影| 青青草原综合久久大伊人精品 | 国产精品综合视频| 伊人性伊人情综合网| 精品裸体舞一区二区三区| 92精品国产成人观看免费| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲免费观看视频| 国产视频一区不卡| 欧美日韩和欧美的一区二区| 成人精品视频一区二区三区尤物| 日韩av一区二区三区四区| 亚洲蜜臀av乱码久久精品| 久久蜜桃av一区二区天堂| 欧美日韩一级二级三级| av影院午夜一区| 国产主播一区二区三区| 日本一区中文字幕| 亚洲精品精品亚洲| 国产精品乱子久久久久| 日韩欧美国产1| 欧美久久久一区| 日本道色综合久久| 99re热视频这里只精品| 粗大黑人巨茎大战欧美成人| 六月丁香综合在线视频| 五月婷婷久久综合| 亚洲国产视频在线| 一区二区三区**美女毛片| 中文字幕亚洲在| 国产天堂亚洲国产碰碰| 精品sm捆绑视频| 日韩免费观看2025年上映的电影| 欧美在线一区二区| 色999日韩国产欧美一区二区| 成人精品亚洲人成在线| 国产成人av资源| 国产成人av一区二区三区在线观看| 麻豆精品视频在线观看免费| 日韩高清不卡一区| 毛片一区二区三区| 久久国产综合精品| 麻豆91精品91久久久的内涵| 蜜桃久久久久久| 美女任你摸久久| 久久精品国产精品亚洲精品| 美女精品自拍一二三四| 韩国一区二区三区| 国产精品一区免费在线观看| 国产成人精品影院| 成人av集中营| 在线免费观看视频一区| 精品视频999| 91麻豆精品国产| 精品欧美一区二区久久| 久久久久国产免费免费 | 午夜欧美视频在线观看 | 欧美一卡二卡在线观看| 日韩欧美一区二区视频| 久久夜色精品一区| 亚洲欧美综合网| 一区二区三区免费看视频| 午夜婷婷国产麻豆精品| 麻豆91精品视频| 成人综合在线观看| 91日韩精品一区| 欧美日韩精品一区二区三区 | 国产精品污网站| 亚洲图片欧美一区| 理论片日本一区| 不卡大黄网站免费看| 欧美日韩激情在线| 久久久不卡网国产精品一区| 亚洲男人的天堂在线aⅴ视频| 天天综合色天天综合色h| 国精品**一区二区三区在线蜜桃| 99精品在线观看视频| 91精品国产综合久久久蜜臀粉嫩| www成人在线观看| 亚洲在线一区二区三区| 国产麻豆精品95视频| 色琪琪一区二区三区亚洲区| 欧美一区二区三区的| 国产精品毛片高清在线完整版| 亚洲综合视频在线观看| 精品午夜一区二区三区在线观看| 99国产精品国产精品久久| 日韩欧美综合在线| 亚洲免费观看高清完整版在线| 免费精品视频在线| 一本大道久久a久久综合| 欧美精品一区二区三区高清aⅴ| 亚洲精品中文在线影院| 国产99久久久国产精品| 日韩一区二区影院| 亚洲一区二区在线免费观看视频 | 国产午夜久久久久| 日韩国产成人精品| 色婷婷精品久久二区二区蜜臂av| 精品久久一二三区| 亚洲大片一区二区三区| av亚洲产国偷v产偷v自拍| 精品久久久久av影院| 亚洲主播在线播放| 成人97人人超碰人人99| 欧美videossexotv100| 亚洲成人第一页| 欧洲精品视频在线观看| 亚洲欧洲美洲综合色网| 国产91精品入口| 久久精品夜色噜噜亚洲a∨| 麻豆精品国产91久久久久久| 欧美日韩一区三区四区| 亚洲伦理在线免费看| 成人性生交大片免费看中文| 久久夜色精品国产噜噜av | 亚洲高清免费观看 | 久久久久久97三级| 黄色小说综合网站| 欧美成人一区二区三区| 日本视频中文字幕一区二区三区 | 色综合天天综合色综合av| 国产精品女同互慰在线看| 国产精品99久久不卡二区| 精品国产成人在线影院| 国产一区二区视频在线| 久久嫩草精品久久久精品| 国产一区二区三区视频在线播放| 日韩一区国产二区欧美三区|