Update.
This commit is contained in:
parent
8df331445b
commit
ae56266037
2
Makefile
2
Makefile
@ -37,7 +37,7 @@ build_all: build
|
|||||||
|
|
||||||
|
|
||||||
build_fast:
|
build_fast:
|
||||||
$(CC) $(SRC)main.c -o dobre -Werror -std=c17
|
$(CC) $(CFLAGS) $(SRC)main.c -o dobre -Werror -std=c17
|
||||||
cp dobre ./bin/dobre
|
cp dobre ./bin/dobre
|
||||||
|
|
||||||
run:
|
run:
|
||||||
|
@ -144,7 +144,7 @@ char *buffer_to_str(buffer_t *buff) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
char ustrncmp2(const char *s1, const char *s2, size_t n) {
|
char ustrncmp2(const unsigned char *s1, const unsigned char *s2, size_t n) {
|
||||||
return strncmp((char *)s1, (char *)s2, n);
|
return strncmp((char *)s1, (char *)s2, n);
|
||||||
while (n && *s1 == *s2) {
|
while (n && *s1 == *s2) {
|
||||||
n--;
|
n--;
|
||||||
@ -191,7 +191,7 @@ char *string_match_option(char *buff, char *options) {
|
|||||||
return buff;
|
return buff;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ustrncmp((const unsigned char *)buff, (const unsigned char *)option, option_length)) {
|
if (!ustrncmp2((const unsigned char *)buff, (const unsigned char *)option, option_length)) {
|
||||||
|
|
||||||
if (reverse) {
|
if (reverse) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
#ifndef DOBRE_MAIN
|
#ifndef DOBRE_MAIN
|
||||||
#define DOBRE_MAIN
|
#define DOBRE_MAIN
|
||||||
#include <rlib.h>
|
|
||||||
|
#include <rprint.h>
|
||||||
|
#include <rtime.h>
|
||||||
|
#include <rmalloc.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
#ifndef strdup
|
#ifndef strdup
|
||||||
char *_dobre_strdup(const char *s) {
|
char *_dobre_strdup(const char *s) {
|
||||||
if (!s)
|
if (!s)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define RMALLOC_OVERRIDE 0
|
#define RMALLOC_OVERRIDE 1
|
||||||
#define RMALLOC_DEBUG 1
|
#define RMALLOC_DEBUG 1
|
||||||
#include "dobre.h"
|
#include "dobre.h"
|
||||||
#define print rprintb
|
#define print rprintb
|
||||||
|
@ -2,4 +2,9 @@ class String {}
|
|||||||
|
|
||||||
String pony(){}
|
String pony(){}
|
||||||
|
|
||||||
pony(String arg1, String arg2 = "with_value"){}
|
pony(String arg1, String arg2 = "with_value"){
|
||||||
|
String d = "AAA"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user