tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Implementing roff requests.
@ 2012-05-30 20:58 Jesse Hagewood
  2012-05-31  1:22 ` Ingo Schwarze
  2012-05-31 11:25 ` Kristaps Dzonsons
  0 siblings, 2 replies; 4+ messages in thread
From: Jesse Hagewood @ 2012-05-30 20:58 UTC (permalink / raw)
  To: tech

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-31 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-30 20:58 Implementing roff requests Jesse Hagewood
2012-05-31  1:22 ` Ingo Schwarze
2012-05-31 11:25 ` Kristaps Dzonsons
2012-05-31 12:52   ` Ingo Schwarze

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).