Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 2002 20:46:22 +0100
From:      Jonathan Belson <jon@witchspace.com>
To:        Mark Murray <mark@grondar.za>
Cc:        current@freebsd.org
Subject:   Re: Perl scripts that need rewiting - Any volunteers?
Message-ID:  <3D17770E.1060904@witchspace.com>
References:  <3D0A464B.7040904@witchspace.com> <200206222154.g5MLsva4041792@grimreaper.grondar.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Murray wrote:

>>Okay, here's my vidfont/kbdmap rewrite for review.  Any feedback
>>is welcome, the same goes for bug reports :-)
> 
> Cool, thank you very much!
> 
> Some comments:
> 
> o Please put a copyright on the top of this. By preference, please use
>   /usr/share/examples/etc/bsd-style-copyright.
> 
> o The code style is generally good, but please don't put braces around
>   single lines of code, ie use
>   for (;;)
> 	stuff;
>   rather than
>   for (;;) {
> 	stuff;
>   }
> 
> o Please put all the macro strings like default font and directories into
>   macros and #include those from (say) vidfont.h.

All done.

> o Please shorten any long line or comment to less than 80 columns

This is quite tricky when using 8 character tabs.  Is 4 character indent
okay for userland source?

> o Please do not use mktemp(); use mkstemp() instead.

I used mktemp() to get a filename to redirect to, eg.

/* Improvised example */
char *cmd;
asprintf(cmd, "prog > %s", mktemp(blah));
system(cmd);
free(cmd);

I couldn't see a simple way around this, any clues?

> o Please make this WARNS=6 clean as far as is possible.

Done.

Cheers,


--Jon

http://www.witchsapce.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D17770E.1060904>