Unix Programming - using pod in .cxx files

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2005 > using pod in .cxx files





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author using pod in .cxx files
Billy N. Patton

2005-07-18, 5:53 pm

I like to keep my documentation and the source in the same location.
So in my .cxx files, next to the function I put pod documentation.
In my Makefile I also creat the pod2man, pod2text and pod2html all while
I have it checkouted out from RCS.

EX:

#ifdef POD

=head1 NAME

Foo - this is foo bar

=head1 SYNOPSIS

Foo f("abs");

=head1 DESCRIPTION

THis is foo bar.

=cut
#endif

Foo::Foo(std::string in)
....



The problem is that if I happen to put "it's" inside the #ifdef POD I
get compiler errors. If I remove the "'" from "it's", the compiler
errors disappear. GOFIGURE

#ifdef POD

=head1 NAME

foo - It's something to cry about.


--
___ _ ____ ___ __ __
/ _ )(_) / /_ __ / _ \___ _/ /_/ /____ ___
/ _ / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/ \_,_/\__/\__/\___/_//_/
/___/
Texas Instruments ASIC Circuit Design Methodology Group
Dallas, Texas, 214-480-4455, b-patton@ti.com
T.M. Sommers

2005-07-18, 5:53 pm

Billy N. Patton wrote:
> I like to keep my documentation and the source in the same location.
> So in my .cxx files, next to the function I put pod documentation.
> In my Makefile I also creat the pod2man, pod2text and pod2html all while
> I have it checkouted out from RCS.
>
> The problem is that if I happen to put "it's" inside the #ifdef POD I
> get compiler errors. If I remove the "'" from "it's", the compiler
> errors disappear. GOFIGURE


There are constraints upon what can appear in an #if block. See
section 6.4 of the C standard or section 2.4 of the C++ standard.
One of the rules is that a ' not used to create a character
literal invokes undefined behavior.

I'm not familiar with POD, but you might try putting the POD
stuff inside a comment instead of an #if block. If that does not
work, you might want to look at Doxygen.

--
Thomas M. Sommers -- tms@nj.net -- AB2SB

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com