From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail-a.sr.ht; dkim=pass header.d=johnnyrichard.com header.i=@johnnyrichard.com Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [IPv6:2001:41d0:203:375::b3]) by mail-a.sr.ht (Postfix) with ESMTPS id 68B122032D for <~johnnyrichard/olang-devel@lists.sr.ht>; Wed, 28 Feb 2024 18:10:17 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1709143817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KfRXVd23iy3gDOG6e6GsiqCqUbzbKs+HB2ou5LnNr7g=; b=cY3rN3X4VqHAEUjcCMZ1FZKga7gRkehlniNtDUsI9/wZ27veCfX5NFHTGbbyFN7S/8gIIU UiL49XJCZRUgb1wNA0TX4lNruyNOosPE1U7j467+533+rUcHxgNwBYp8W5MeR/O/eLt5kQ pgaixOqMSGw254CUUnCNAHJPhINmcNrn7AvnFQgz2+J7Au+5ida7tEK0f0yxYPv2nOTwCf +CCNDEHuinwyWoxRIt68xcO6gLkyWjGOK7GJ6E6c6ZsbSojLgVvGq+AiVhOEhzrBqZ/5/F AMo6e13KiDGu/IynFjCe4Yv7bhDIZTsAferIsIXwi88xkSAJPlaZbaXGtGjZRA== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang v1 1/4] string_view: add string view formatter for printf fmt Date: Wed, 28 Feb 2024 20:04:18 +0100 Message-ID: <20240228190956.78191-2-johnny@johnnyrichard.com> In-Reply-To: <20240228190956.78191-1-johnny@johnnyrichard.com> References: <20240228190956.78191-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-TUID: jyAT3+SAjfwW Signed-off-by: Johnny Richard --- src/string_view.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/string_view.h b/src/string_view.h index 367ef6b..a212ab9 100644 --- a/src/string_view.h +++ b/src/string_view.h @@ -19,6 +19,10 @@ #include #include +#include + +#define SV_FMT "%.*s" +#define SV_ARG(sv) (int)(sv).size, (sv).chars typedef struct string_view { -- 2.43.2