C Language Style Guide

2005-01-25 Thread Michael Madden
Is there an accepted standard C language style guide.  I'm starting to develop
and test my applications on FreeBSD, and I want to ensure my code is readable
and maintainable.  I've been able to find specific project's guidelines like
the following, but I can find a general standard.  Does ANSI or POSIX dictate
anything about style or coding standards?

Apache: http://httpd.apache.org/dev/styleguide.html
GNU: http://www.gnu.org/prep/standards/

Thanks,
Mike

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Scroll whell on FreeBSD 5.3 i386

2005-01-24 Thread Michael Madden
What is the secret to getting my scroll wheel working on FreeBSD 5.3?  If have
the following added to /etc/rc.conf:

moused_enable=YES
moused_flags=
moused_port=/dev/psm0
moused_type=auto

I've also got the mouse section of /etc/X11/xorg.conf setup as:

Section InputDevice
Identifier  Mouse1
Driver  mouse
Option  Protocol auto
Option  Device /dev/sysmouse
EndSection

The mouse works fine as a normal mouse (right click, left click, middle
click), but the scroll wheel doesn't scroll.

Thanks in advance,
Mike

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


OpenGL hardware acceleration with FreeBSD 5.3

2005-01-24 Thread Michael Madden
I have a Matrox G400, and I cannot figure out how to get hardware acceleration
setup for it.  glxinfo still displays direct rendering: No, and OpenGL
apps like glxgears are slow.  I've made sure I've got the dri and glx modules
loaded, and I've added the DRI section to xorg.conf.

If it helps, here is my xorg.conf file.  Thanks for the help.

Section Module
Load  dbe
Load  dri
Load  extmod
Load  glx
Load  record
Load  xtrap
Load  freetype
Load  speedo
Load  type1
EndSection

Section Files
RgbPath  /usr/X11R6/lib/X11/rgb
ModulePath   /usr/X11R6/lib/modules
FontPath /usr/X11R6/lib/X11/fonts/misc/
FontPath /usr/X11R6/lib/X11/fonts/TTF/
FontPath /usr/X11R6/lib/X11/fonts/Speedo/
FontPath /usr/X11R6/lib/X11/fonts/Type1/
FontPath /usr/X11R6/lib/X11/fonts/CID/
FontPath /usr/X11R6/lib/X11/fonts/75dpi/
FontPath /usr/X11R6/lib/X11/fonts/100dpi/
EndSection

Section InputDevice
Identifier  Keyboard1
Driver  keyboard
EndSection

Section InputDevice
Identifier  Mouse1
Driver  mouse
Option  Protocol auto
Option  Device /dev/sysmouse
Option  ZAxisMapping  4 5
EndSection

Section Monitor
Identifier  hp 1825
HorizSync   31.5 - 64.3
VertRefresh 50-70
EndSection

Section Device
Identifier  Matrix G400
Driver  mga
VideoRam16384
EndSection

Section Screen
Identifier  Screen 1
Device  Matrix G400
Monitor hp 1825
DefaultDepth 24

Subsection Display
Depth   8
Modes   1280x1024 1024x768 800x600 640x480
ViewPort0 0
EndSubsection
Subsection Display
Depth   16
Modes   1280x1024 1024x768 800x600 640x480
ViewPort0 0
EndSubsection
Subsection Display
Depth   24
Modes   1280x1024 1024x768 800x600 640x480
ViewPort0 0
EndSubsection
EndSection

Section ServerLayout
Identifier  Simple Layout
Screen Screen 1
InputDevice Mouse1 CorePointer
InputDevice Keyboard1 CoreKeyboard
EndSection

Section DRI
Mode 0666
EndSection

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: OpenGL hardware acceleration with FreeBSD 5.3

2005-01-24 Thread Michael Madden
This thought just came to me... Do I need
Linux Binary Compatibility packages to get
the acceleration?  Right now I don't have it
setup since I didn't think I'd need it.
Thanks,
Mike
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Router setup with FreeBSD 5.3

2005-01-06 Thread Michael Madden
Does anyone have documentation and/or a
tutorial for setting a router with FreeBSD
5.3?  I want to share a broadband connection
with 5-10 Windows/Linux/FreeBSD boxes.  I
assume I'll need to setup the two interfaces,
gatewaying, and some type of firewall...
Thanks,
Mike
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: DNS problems - slow to resolve

2005-01-02 Thread Michael Madden
David Daugherty wrote:
Are there tools/commands I can use to determine the resolution time
that my lookups are taking? A lot of my web browser requests are
timing out (name lookups) and I have to keep hitting refresh until it
finally resolves.
I'd try using dig:
 dig www.freebsd.org
At the end look for the query time:
;; Query time: 3 msec
;; WHEN: Sun Jan  2 09:33:07 2005
;; MSG SIZE  rcvd: 211
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Recommended Mail Transfer Agent

2005-01-02 Thread Michael Madden
I'm looking to setup a mail server with FreeBSD 5.3 for a group of around
100 users, and I was wondering which MTA I should use.  I have noticed 
sendmail is the default MTA, but I have no sendmail experience.  Also I know 
historically sendmail has had some serious security issues.

Furthermore, can someone recommend a decent POP3 and IMAP server?

Thanks in advance,
Mike 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Recommended Mail Transfer Agent

2005-01-02 Thread Michael Madden

Where do I go to learn about sendmail configuration?
Pick up the O'Reilly Bat Book Sendmail book.  The sendmail.org site is 
also a very good resource as well as IRC on freenode.

Any HOWTO do something standard instructions?
Where do I send newbie questions to? 
Does anyone know of a good tutorial/howto for configuring
sendmail on FreeBSD.  My two books ('Absolute BSD' and
'The Complete FreeBSD') make little mention of sendmail
configuration and focus on setting up postfix.
The FreeBSD Handbook seems incomplete and glosses over details:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mail.html
1.) How do I edit /etc/rc.conf to start sendmail at boot.
2.) Most of the configurations files seem pretty normal, but
sendmail.cf seems quite obtuse.
I guess I'm looking for a document that would walk a newbie
through setting up sendmail on FreeBSD without being too arcane
or not detailed enough. My experience with some of the other
Oreilly books leads me to believe they're pretty generic;
I doubt I'd find information on how to setup sendmail for FreeBSD.
Thanks again,
Mike

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Recommended Mail Transfer Agent

2005-01-02 Thread Michael Madden
Warren Block wrote:
So have other MTAs, including one for Postfix not so long ago.  Sendmail 
configuration can be charitably called odd, but it's so widely used 
that answers can usually be found on google or groups.google.com.  Then 
there's comp.mail.sendmail, and sendmail.org, the bat book, and even 
sendmail.com.
FYI:
With help from a decent tutorial for sendmail at
http://www.technoids.org/freebsdsendmailfaqs.html
and some detailed explanation from the bad book,
I got sendmail setup fine.
I found the tutorial to be a good initial walk
through, and the bat book was a great reference.
Thanks for all the suggestions,
Mike
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


rsyncd with FreeBSD 5.3 on AMD64

2004-12-31 Thread Michael Madden
Has anyone gotten rsync 2.6.3 working on FreeBSD 5.3.  I am using it on AMD64
if it matters.  I've made the following rsyncd.conf which works on my FreeBSD
5.2.1 server:

log file = /var/log/rsyncd.log
hosts allow = 192.168.2.0/255.255.255.0
use chroot = yes
uid = root
gid = wheel
read only = no

[backup]
   path = /datastore

When I run rsync --daemon or let rsyncd start from rc.conf I get the following:
Dec 31 08:20:09 apollo rsyncd[533]: unable to bind any inbound sockets on port 
873
Dec 31 08:20:09 apollo rsyncd[533]: rsync error: error in socket IO (code 10) 
at socket.c(448)

Any help would be appreciated.

Thanks,
Mike

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD PNP OS = NO in system bios configuration?

2004-12-31 Thread Michael Madden
John Conover wrote:
Should PNP OS = NO in the PC system bios configuration be used for
freeBSD?
I was reading through Michael Lucus's highly recommended
book 'Absolute BSD', and this is what is said on the matter:
While you're in the system BIOS, set the Plus and Play
OS option to no. This tells the BIOS to do some basic
hardware setup, rather than relying on the operating system
to do everything.  Modern versions of Microsoft Windows
expect the hard to do as it is told, and hence expect full
access to the hardware.  FreeBSD, on the other hand, expects
a system to perform as the hardware standards and specifications
demand, and hence can take advantage of some setup work that
is most easily done in the BIOS.
Many devices (particularly network cards) will behave poorly
if you don't change this option.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Programming with Bourne or C shell

2004-12-31 Thread Michael Madden
I have most of my interactive shell experience using bash on Linux and shell 
programing on Unix-like systems with Bourne shell.  Since FreeBSD's default 
shell is csh/tcsh, I was wondering if it's still considered an atrocity to 
develop shell scripts with C shell:

http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

Are most FreeBSD users still using csh or tcsh has their interactive
shell and sh for programming?  I think it would be nice to use the same 
interactive and programming shell for consistency.

Thanks,
Mike

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Playing DVDs with xine

2004-03-18 Thread Michael Madden
Has anyone gotten xine to play DVDs? I have installed
it from /usr/ports/multimedia/xine and setup /dev/dvd,
but I keep getting this error:
This is xine (X11 gui) - a free video player v0.9.23.
(c) 2000-2003 The xine Team.
libdvdnav: Using dvdnav version 1-rc3a from http://xine.sf.net
libdvdread: Using libdvdcss version 1.2.8 for DVD access
libdvdread: Could not open /dev/dvd with libdvdcss.
libdvdread: Can't open /dev/dvd for reading
libdvdnav: vm: faild to open/read the DVD
ls -l /dev/dvd /dev/cd0

crw-rw-rw-  1 root  operator4,  20 Mar 18 07:47 /dev/cd0
lrwxr-xr-x  1 root  wheel3 Mar 18 17:51 /dev/dvd - /dev/cd0
Thanks,
Mike
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


SMP on FreeBSD 5.2.1

2004-03-18 Thread Michael Madden
It looks FreeBSD detects both my processors from dmesg,
but I've noticed that top and slmon don't show both
processors.  Is this a problem with top or slmon?
Should I be using a different tool to monitor the
processors?
CPU: Intel Pentium III Xeon (794.66-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0x683  Stepping = 3
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
Thanks,
Mike
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD on PA-RISC workstations

2004-03-11 Thread Michael Madden
Is there any work going on to port FreeBSD
to PA-RISC (HPPA) based workstations (9000/700)?
We have numerous C110s, C180s, and C200s at
work that are just collecting dust. If we put
them to use that would be great.
Thanks,
Mike
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Recommend MTA

2004-03-06 Thread Michael Madden
Which MTA is the recommended one to use on FreeBSD?
I've noticed sendmail is installed by default, but
my book I've been learning FreeBSD from (The Complete
FreeBSD) only covers setting up postfix.  Should I
go ahead a learn/setup sendmail?  If so, where's
a good place to find a tutorial on setting it up
on FreeBSD?
Thanks,
Michael
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD 5.2 Router Setup

2004-02-13 Thread Michael Madden
I am trying to setup a pc with FreeBSD 5.2 as a
router.  I've got two NICs setup. My laptop
can ping the LAN side of the router (192.168.200.1),
and it can also ping the WAN side of the router (172.16.20.10).
However, I cannot get past the WAN side of the router to
other pcs or the internet, but if I login to the
router, I can see other pcs and the internet.
It almost seems like IP forwarding isn't working
isn't working on the router.
Here is /etc/rc.conf:

ifconfig_xl0=inet 172.16.20.10  netmask 255.255.0.0
ifconfig_xl1=inet 192.168.200.1  netmask 255.255.255.0
defaultrouter=172.16.255.1
gateway_enable=YES
hostname=pcmadden.cms-stl.com
linux_enable=YES
moused_enable=YES
ntpdate_enable=YES
ntpdate_flags=time-ext.missouri.edu
sshd_enable=YES
usbd_enable=YES
Here is the output of ifconfig:
xl0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
options=bRXCSUM,TXCSUM,VLAN_MTU
inet 172.16.20.10 netmask 0x broadcast 172.16.255.255
inet6 fe80::201:2ff:fe3f:5823%xl0 prefixlen 64 scopeid 0x1
ether 00:01:02:3f:58:23
media: Ethernet autoselect (100baseTX full-duplex)
status: active
xl1: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
options=bRXCSUM,TXCSUM,VLAN_MTU
inet 192.168.200.1 netmask 0xff00 broadcast 192.168.200.255
inet6 fe80::210:5aff:fea8:fd83%xl1 prefixlen 64 scopeid 0x2
ether 00:10:5a:a8:fd:83
media: Ethernet autoselect (none)
status: no carrier
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384
inet 127.0.0.1 netmask 0xff00
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
Here is the output of netstat -r:
Routing tables
Internet:
DestinationGatewayFlagsRefs  Use  Netif Expire
defaultguardian-int   UGS 0  516xl0
localhost  localhost  UH  02lo0
172.16 link#1 UC  00xl0
stldns 00:06:5b:8b:dd:9f  UHLW0   43xl0   1059
hulk   00:30:d3:01:98:f1  UHLW06xl0
light  00:c0:4f:a1:2b:f8  UHLW03xl0   1057
legolas00:06:5b:84:44:c5  UHLW0 1325xl0836
guardian-int   00:a0:8e:1d:bd:b4  UHLW10xl0660
192.168.200link#2 UC  00xl1
Internet6:
DestinationGatewayFlags  Netif Expire
localhost.cms-stl. localhost.cms-stl. UH  lo0
fe80::%xl0 link#1 UC  xl0
fe80::201:2ff:fe3f 00:01:02:3f:58:23  UHL lo0
fe80::%xl1 link#2 UC  xl1
fe80::210:5aff:fea 00:10:5a:a8:fd:83  UHL lo0
fe80::%lo0 fe80::1%lo0U   lo0
fe80::1%lo0link#3 UHL lo0
ff01:: localhost.cms-stl. U   lo0
ff02::%xl0 link#1 UC  xl0
ff02::%xl1 link#2 UC  xl1
ff02::%lo0 localhost.cms-stl. UC  lo0
Any help figuring this out would be greatly appreciated.

Thanks,
Michael
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]