Subversion Repositories SvarDOS

Rev

Rev 314 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 314 Rev 562
Line 1... Line 1...
1
/*
1
/*
2
  SvarDOS repo index builder
2
  SvarDOS repo index builder
3
  Copyright (C) Mateusz Viste 2012-2021
3
  Copyright (C) Mateusz Viste 2012-2022
4

4

5
  buildidx computes an index tsv file for the SvarDOS repository.
5
  buildidx computes an index tsv file for the SvarDOS repository.
6
  it must be executed pointing to a directory that stores packages (zip)
6
  it must be executed pointing to a directory that stores packages (zip)
7
  files. buildidx will generate the index file and save it into the package
7
  files. buildidx will generate the index file and save it into the package
8
  repository.
8
  repository.
Line 31... Line 31...
31
#include <time.h>    /* time(), ctime() */
31
#include <time.h>    /* time(), ctime() */
32
#include <unistd.h>  /* read() */
32
#include <unistd.h>  /* read() */
33
#include <dirent.h>
33
#include <dirent.h>
34
#include <sys/types.h>
34
#include <sys/types.h>
35
 
35
 
36
#define pVer "2021-02-11"
36
#define pVer "2022-01-20"
37
 
37
 
38
 
38
 
39
/* computes the BSD sum of a file and returns it. returns 0 on error. */
39
/* computes the BSD sum of a file and returns it. returns 0 on error. */
40
static uint16_t file2bsum(const char *filename) {
40
static uint16_t file2bsum(const char *filename) {
41
  uint16_t result = 0;
41
  uint16_t result = 0;