freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] (no subject)


From: Nikhil Ramakrishnan
Subject: Re: [ft-devel] (no subject)
Date: Tue, 7 Aug 2018 18:03:38 +0530


attached you can find an Elisp script in disguise which calls Emacs
with itself.  It will do the paragraph formatting after executing
`markify.py' as discussed.

I've commented the script extensively; hopefully, it makes you
understand the Elisp code a little bit :-)

Thank you for the extensive comments!
 
A typical usage would be

  for i in `find . -type f -name "*.h"`; do
    bash markdown-format.bash $i
  done

to convert all specified header files (without creating backup files).

I applied this to the markdown-converted header files from
`GSoC-2018-nikhil' branch.
 
Up to now I've only found a single incorrect paragraph formatting due
to a sloppy @macro definition in the internal header file `ftserv.h':
It provides a bunch of `FT_DEFINE_SERVICEDESCREC*' lines that wouldn't
be output correctly anyway – this has to be undone manually after
running the script.

Please check and report further problems!

Here's one:

  diff --git a/include/freetype/ftbzip2.h b/include/freetype/ftbzip2.h
  index 5ea9a53a5..d04109fbe 100644
  --- a/include/freetype/ftbzip2.h
  +++ b/include/freetype/ftbzip2.h
 
  @@ -72,17 +72,18 @@ FT_BEGIN_HEADER
      *   The source stream must be opened _before_ calling this function.
      *
      *   Calling the internal function `FT_Stream_Close` on the new stream will
  -   *   **not** call `FT_Stream_Close` on the source stream.  None of the stream
  +   *   **not** call `FT_Stream_Close` on the source stream.  None of the
  +   *   **stream
      *   objects will be released to the heap.

It seems like the overflowing word was moved to a new line of its own. Also a stray
`**' was added to the line.
 
PS: I think we should change *all* comments in the public header files
    to use `xxx` and 'xxx' (whatever appropriate) instead of `xxx' for
    consistency.  I guess we have to do this manually, right?

Already doing this :-)
  https://github.com/nikramakrishnan/freetype-docs/blob/master/markdown_utils.py#L299

This uses regex to try and differentiate code sequences and normal text in
quotes. It does a reasonable job, but manual cleanup is required.
 


--
Nikhil

reply via email to

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