From 28cd7b38cfe2476510c1de876351b7c48158b1b3 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Sat, 12 Mar 2016 08:52:04 -0300 Subject: [PATCH] Adiciona macros para formatar valores em Real. --- lib/util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/util.h b/lib/util.h index 758d67b..754f5de 100644 --- a/lib/util.h +++ b/lib/util.h @@ -71,4 +71,7 @@ static inline int centavos(long long val) return (int) (-val % 100LL); } +#define FMT_R "R$ %lld,%02d" +#define R(l) reais(l), centavos(l) + #endif -- 2.20.1