deep mods
[feisty_meow.git] / nucleus / library / textual / string_manipulation.cpp
index 6e21691a93758c57be906e10687b62ad7c28d070..bcd6ac5ee9de0275a6a32509cbe6df3117747714 100644 (file)
@@ -190,7 +190,7 @@ void string_manipulation::split_lines(const astring &input_in, astring &output,
         break_line = true;
         just_had_break = true;
         put_accum_before_break = true;
-        // intentional fall-through.
+        // intentional fall-through, so no break.
       case '\t': case ' ':
         invisible = true;
         next_break--;  // don't include it in what's printed.
@@ -222,11 +222,11 @@ void string_manipulation::split_lines(const astring &input_in, astring &output,
 
     // check that we're still in bounds.
     int chars_added = next_break - j + 1;
-    if (col + chars_added + punct_adder > max_column + 1) {
+    if (col + chars_added + punct_adder > max_column) {
       // we need to break before the next breakable character.
       break_line = true;
       just_had_break = true;
-      if (col + chars_added <= max_column + 1) {
+      if (col + chars_added <= max_column) {
         // it will fit without the punctuation spaces, which is fine since
         // it should be the end of the line.
         invisible = false;
@@ -234,7 +234,7 @@ void string_manipulation::split_lines(const astring &input_in, astring &output,
         end_sentence = false;
         punct_adder = 0;
         keep_on_line = true;
-      } else if (min_column + chars_added > max_column + 1) {
+      } else if (min_column + chars_added > max_column) {
         // this word won't ever fit unless we break it.
         int chars_left = max_column - col + 1;
           // remember to take out room for the dash also.
@@ -323,7 +323,7 @@ abyte string_manipulation::char_to_hex(char to_convert)
 
 byte_array string_manipulation::string_to_hex(const astring &to_convert)
 {
-  byte_array to_return(0, NIL);
+  byte_array to_return(0, NULL_POINTER);
   for (int i = 0; i < to_convert.length() / 2; i++) {
     int str_index = i * 2;
     abyte first_byte = char_to_hex(to_convert.get(str_index));