File: buffer_seek.c

package info (click to toggle)
libowfat 0.32-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,544 kB
  • sloc: ansic: 17,551; makefile: 14
file content (8 lines) | stat: -rw-r--r-- 139 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
#include "buffer.h"

void buffer_seek(buffer* b,size_t len) {
  size_t n=b->p+len;
  if (n<b->p) n=b->p;
  if (n>b->n) n=b->n;
  b->p=n;
}