libcdio.git - libcdio

index : libcdio.git
libcdio
summary refs log tree commit diff
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2024年12月20日 16:54:05 +0100
committerPete Batard <pete@akeo.ie>2024年12月21日 11:47:09 +0100
commit4f327257a63ad9ff05ab7ca4a793dce9c7dd7f4f (patch)
tree40bdd4232d7d9a903c17b4a49edf9f3c5eec6bcc
parent5e6bdcb5fcb99790fbb27e27b28801ed1d51adcb (diff)
downloadlibcdio-4f327257a63ad9ff05ab7ca4a793dce9c7dd7f4f.tar.gz
Use "..." and "__VA_ARGS__" for variadic macros
"..." and "__VA_ARGS__" is pretty much standard and supported by compilers like MSVC whereas "args..." and "##args" isn't.
Diffstat
-rw-r--r--src/util.h 14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/util.h b/src/util.h
index c554c3b7..f69dce89 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003, 2004, 2005, 2008, 2011, 2012
+ Copyright (C) 2003, 2004, 2005, 2008, 2011, 2012, 2024
Rocky Bernstein <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
@@ -86,17 +86,17 @@
#define DEBUG 1
#if DEBUG
-#define dbg_print(level, s, args...) \
+#define dbg_print(level, s, ...) \
if (opts.debug_level >= level) \
- report(stderr, "%s: "s, __func__ , ##args)
+ report(stderr, "%s: "s, __func__ , __VA_ARGS__)
#else
#define dbg_print(level, s, args...)
#endif
-#define err_exit(fmt, args...) \
- report(stderr, "%s: "fmt, program_name, ##args); \
- myexit(p_cdio, EXIT_FAILURE)
-
+#define err_exit(fmt, ...) \
+ report(stderr, "%s: "fmt, program_name, __VA_ARGS__); \
+ myexit(p_cdio, EXIT_FAILURE)
+
typedef enum
{
INPUT_AUTO,
generated by cgit v1.2.3 (git 2.25.1) at 2025年10月03日 23:41:43 +0000

AltStyle によって変換されたページ (->オリジナル) /