'file-attribute-device-number'
+++
-** The new function `buffer-hash' has been added, and can be used to
+** The new function 'buffer-hash' has been added, and can be used to
compute a fash, non-consing hash of the contents of a buffer.
---
-** `fill-paragraph' no longer marks the buffer as changed unless it
+** 'fill-paragraph' no longer marks the buffer as changed unless it
actually changed something.
---
#include "sha256.h"
#include "sha512.h"
-Lisp_Object
+static Lisp_Object
make_digest_string (Lisp_Object digest, int digest_size)
{
unsigned char *p = SDATA (digest);
- int i;
- for (i = digest_size - 1; i >= 0; i--)
+ for (int i = digest_size - 1; i >= 0; i--)
{
static char const hexdigit[16] = "0123456789abcdef";
int p_i = p[i];
Lisp_Object end, Lisp_Object coding_system, Lisp_Object noerror,
Lisp_Object binary)
{
- int i;
ptrdiff_t size, start_char = 0, start_byte, end_char = 0, end_byte;
register EMACS_INT b, e;
register struct buffer *bp;
Lisp_Object buffer;
struct buffer *b;
struct sha1_ctx ctx;
- Lisp_Object digest = make_uninit_string (SHA1_DIGEST_SIZE * 2);
if (NILP (buffer_or_name))
buffer = Fcurrent_buffer ();
BUF_Z_ADDR (b) - BUF_GAP_END_ADDR (b),
&ctx);
+ Lisp_Object digest = make_uninit_string (SHA1_DIGEST_SIZE * 2);
sha1_finish_ctx (&ctx, SSDATA (digest));
return make_digest_string (digest, SHA1_DIGEST_SIZE);
}