[hackers] [libgrapheme] Apply format || Laslo Hunhold

2023-05-12 Thread git
commit 0d043e0a0cd062ea09d8238b33a97049fea9bc8b
Author: Laslo Hunhold 
AuthorDate: Thu Nov 24 13:29:10 2022 +0100
Commit: Laslo Hunhold 
CommitDate: Thu Nov 24 13:29:10 2022 +0100

Apply format

Signed-off-by: Laslo Hunhold 

diff --git a/grapheme.h b/grapheme.h
index d0ec863..8974d4d 100644
--- a/grapheme.h
+++ b/grapheme.h
@@ -15,22 +15,23 @@ enum grapheme_bidirectional_override {
GRAPHEME_BIDIRECTIONAL_OVERRIDE_RTL,
 };
 
-void grapheme_bidirectional_get_line_embedding_levels(
-   const uint_least32_t *, size_t, int_least8_t *);
+void grapheme_bidirectional_get_line_embedding_levels(const uint_least32_t *,
+  size_t, int_least8_t *);
 
-size_t grapheme_bidirectional_preprocess(
-   const uint_least32_t *, size_t, enum grapheme_bidirectional_override,
-   uint_least32_t *, size_t);
-size_t grapheme_bidirectional_preprocess_utf8(
-   const char *, size_t, enum grapheme_bidirectional_override,
-   uint_least32_t *, size_t);
+size_t grapheme_bidirectional_preprocess(const uint_least32_t *, size_t,
+ enum grapheme_bidirectional_override,
+ uint_least32_t *, size_t);
+size_t
+grapheme_bidirectional_preprocess_utf8(const char *, size_t,
+   enum grapheme_bidirectional_override,
+   uint_least32_t *, size_t);
 
-size_t grapheme_bidirectional_reorder_line(
-   const uint_least32_t *, const int_least8_t *, size_t,
-   uint_least32_t *, size_t);
-size_t grapheme_bidirectional_reorder_line_utf8(
-   const char *, const int_least8_t *, size_t,
-   char *, size_t);
+size_t grapheme_bidirectional_reorder_line(const uint_least32_t *,
+   const int_least8_t *, size_t,
+   uint_least32_t *, size_t);
+size_t grapheme_bidirectional_reorder_line_utf8(const char *,
+const int_least8_t *, size_t,
+char *, size_t);
 
 size_t grapheme_decode_utf8(const char *, size_t, uint_least32_t *);
 size_t grapheme_encode_utf8(uint_least32_t, char *, size_t);
diff --git a/src/bidirectional.c b/src/bidirectional.c
index ac97b3c..b11974b 100644
--- a/src/bidirectional.c
+++ b/src/bidirectional.c
@@ -10,7 +10,7 @@
 
 enum state_type {
STATE_PROP,/* in 0..23, bidi_property */
-   STATE_PRESERVED_PROP,  /* in 0..23, preserved bidi_property for 
L1-rules */
+   STATE_PRESERVED_PROP,  /* in 0..23, preserved bidi_prop for L1-rule */
STATE_BRACKET_OFF, /* in 0..255, offset in bidi_bracket */
STATE_LEVEL,   /* in 0..MAX_DEPTH+1=126, embedding level */
STATE_PARAGRAPH_LEVEL, /* in 0..1, paragraph embedding level */
@@ -59,7 +59,7 @@ get_state(enum state_type t, uint_least32_t input)
 {
return (int_least16_t)((input & state_lut[t].filter_mask) >>
   state_lut[t].mask_shift) +
-  state_lut[t].value_offset;
+  state_lut[t].value_offset;
 }
 
 static inline void
@@ -329,8 +329,8 @@ ir_advance(struct isolate_runner *ir)
 }
 
 static size_t
-preprocess_isolating_run_sequence(uint_least32_t *buf, size_t buflen, size_t 
off,
-  uint_least8_t paragraph_level)
+preprocess_isolating_run_sequence(uint_least32_t *buf, size_t buflen,
+  size_t off, uint_least8_t paragraph_level)
 {
enum bidi_property sequence_prop, prop;
struct isolate_runner ir, tmp;
@@ -624,7 +624,7 @@ preprocess_paragraph(enum grapheme_bidirectional_override 
override,
for (bufoff = 0; bufoff < buflen; bufoff++) {
prop = (uint_least8_t)get_state(STATE_PROP, buf[bufoff]);
 
-   /* set paragraph level, which we need for line-level-processing 
*/
+   /* set paragraph level we need for line-level-processing */
set_state(STATE_PARAGRAPH_LEVEL, paragraph_level,
  &(buf[bufoff]));
 again:
@@ -905,7 +905,8 @@ again:
runsince = SIZE_MAX;
for (bufoff = 0; bufoff < buflen; bufoff++) {
level = (int_least8_t)get_state(STATE_LEVEL, buf[bufoff]);
-   prop = (uint_least8_t)get_state(STATE_PRESERVED_PROP, 
buf[bufoff]);
+   prop = (uint_least8_t)get_state(STATE_PRESERVED_PROP,
+   buf[bufoff]);
 
if (level == -1) {
/* ignored character */
@@ -980,8 +981,7 @@ get_bidi_bracket_off(uint_least32_t cp)
 }
 
 static size_t
-preprocess(HERODOTUS_READER *r,
-   enum grapheme_bidirectional_override override,
+preprocess(HERODOTUS_READER *r, enum grapheme_bidirectional_override override,
uint_least32_t *buf, size_t buflen)
 {

[hackers] [libgrapheme] Apply format || Laslo Hunhold

2023-05-12 Thread git
commit 7d9057efdeb2fb7c641f5e02a50aa9f610ff6465
Author: Laslo Hunhold 
AuthorDate: Thu Nov 24 13:29:10 2022 +0100
Commit: Laslo Hunhold 
CommitDate: Wed Nov 2 19:56:32 2022 +0100

Apply format

Signed-off-by: Laslo Hunhold 

diff --git a/grapheme.h b/grapheme.h
index d0ec863..8974d4d 100644
--- a/grapheme.h
+++ b/grapheme.h
@@ -15,22 +15,23 @@ enum grapheme_bidirectional_override {
GRAPHEME_BIDIRECTIONAL_OVERRIDE_RTL,
 };
 
-void grapheme_bidirectional_get_line_embedding_levels(
-   const uint_least32_t *, size_t, int_least8_t *);
+void grapheme_bidirectional_get_line_embedding_levels(const uint_least32_t *,
+  size_t, int_least8_t *);
 
-size_t grapheme_bidirectional_preprocess(
-   const uint_least32_t *, size_t, enum grapheme_bidirectional_override,
-   uint_least32_t *, size_t);
-size_t grapheme_bidirectional_preprocess_utf8(
-   const char *, size_t, enum grapheme_bidirectional_override,
-   uint_least32_t *, size_t);
+size_t grapheme_bidirectional_preprocess(const uint_least32_t *, size_t,
+ enum grapheme_bidirectional_override,
+ uint_least32_t *, size_t);
+size_t
+grapheme_bidirectional_preprocess_utf8(const char *, size_t,
+   enum grapheme_bidirectional_override,
+   uint_least32_t *, size_t);
 
-size_t grapheme_bidirectional_reorder_line(
-   const uint_least32_t *, const int_least8_t *, size_t,
-   uint_least32_t *, size_t);
-size_t grapheme_bidirectional_reorder_line_utf8(
-   const char *, const int_least8_t *, size_t,
-   char *, size_t);
+size_t grapheme_bidirectional_reorder_line(const uint_least32_t *,
+   const int_least8_t *, size_t,
+   uint_least32_t *, size_t);
+size_t grapheme_bidirectional_reorder_line_utf8(const char *,
+const int_least8_t *, size_t,
+char *, size_t);
 
 size_t grapheme_decode_utf8(const char *, size_t, uint_least32_t *);
 size_t grapheme_encode_utf8(uint_least32_t, char *, size_t);
diff --git a/src/bidirectional.c b/src/bidirectional.c
index ac97b3c..b11974b 100644
--- a/src/bidirectional.c
+++ b/src/bidirectional.c
@@ -10,7 +10,7 @@
 
 enum state_type {
STATE_PROP,/* in 0..23, bidi_property */
-   STATE_PRESERVED_PROP,  /* in 0..23, preserved bidi_property for 
L1-rules */
+   STATE_PRESERVED_PROP,  /* in 0..23, preserved bidi_prop for L1-rule */
STATE_BRACKET_OFF, /* in 0..255, offset in bidi_bracket */
STATE_LEVEL,   /* in 0..MAX_DEPTH+1=126, embedding level */
STATE_PARAGRAPH_LEVEL, /* in 0..1, paragraph embedding level */
@@ -59,7 +59,7 @@ get_state(enum state_type t, uint_least32_t input)
 {
return (int_least16_t)((input & state_lut[t].filter_mask) >>
   state_lut[t].mask_shift) +
-  state_lut[t].value_offset;
+  state_lut[t].value_offset;
 }
 
 static inline void
@@ -329,8 +329,8 @@ ir_advance(struct isolate_runner *ir)
 }
 
 static size_t
-preprocess_isolating_run_sequence(uint_least32_t *buf, size_t buflen, size_t 
off,
-  uint_least8_t paragraph_level)
+preprocess_isolating_run_sequence(uint_least32_t *buf, size_t buflen,
+  size_t off, uint_least8_t paragraph_level)
 {
enum bidi_property sequence_prop, prop;
struct isolate_runner ir, tmp;
@@ -624,7 +624,7 @@ preprocess_paragraph(enum grapheme_bidirectional_override 
override,
for (bufoff = 0; bufoff < buflen; bufoff++) {
prop = (uint_least8_t)get_state(STATE_PROP, buf[bufoff]);
 
-   /* set paragraph level, which we need for line-level-processing 
*/
+   /* set paragraph level we need for line-level-processing */
set_state(STATE_PARAGRAPH_LEVEL, paragraph_level,
  &(buf[bufoff]));
 again:
@@ -905,7 +905,8 @@ again:
runsince = SIZE_MAX;
for (bufoff = 0; bufoff < buflen; bufoff++) {
level = (int_least8_t)get_state(STATE_LEVEL, buf[bufoff]);
-   prop = (uint_least8_t)get_state(STATE_PRESERVED_PROP, 
buf[bufoff]);
+   prop = (uint_least8_t)get_state(STATE_PRESERVED_PROP,
+   buf[bufoff]);
 
if (level == -1) {
/* ignored character */
@@ -980,8 +981,7 @@ get_bidi_bracket_off(uint_least32_t cp)
 }
 
 static size_t
-preprocess(HERODOTUS_READER *r,
-   enum grapheme_bidirectional_override override,
+preprocess(HERODOTUS_READER *r, enum grapheme_bidirectional_override override,
uint_least32_t *buf, size_t buflen)
 {
 

[hackers] [libgrapheme] Apply format || Laslo Hunhold

2022-11-24 Thread git
commit 2a9ca2b1d2b83e6f59549bcc70cc687449690509
Author: Laslo Hunhold 
AuthorDate: Thu Nov 24 13:29:10 2022 +0100
Commit: Laslo Hunhold 
CommitDate: Thu Nov 24 13:29:10 2022 +0100

Apply format

Signed-off-by: Laslo Hunhold 

diff --git a/grapheme.h b/grapheme.h
index d0ec863..8974d4d 100644
--- a/grapheme.h
+++ b/grapheme.h
@@ -15,22 +15,23 @@ enum grapheme_bidirectional_override {
GRAPHEME_BIDIRECTIONAL_OVERRIDE_RTL,
 };
 
-void grapheme_bidirectional_get_line_embedding_levels(
-   const uint_least32_t *, size_t, int_least8_t *);
+void grapheme_bidirectional_get_line_embedding_levels(const uint_least32_t *,
+  size_t, int_least8_t *);
 
-size_t grapheme_bidirectional_preprocess(
-   const uint_least32_t *, size_t, enum grapheme_bidirectional_override,
-   uint_least32_t *, size_t);
-size_t grapheme_bidirectional_preprocess_utf8(
-   const char *, size_t, enum grapheme_bidirectional_override,
-   uint_least32_t *, size_t);
+size_t grapheme_bidirectional_preprocess(const uint_least32_t *, size_t,
+ enum grapheme_bidirectional_override,
+ uint_least32_t *, size_t);
+size_t
+grapheme_bidirectional_preprocess_utf8(const char *, size_t,
+   enum grapheme_bidirectional_override,
+   uint_least32_t *, size_t);
 
-size_t grapheme_bidirectional_reorder_line(
-   const uint_least32_t *, const int_least8_t *, size_t,
-   uint_least32_t *, size_t);
-size_t grapheme_bidirectional_reorder_line_utf8(
-   const char *, const int_least8_t *, size_t,
-   char *, size_t);
+size_t grapheme_bidirectional_reorder_line(const uint_least32_t *,
+   const int_least8_t *, size_t,
+   uint_least32_t *, size_t);
+size_t grapheme_bidirectional_reorder_line_utf8(const char *,
+const int_least8_t *, size_t,
+char *, size_t);
 
 size_t grapheme_decode_utf8(const char *, size_t, uint_least32_t *);
 size_t grapheme_encode_utf8(uint_least32_t, char *, size_t);
diff --git a/src/bidirectional.c b/src/bidirectional.c
index ac97b3c..b11974b 100644
--- a/src/bidirectional.c
+++ b/src/bidirectional.c
@@ -10,7 +10,7 @@
 
 enum state_type {
STATE_PROP,/* in 0..23, bidi_property */
-   STATE_PRESERVED_PROP,  /* in 0..23, preserved bidi_property for 
L1-rules */
+   STATE_PRESERVED_PROP,  /* in 0..23, preserved bidi_prop for L1-rule */
STATE_BRACKET_OFF, /* in 0..255, offset in bidi_bracket */
STATE_LEVEL,   /* in 0..MAX_DEPTH+1=126, embedding level */
STATE_PARAGRAPH_LEVEL, /* in 0..1, paragraph embedding level */
@@ -59,7 +59,7 @@ get_state(enum state_type t, uint_least32_t input)
 {
return (int_least16_t)((input & state_lut[t].filter_mask) >>
   state_lut[t].mask_shift) +
-  state_lut[t].value_offset;
+  state_lut[t].value_offset;
 }
 
 static inline void
@@ -329,8 +329,8 @@ ir_advance(struct isolate_runner *ir)
 }
 
 static size_t
-preprocess_isolating_run_sequence(uint_least32_t *buf, size_t buflen, size_t 
off,
-  uint_least8_t paragraph_level)
+preprocess_isolating_run_sequence(uint_least32_t *buf, size_t buflen,
+  size_t off, uint_least8_t paragraph_level)
 {
enum bidi_property sequence_prop, prop;
struct isolate_runner ir, tmp;
@@ -624,7 +624,7 @@ preprocess_paragraph(enum grapheme_bidirectional_override 
override,
for (bufoff = 0; bufoff < buflen; bufoff++) {
prop = (uint_least8_t)get_state(STATE_PROP, buf[bufoff]);
 
-   /* set paragraph level, which we need for line-level-processing 
*/
+   /* set paragraph level we need for line-level-processing */
set_state(STATE_PARAGRAPH_LEVEL, paragraph_level,
  &(buf[bufoff]));
 again:
@@ -905,7 +905,8 @@ again:
runsince = SIZE_MAX;
for (bufoff = 0; bufoff < buflen; bufoff++) {
level = (int_least8_t)get_state(STATE_LEVEL, buf[bufoff]);
-   prop = (uint_least8_t)get_state(STATE_PRESERVED_PROP, 
buf[bufoff]);
+   prop = (uint_least8_t)get_state(STATE_PRESERVED_PROP,
+   buf[bufoff]);
 
if (level == -1) {
/* ignored character */
@@ -980,8 +981,7 @@ get_bidi_bracket_off(uint_least32_t cp)
 }
 
 static size_t
-preprocess(HERODOTUS_READER *r,
-   enum grapheme_bidirectional_override override,
+preprocess(HERODOTUS_READER *r, enum grapheme_bidirectional_override override,
uint_least32_t *buf, size_t buflen)
 {