sed-devel
[Top][All Lists]
Advanced

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

Patch: gramatical/syntacticall errors in sed.h


From: Vagelis Prokopiou
Subject: Patch: gramatical/syntacticall errors in sed.h
Date: Sun, 15 Jan 2017 12:18:28 +0200

From 92532d7602a90b7abbdfff18f484be3566223813 Mon Sep 17 00:00:00 2001
From: Vagelis Prokopiou <address@hidden>
Date: Sun, 15 Jan 2017 12:16:01 +0200
Subject: [PATCH] Fixing gramatical/syntacticall errors (capitalization, full
 stops, etc)

Signed-off-by: Vagelis Prokopiou <address@hidden>
---
 sed/sed.h | 78 +++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/sed/sed.h b/sed/sed.h
index 7510b0a..9e855cb 100644
--- a/sed/sed.h
+++ b/sed/sed.h
@@ -8,7 +8,7 @@
 
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
@@ -27,15 +27,15 @@
 
 /* Struct vector is used to describe a compiled sed program. */
 struct vector {
-  struct sed_cmd *v; /* a dynamically allocated array */
-  size_t v_allocated; /* ... number of slots allocated */
-  size_t v_length; /* ... number of slots in use */
+  struct sed_cmd *v; /* A dynamically allocated array. */
+  size_t v_allocated; /* ... Number of slots allocated. */
+  size_t v_length; /* ... Number of slots in use. */
 };
 
 /* This structure tracks files used by sed so that they may all be
-   closed cleanly at normal program termination.  A flag is kept that tells
+   closed cleanly at normal program termination. A flag is kept that tells
    if a missing newline was encountered, so that it is added on the
-   next line and the two lines are not concatenated.  */
+   next line and the two lines are not concatenated. */
 struct output {
   char *name;
   bool missing_newline;
@@ -66,7 +66,7 @@ enum replacement_types {
   REPL_LOWERCASE_FIRST = 8,
   REPL_MODIFIERS = REPL_UPPERCASE_FIRST | REPL_LOWERCASE_FIRST,
 
-  /* These are given to aid in debugging */
+  /* These are given to aid in debugging. */
   REPL_UPPERCASE_UPPERCASE = REPL_UPPERCASE_FIRST | REPL_UPPERCASE,
   REPL_UPPERCASE_LOWERCASE = REPL_UPPERCASE_FIRST | REPL_LOWERCASE,
   REPL_LOWERCASE_UPPERCASE = REPL_LOWERCASE_FIRST | REPL_UPPERCASE,
@@ -80,25 +80,25 @@ enum text_types {
 };
 
 enum posixicity_types {
-  POSIXLY_EXTENDED, /* with GNU extensions */
-  POSIXLY_CORRECT, /* with POSIX-compatible GNU extensions */
-  POSIXLY_BASIC /* pedantically POSIX */
+  POSIXLY_EXTENDED, /* With GNU extensions. */
+  POSIXLY_CORRECT, /* With POSIX-compatible GNU extensions. */
+  POSIXLY_BASIC /* Pedantically POSIX. */
 };
 
 enum addr_state {
-  RANGE_INACTIVE, /* never been active */
-  RANGE_ACTIVE, /* between first and second address */
-  RANGE_CLOSED /* like RANGE_INACTIVE, but range has ended once */
+  RANGE_INACTIVE, /* Never been active. */
+  RANGE_ACTIVE, /* Between first and second address. */
+  RANGE_CLOSED /* Like RANGE_INACTIVE, but range has ended once. */
 };
 
 enum addr_types {
-  ADDR_IS_NULL, /* null address */
-  ADDR_IS_REGEX, /* a.addr_regex is valid */
-  ADDR_IS_NUM, /* a.addr_number is valid */
-  ADDR_IS_NUM_MOD, /* a.addr_number is valid, addr_step is modulo */
-  ADDR_IS_STEP, /* address is +N (only valid for addr2) */
-  ADDR_IS_STEP_MOD, /* address is ~N (only valid for addr2) */
-  ADDR_IS_LAST /* address is $ */
+  ADDR_IS_NULL, /* Null address. */
+  ADDR_IS_REGEX, /* a.addr_regex is valid. */
+  ADDR_IS_NUM, /* a.addr_number is valid. */
+  ADDR_IS_NUM_MOD, /* a.addr_number is valid, addr_step is modulo. */
+  ADDR_IS_STEP, /* Address is +N (only valid for addr2). */
+  ADDR_IS_STEP_MOD, /* Address is ~N (only valid for addr2). */
+  ADDR_IS_LAST /* Address is $. */
 };
 
 struct addr {
@@ -120,17 +120,17 @@ struct replacement {
 struct subst {
   struct regex *regx;
   struct replacement *replacement;
-  countT numb; /* if >0, only substitute for match number "numb" */
-  struct output *outf; /* 'w' option given */
-  unsigned global : 1; /* 'g' option given */
-  unsigned print : 2; /* 'p' option given (before/after eval) */
-  unsigned eval : 1; /* 'e' option given */
-  unsigned max_id : 4;  /* maximum backreference on the RHS */
+  countT numb; /* if > 0, only substitute for match number "numb". */
+  struct output *outf; /* 'w' option given. */
+  unsigned global : 1; /* 'g' option given. */
+  unsigned print : 2; /* 'p' option given (before/after eval). */
+  unsigned eval : 1; /* 'e' option given. */
+  unsigned max_id : 4;  /* Maximum backreference on the RHS. */
 };
 
 #ifdef REG_PERL
-/* This is the structure we store register match data in.  See
-   regex.texinfo for a full description of what registers match.  */
+/* This is the structure we store register match data in. See
+   regex.texinfo for a full description of what registers match. */
 struct re_registers
 {
   unsigned num_regs;
@@ -142,10 +142,10 @@ struct re_registers
 
 
 struct sed_cmd {
-  struct addr *a1; /* save space: usually is NULL */
+  struct addr *a1; /* Save space: usually is NULL. */
   struct addr *a2;
 
-  /* See description the enum, above.  */
+  /* See description the enum, above. */
   enum addr_state range_state;
 
   /* Non-zero if command is to be applied to non-matches. */
@@ -154,7 +154,7 @@ struct sed_cmd {
   /* The actual command character. */
   char cmd;
 
-  /* auxiliary data for various commands */
+  /* Auxiliary data for various commands. */
   union {
     /* This structure is used for a, i, and c commands. */
     struct text_buf cmd_txt;
@@ -209,11 +209,11 @@ extern struct localeinfo localeinfo;
 
 extern int extended_regexp_flags;
 
-/* one-byte buffer delimiter */
+/* One-byte buffer delimiter. */
 extern char buffer_delimiter;
 
 /* If set, fflush(stdout) on every line output,
-   and turn off stream buffering on inputs.  */
+   and turn off stream buffering on inputs. */
 extern bool unbuffered;
 
 /* If set, don't write out the line unless explicitly told to. */
@@ -222,7 +222,7 @@ extern bool no_default_output;
 /* If set, reset line counts on every new file. */
 extern bool separate_files;
 
-/* If set, follow symlinks when invoked with -i option */
+/* If set, follow symlinks when invoked with -i option. */
 extern bool follow_symlinks;
 
 /* Do we need to be pedantically POSIX compliant? */
@@ -231,21 +231,21 @@ extern enum posixicity_types posixicity;
 /* How long should the `l' command's output line be? */
 extern countT lcmd_out_line_len;
 
-/* How do we edit files in-place? (we don't if NULL) */
+/* How do we edit files in-place? (we don't if NULL). */
 extern char *in_place_extension;
 
-/* The mode to use to read and write files, either "rt"/"w" or "rb"/"wb".  */
+/* The mode to use to read and write files, either "rt"/"w" or "rb"/"wb". */
 extern char const *read_mode;
 extern char const *write_mode;
 
 /* Should we use EREs? */
 extern bool use_extended_syntax_p;
 
-/* Declarations for multibyte character sets.  */
+/* Declarations for multibyte character sets. */
 extern int mb_cur_max;
 extern bool is_utf8;
 
-/* If set, operate in 'sandbox' mode - disable e/r/w commands */
+/* If set, operate in 'sandbox' mode - disable e/r/w commands. */
 extern bool sandbox;
 
 #define MBRTOWC(pwc, s, n, ps) \
@@ -276,5 +276,5 @@ extern void cancel_cleanup (void);
 #ifdef lint
 # define IF_LINT(Code) Code
 #else
-# define IF_LINT(Code) /* empty */
+# define IF_LINT(Code) /* Empty. */
 #endif
-- 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]