tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Jesse Hagewood <jesse.hagewood@gmail.com>
To: tech@mdocml.bsd.lv
Subject: Implementing roff requests.
Date: Wed, 30 May 2012 16:58:58 -0400	[thread overview]
Message-ID: <CACfFK-UWc9Wq2cA8=W3aG4yUm1onVaAbeOi8+gF+bxBO3GOL3g@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

Hello,

I am a student participating in Google Summer of Code, working under
FreeBSD. Part of my project this summer is to add features to mdocml so
that it can deprecate groff in the FreeBSD core.

What I'm trying to do is implement the following roff requests:

.ad (adjust margins)
.na
.it
.ns (no-space mode)
.rs (no-space mode off)
.ti (temporary indent)
.ta (tab settings)
.hy (hyphenation)
.ne
.nh
.ni
.ps

Right now I'm working on the requests .ns and .rs. Here's how I figure I
will do that: 1) Create a flag that checks for no-space mode 2) in the
function roffhash_find, if the no-space flag is on, check if the current
roff node has the .sp or .br request and skip to the next node. 3) .rs will
simply turn the no-space flag off.

I'm not sure if this would be the correct way to implement these, so I was
wondering if anyone here had any input. I am assuming the only code I will
have to modify is in roff.c. So far all I have added to the code is
function stubs for the requests, and temporarily using an int for a
no-space flag and a simple if statement in roffhash_find to check if the
flag is on/off and if the roff macro is .sp, although that gives me a seg
fault right now.

Here are links to my project wiki and SVN repository for anyone interested:
http://wiki.freebsd.org/SummerOfCode2012/JesseHagewood
https://socsvn.freebsd.org/socsvn/soc2012/jhagewood/

Any input or advice would be greatly appreciated. Thanks!

[-- Attachment #2: Type: text/html, Size: 2225 bytes --]

             reply	other threads:[~2012-05-30 20:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30 20:58 Jesse Hagewood [this message]
2012-05-31  1:22 ` Ingo Schwarze
2012-05-31 11:25 ` Kristaps Dzonsons
2012-05-31 12:52   ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACfFK-UWc9Wq2cA8=W3aG4yUm1onVaAbeOi8+gF+bxBO3GOL3g@mail.gmail.com' \
    --to=jesse.hagewood@gmail.com \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).