[pango] pango-view: accept comma as well as space as --margin separator



commit 0e0a3a83bfd4d57dced9e75383125d636e49adaa
Author: Behdad Esfahbod <behdad behdad org>
Date:   Thu Apr 9 15:06:06 2015 -0700

    pango-view: accept comma as well as space as --margin separator

 pango-view/viewer-render.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pango-view/viewer-render.c b/pango-view/viewer-render.c
index f2de0aa..89800ff 100644
--- a/pango-view/viewer-render.c
+++ b/pango-view/viewer-render.c
@@ -552,7 +552,7 @@ parse_margin (const char *name G_GNUC_UNUSED,
              gpointer    data G_GNUC_UNUSED,
              GError    **error)
 {
-  switch (sscanf (arg, "%d %d %d %d", &opt_margin_t, &opt_margin_r, &opt_margin_b, &opt_margin_l))
+  switch (sscanf (arg, "%d%*[ ,]%d%*[ ,]%d%*[ ,]%d", &opt_margin_t, &opt_margin_r, &opt_margin_b, 
&opt_margin_l))
   {
     case 0:
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]