anon pirms 8 mēnešiem
vecāks
revīzija
9c51f90f10
4 mainītis faili ar 8 papildinājumiem un 11 dzēšanām
  1. +1
    -1
      Makefile
  2. +2
    -0
      chad.mk
  3. +4
    -5
      config.mk
  4. +1
    -5
      source/regex.c

+ 1
- 1
Makefile Parādīt failu

@@ -19,7 +19,7 @@ ${TARGET}: ${HDR} | ${OBJ}
${SRC} ${HDR}:

install: ${PREFIX}
install -v -g ${USER} -o ${USER} -m 744 ${TARGET} ${PREFIX}/bin/
install -v -g ${USER} -o ${USER} -m 744 ${TARGET} ${PREFIX}/

uninstall:
-rm ${PREFIX}/bin/${TARGET}


+ 2
- 0
chad.mk Parādīt failu

@@ -1,3 +1,5 @@
# - ARGS : default flags to test the program with

# Programs to check warnings for as defined by the chad standard

ARGS:=${TARGET} < source/main.c


+ 4
- 5
config.mk Parādīt failu

@@ -1,9 +1,6 @@
# Make script for Chad projects
# This script depends on the following variables
# - TARGET : output program name
# - ARGS : default flags to fork ${OUT} with

PREFIX:=/usr/bin
TARGET:=hl

CFLAGS:=-std=c99
CPPFLAGS:=-Isyntax/ -D_GNU_SOURCE -D_FORTIFY_SOURCE=2
@@ -16,4 +13,6 @@ else
CFLAGS += -O2 -flto=auto
endif

TARGET:=hl
PREFIX:=/usr/bin

USER=$(shell whoami)

+ 1
- 5
source/regex.c Parādīt failu

@@ -444,7 +444,6 @@ int regex_free(regex_t * const regex) {
// -----------------
static bool catch_(const regex_t * const regex,
int * const state) {

for (size_t i = 0; i < regex->catch_table.element_count; i++){
const offshoot_t * const offshoot = *(offshoot_t**)vector_get(&regex->catch_table, i);
if (offshoot->in == *state) {
@@ -458,8 +457,7 @@ static bool catch_(const regex_t * const regex,
static int regex_assert(const regex_t * const regex,
const char * const string,
int state,
int width) {

int * width) {
for (const char * s = string; *s != '\00'; s++) {
// delta
for (size_t i = 0; i < regex->delta_table.element_count; i++) {
@@ -485,7 +483,6 @@ static int regex_assert(const regex_t * const regex,

int regex_match( regex_t * regex,
const char * const string) {

if (regex == NULL) {
return false;
}
@@ -501,4 +498,3 @@ bool regex_search( regex_t * regex,

return (bool)regex_match(regex, string);
}


Notiek ielāde…
Atcelt
Saglabāt