I've only done my introductory course in C++ programming, but I did get a 98% in the class so I like to think I can learn quickly. I'd like to know some good references for FreeBSD programming. Namely I have a portsearch tcsh script that I would like to re-write in C/C++ and I'm not too familiar with dirent.h or vectors but I would like the following: create an index of all the port directories and store information in arrays or vectors about the directories/files in the ports tree such as:
-path relative to /usr/ports (function for search, e.g. search for xorg returns x11/xorg)
-arrays/vectors that hold information such as does the port contain a pkg-message or pkg-plist
-possibly how to save this information into an "index" file that would be speedier than my current scripting use of find and awk
-I'd probably create a function accessed via a command line parameter so that I could create an alias to portsnap and everytime I wanted to 'portsnap fetch update' it would run this after and create a new index
-possible integration with portmaster through system() (I know, I know...)
Any information or references would be greatly appreciated
-path relative to /usr/ports (function for search, e.g. search for xorg returns x11/xorg)
-arrays/vectors that hold information such as does the port contain a pkg-message or pkg-plist
-possibly how to save this information into an "index" file that would be speedier than my current scripting use of find and awk
-I'd probably create a function accessed via a command line parameter so that I could create an alias to portsnap and everytime I wanted to 'portsnap fetch update' it would run this after and create a new index
-possible integration with portmaster through system() (I know, I know...)
Any information or references would be greatly appreciated