adler32.c
来自「linux下建立JAVA虚拟机的源码KAFFE」· C语言 代码 · 共 38 行
C
38 行
/* * java.util.zip.Adler32.c * * Copyright (c) 1996, 1997 * Transvirtual Technologies, Inc. All rights reserved. * * See the file "license.terms" for information on usage and redistribution * of this file. */#include "config.h"#include "config-std.h"#include "config-mem.h"#include <native.h>#include "java_util_zip_Adler32.h"#include "gtypes.h"#include <zlib.h>voidjava_util_zip_Adler32_update(struct Hjava_util_zip_Adler32* this, HArrayOfByte* buf, jint from, jint len){ // XXX What happens if out of bounds ? if (from >= 0 && len > 0 && from + len <= obj_length(buf)) { unhand(this)->adler = adler32((uint32)unhand(this)->adler, &unhand_array(buf)->body[from], (unsigned)len); }}voidjava_util_zip_Adler32_update1(struct Hjava_util_zip_Adler32* this, jint val){ jbyte b; b = val; unhand(this)->adler = adler32((uint32)unhand(this)->adler, &b, sizeof(b));}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?