Code Monkey home page Code Monkey logo

mplibdir's Introduction

mplibdir's People

Contributors

ascherer avatar

Watchers

 avatar

mplibdir's Issues

Better breaks in prototypes and function headers.

Unfortunately, CWEAVE adds \39 after every comma in parameter lists. This is less likely to break than the plain space between types and parameters.

Either add @| at comvenient spots, or add comments for the function parameters.

(Alternatively, you can dig into the CWEAVE.W code and provide a pull request to the CWEB maintainer to bind parameters more tightly to types.)

Purge section 10.

The two prototypes for mp_options and mp_initialize are redundant, because they are redeclared in section 22 and preloaded via sections 3 (header file mplib.h), 5 (#include "mplib.h"), and 4 (#include "mpmp.h").

Note also that the comment-less #include "mplib.h" in section 5 is redundant because of the following #include "mpmp.h" in the same section.

Address overfull hboxes.

diff --git a/mp.w b/mp.w
index ef22f7c..fe25066 100644
--- a/mp.w
+++ b/mp.w
@@ -6541,8 +6541,8 @@ static boolean mp_interesting (MP mp, mp_node p) {
 
 @ Now here is a subroutine that converts an unstructured type into an
 equivalent structured type, by inserting a |mp_structured| node that is
-capable of growing. This operation is done only when |mp_name_type(p)=root|,
-|subscr|, or |attr|.
+capable of growing. This operation is done only when |mp_name_type(p)|
+equals |root|, |subscr|, or |attr|.
 
 The procedure returns a pointer to the new node that has taken node~|p|'s
 place in the structure. Node~|p| itself does not move, nor are its
@@ -7895,7 +7895,7 @@ if (mp_right_type (p) >= mp_given) {
 p = q
 
 @ This step makes it possible to transform an explicitly computed path without
-checking the |mp_left_type| and |mp_right_type| fields.
+checking the |left_type| and |right_type| fields of the knots.
 
 @<Give reasonable values for the unused control points between |p| and~|q|@>=
 {
@@ -12865,9 +12865,9 @@ mp_node ds;     /* the stroked node from which |hh| and |hsf| are derived */
 
 
 @ The name of this module is a bit of a lie because we just find the
-first |dd| where |take_scaled (hsf, stop_x(dd))| is large enough to make an
-overlap possible.  It could be that the unoffset version of dash |dln| falls
-in the gap between |dd| and its predecessor.
+first |dd| where |take_scaled (hsf,@t}\break{@>stop_x(dd))| is large enough
+to make an overlap possible.  It could be that the unoffset version of
+dash |dln| falls in the gap between |dd| and its predecessor.
 
 @<Advance |dd| until finding the first dash that overlaps |dln| when...@>=
 {

Create and use "tfmin.h" header file.

tfmin.w should create (and use) its own header file tfmin.h with the (single) exported function mp_read_font_info function. mp.w should use this header instead of the extern declaration.

Add 'mp_' prefix.

A lot of functions from Metafont got the mp_ prefix in MetaPost. In TeX parts and comments, the old names are still used. They clutter the index.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.