((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/proccpuinfo" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "egg" "binding" "library")) (section 2 "proccpuinfo" (p "A binding for the libproccpuinfo library") (toc) (section 3 "Usage Example" (pre " (use proccpuinfo)") (pre " (proccpuinfo 'architecture)\n (proccpuinfo 'hardware-platform)\n (proccpuinfo 'frequency)\n (proccpuinfo 'bogomips)\n (proccpuinfo 'cache)\n (proccpuinfo 'cpus)\n (proccpuinfo 'cputype)")) (section 3 "Requirements" (ul (li (link "https://savannah.nongnu.org/projects/proccpuinfo/" "libproccpuinfo") " (version 0.0.8)"))) (section 3 "Repository" (p "The proccpuinfo egg is maintained in a " (link "https://gitorious.org/dryad/proccpuinfo/" "Gitorious repository"))) (section 3 "Synopsis" (p "This egg contains thoroughly commented Chicken code (mainly in the " (tt "\"proccpuinfo.scm\"") " file) which is intended to be an example of how a basic Chicken binding of a simple C library can be created.")) (section 3 "Installation" (p "This binding is distributed as a Chicken egg.  To compile and install this egg, you must first download and install libproccpuinfo.") (p "libproccpuinfo can be downloaded from " (link "https://savannah.nongnu.org/projects/proccpuinfo/" "here") ".") (p "Its documentation can be found " (link "http://www.nongnu.org/proccpuinfo/libproccpuinfo-guide.html" "here") ".") (p "Once you've installed libproccpuinfo, you can compile and install this egg by typing:") (pre " chicken-install proccpuinfo") (section 4 "Note" (pre " This egg has only been tested with libproccpuinfo version 0.0.8"))) (section 3 "Troubleshooting tips" (p "If you receive an error from chicken-install about not being able to find " (tt "\"proccpuinfo.h\"") " or about not being able to find " (tt "\"-lproccpuinfo\"") ", try passing the locations of libproccpuinfo's header and library files to chicken-install via your shell's " (tt "CFLAGS") " and " (tt "LDFLAGS") " environment variables.") (p "For example, you could try running something like the following from your shell:") (pre " CFLAGS=-I/usr/local/libproccpuinfo/include LDFLAGS=-L/usr/local/libproccpuinfo/lib chicken-install proccpuinfo") (p "Substitute the path you've installed libproccpuinfo to in place of " (tt "\"/usr/local/libproccpuinfo\""))) (section 3 "List of Procedures" (p "This egg only exports a single procedure:") (def (sig (procedure "(proccpuinfo DESIRED-INFO [filename: FILENAME] [arch: ARCHITECTURE])" (id proccpuinfo))) (p "Where " (tt "DESIRED-INFO") " is one of the following:") (ul (li "'architecture") (li "'hardware-platform") (li "'frequency") (li "'bogomips") (li "'cache") (li "'cpus") (li "'cputype")) (p "and " (tt "FILENAME") " is an optional string containing the name of the file to read from instead of the default " (tt "\"/proc/cpuinfo\"")) (p "and " (tt "ARCHITECTURE") " is an optional string that will be used to interpret the cpuinfo file as if it was read on a different architecture.") (p "This procedure will return the desired entry from " (tt "\"/proc/cpuinfo\"") " or the given " (tt "FILENAME") ", or " (tt "#f") " if there is no such entry.") (p "Please see the " (link "http://www.nongnu.org/proccpuinfo/libproccpuinfo-guide.html" "libproccpuinfo documentation") " for more information."))) (section 3 "Internal Binding Documentation" (p "Please see the comments in the source (the \"proccpuinfo.scm\" file in particular) for a detailed explanation of how the binding works.  A tutorial article regarding this binding is forthcoming.  Watch " (int-link "/tutorials" "this space") ".")) (section 3 "License" (p "Copyright (C) 2012 - Sergey Goldgaber, Moritz Heidkamp, Christian Kellermann") (p "This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.") (p "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.") (p "You should have received a copy of the GNU Affero General Public License along with this program.  If not, see " (link "http://www.gnu.org/licenses/")))))