On Fri, Dec 02, 2011 at 03:15:16AM -0800, Neoklis Kyriazis wrote: > Hi > > I hesitate somewhat to post this, being aware of the recommendations > to look for answers in the extensive documentation of OpenBSD, but I > just don't seem to find the information I need. > > I have been using Linux for a number of years and have written a few > applications for that platform, mainly for my Ham Radio hobby (they > are available on my website below). I have recently installed > OpenBSD on my second SSD and I would like to edit the source code to > make it compatible with OpenBSD's coding standards (I have managed > to compile a couple of my simplest apps and I already have warnings > of bad practices like using strcpy and strcat... ;-) > > Is there a guide for developers regarding OpenBSD programming > standards and practices, including specific API functions like > strlcpy etc?
The easier is to look in OpenBSD sources and see how other tools are coded. There's also style(9) man page that covers... coding style. Most (all?) APIs are documented in their man pages. > Some of the apps I have written use the ALSA sound API, which I > understand is not available on OpenBSD (and I think on all > *BSDs). Is OpenBSD using the standard OSS API? > There's a unmaintained oss-compatibility library that's for quick porting-and-testing of oss programs, it doesn't work very well except to play a simple file. The prefered api on openbsd is sndio; see sndio(7), sio_open(3) and mio_open(3) man pages. It's easy to use and suitable for programs that require precise synchronization. Here's an additional document I maintain that's not merged yet with the official openbsd documentation: http://caoua.org/sndio/tips.html -- Alexandre