File: seek_set.c

package info (click to toggle)
socklog 2.1.0%2Brepack-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,128 kB
  • sloc: ansic: 3,422; sh: 362; makefile: 323
file content (10 lines) | stat: -rw-r--r-- 206 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
/* Public domain. */

#include <sys/types.h>
#include <unistd.h>
#include "seek.h"

#define SET 0 /* sigh */

int seek_set(int fd,seek_pos pos)
{ if (lseek(fd,(off_t) pos,SET) == -1) return -1; return 0; }