Update.
This commit is contained in:
parent
8df331445b
commit
ae56266037
2
Makefile
2
Makefile
@ -37,7 +37,7 @@ build_all: build
|
||||
|
||||
|
||||
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
|
||||
|
||||
run:
|
||||
|
@ -144,7 +144,7 @@ char *buffer_to_str(buffer_t *buff) {
|
||||
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);
|
||||
while (n && *s1 == *s2) {
|
||||
n--;
|
||||
@ -191,7 +191,7 @@ char *string_match_option(char *buff, char *options) {
|
||||
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) {
|
||||
return NULL;
|
||||
|
@ -1,10 +1,15 @@
|
||||
#ifndef DOBRE_MAIN
|
||||
#define DOBRE_MAIN
|
||||
#include <rlib.h>
|
||||
|
||||
#include <rprint.h>
|
||||
#include <rtime.h>
|
||||
#include <rmalloc.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#ifndef strdup
|
||||
char *_dobre_strdup(const char *s) {
|
||||
if (!s)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#define RMALLOC_OVERRIDE 0
|
||||
#define RMALLOC_OVERRIDE 1
|
||||
#define RMALLOC_DEBUG 1
|
||||
#include "dobre.h"
|
||||
#define print rprintb
|
||||
|
@ -2,4 +2,9 @@ class String {}
|
||||
|
||||
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