From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id q4UKx3SX009207 for ; Wed, 30 May 2012 16:59:04 -0400 (EDT) Received: by werc12 with SMTP id c12so205410wer.36 for ; Wed, 30 May 2012 13:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=UgByjjQo+jZJCZV8/syxs5FD1rinCBl1743tILxoG98=; b=zyW8GFpuigv9h6O/Gk5a7TV/JSHrpjnoFBdNVwjpIx50MpOuFy8rt4y7pCI9Lq4jwi NC6u1Tfr8XgdSwkHfAwE6+ryxc8K8SeZTOzMkCpqxPbRbyM/AyV6EtPEPqpZvtu8j7zJ PRWNiN5vhZ2s+fRLIhmrWyyBFziUdoDTLOA9AAg0vtKbih1G/J2cO1kYyrtfcvQAu6S1 DxqNgboLchr1fDtDNdA+DjrLU3pIh2Oe95tMHBzaV/9jzRsL6aEz77QQ1iMUSpboBo7n 0jl/CUf+86KKF8IDPjUmQhZDwXSIBY1hH4TskJLs/EQnA3L/tJluz2uv5dZ7BrPgAel9 A3yQ== X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Received: by 10.216.194.93 with SMTP id l71mr4615504wen.169.1338411538210; Wed, 30 May 2012 13:58:58 -0700 (PDT) Received: by 10.216.210.92 with HTTP; Wed, 30 May 2012 13:58:58 -0700 (PDT) Date: Wed, 30 May 2012 16:58:58 -0400 Message-ID: Subject: Implementing roff requests. From: Jesse Hagewood To: tech@mdocml.bsd.lv Content-Type: multipart/alternative; boundary=0016e6d7dfb74c60b904c1473870 --0016e6d7dfb74c60b904c1473870 Content-Type: text/plain; charset=ISO-8859-1 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! --0016e6d7dfb74c60b904c1473870 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I am a student par= ticipating in Google Summer of Code, working under FreeBSD. Part of my proj= ect this summer is to add features to mdocml so that it can=A0deprecate=A0g= roff in the FreeBSD core.=A0

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

.ad (adj= ust margins)=A0
.na=A0
.it=A0
.ns (no-space m= ode)
.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) Cr= eate 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.=A0

I'm not sure if this would be the correct way to im= plement these, so I was wondering if anyone here had any input. I am assumi= ng the only code I will have to modify is in roff.c. So far all I have adde= d 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.=A0

Here are links to my project wiki and SVN repository fo= r anyone interested:

Any input or advice w= ould be greatly=A0appreciated. Thanks!=A0
--0016e6d7dfb74c60b904c1473870-- -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv