# HG changeset patch # User markus schnalke # Date 1341957634 -7200 # Node ID 731e747a805bcf6ea2ca018ad7c058a5374a297c # Parent b59201e345e5970532e525f0e5b5e41febb352f6 Applied corrections by Lydi. diff -r b59201e345e5 -r 731e747a805b discussion.roff --- a/discussion.roff Tue Jul 10 23:13:45 2012 +0200 +++ b/discussion.roff Wed Jul 11 00:00:34 2012 +0200 @@ -3080,7 +3080,7 @@ .Sw -list . .P Trying to fix these problems on the surface would not have solved -them truly, as they originate from a discrepance between the semantic +them truly, as they originate from a discrepance between the structure of the problem and the structure implemented in the program. Such structural differences can not be cured on the surface. They need to be solved by adjusting the structure of the implementation @@ -3102,7 +3102,8 @@ Historically, .Pn anno had only one operation mode: adding header fields. -With the extension, it got two more modes: +With the extension it got two more modes: +.\" XXX got listing and deleting header fields. The structure of the code changes did not pay respect to this fundamental change to @@ -3187,6 +3188,7 @@ .P To allow MH tools to understand all four notations, they need to convert between them. +.\" XXX between? In nmh, these path name conversion functions were located in the files .Fn sbr/path.c (``return a pathname'') and @@ -3287,6 +3289,7 @@ path name. The result is a pointer to static memory. .P +.\" XXX ueberfluessig? The new functions have names that indicate their use. Two of the functions convert relative to absolute path names of the same type. @@ -3327,6 +3330,7 @@ .P .Fn sbr/path.c now contains all path handling code. +.\" XXX naechste zeile weg? Only 173 lines of code were needed to replace the previous 252 lines. The readability of the code is highly improved. Additionally, each of the six exported and one static functions @@ -3412,7 +3416,7 @@ Clear and simple concepts are a precondition for this. Hence, the real solution is having all MH tools read the profile. .P -Yet, the problem has a further aspect. +The problem has a further aspect. It mainly originates in .Pn mhmail . .Pn mhmail @@ -3464,7 +3468,7 @@ to instruct them reading a different profile. .Pn mhmail could have set up a well-defined profile and caused all MH tools -in the session use it by exporting an environment variable. +in the session to use it by exporting an environment variable. With this approach, no special cases would have been introduced, no surprises would have been caused. By writing a clean-profile-wrapper, the concept could have been @@ -3548,7 +3552,7 @@ that are standardized and thus widely available today, but were not back then. Today, twenty years after the POSIX and ANSI C were published, -developers can expect system to comply with these standards. +developers can expect systems to comply with these standards. In consequence, MH-specific replacements for standard functions can and should be dropped. Kernighan and Pike advise: ``Use standard libraries.'' @@ -3561,7 +3565,7 @@ .Fu snprintf() function, for instance, was standardized with C99 and is available almost everywhere because of its high usefulness. -In project's own implementation of +The project's own implementation of .Fu snprintf() was dropped in March 2012 in favor for using the one of the standard library. @@ -3570,7 +3574,8 @@ if systems do not support these standardized and widespread functions. This compromise is made because mmh focuses on the future. .P -I am not yet thirty years old and my C and Unix experience comprises +.\" XXX kuerzen und mit dem naechsten Absatz vereinen +I am still in my twenties and my C and Unix experience comprises only half a dozen years. Hence, I need to learn about the history in retrospective. I have not used those ancient constructs myself. @@ -3579,7 +3584,7 @@ All my programming experience is from a time when ANSI C and POSIX were well established already. I have only read a lot of books about the (good) old times. -This puts me in a difficult positions when working with old code. +This puts me in a difficult position when working with old code. I need to freshly acquire knowledge about old code constructs and ancient programming styles, whereas older programmers know these things by heart from their own experience. @@ -3629,7 +3634,8 @@ .P The .Fu copy() -function copies the string in argument one to the location in two. +function copies the string in parameter one to the location in +parameter two. In contrast to .Fu strcpy() , it returns a pointer to the terminating null-byte in the destination area. @@ -3734,6 +3740,7 @@ They are different kinds of data: The data to be operated on and the configuration to change how tools operate. +.\" XXX bad ... inapropriate? Splitting the configuration between the profile and the MH directory is bad. Merging the mail storage and the configuration in one directory is bad @@ -3813,7 +3820,7 @@ The source code of the mmh tools is located in the .Fn uip (``user interface programs'') directory. -Each tools has a source file with the name of the command. +Each tool has a source file with the name of the command. For example, .Pn rmm is built from @@ -3835,15 +3842,16 @@ 21 programs depend on one source file only. (These numbers and the ones in the following text ignore the MH library as well as shell scripts and multiple names for the same program.) +.\" XXX graph .P Splitting the source code of a large program into multiple files can increase the readability of its source code. -Most of the mmh tools, however, are simple and straight-forward programs. +.\" XXX however? +Most of the mmh tools are simple and straight-forward programs. With the exception of the MIME handling tools, .Pn pick is the largest tool. -It contains 1\|037 lines of source code (measured with -.Pn sloccount ), excluding the MH library. +It contains 1\|037 lines of source code, excluding the MH library. Only the MIME handling tools (\c .Pn mhbuild , .Pn mhstore , @@ -3988,7 +3996,8 @@ .P Understanding .Pn comp -requires to read 210 lines of code in mmh, but ten times as much in nmh. +.\" XXX kate fragen: more vs. as much +requires to read 210 lines of code in mmh, but ten times more in nmh. Due to the aforementioned hack in .Pn anno to save the additional parameter, information passed through the program's