Re: Silly Newbie Question
Re: Silly Newbie Question
- Subject: Re: Silly Newbie Question
- From: Markus Hitter <email@hidden>
- Date: Fri, 8 Mar 2002 19:55:56 +0100
Am Freitag den, 8. Mdrz 2002, um 18:40, schrieb Tom Gray:
I am new to Unix and OS-X, aren't we all.
Erm - not really. Until last year I had to run two boxes, now I
have all in one :-)
There is this thing called the
Terminal, and sometimes, I can get "manual" pages on these
really next C
routines. These manual pages list the header files I need to
include to use
these neat C routines, but,
Chances are good, the man page is out of date. Good idea to file
a bug on <
https://bugreport.apple.com>
no where on my hard disk can I find those header files.
(For example, type "man sha")
Me not, too.
Are all those neat routines which are described
in the Terminal's man pages accessible to Cocoa or not?
In principle yes, but a lot of details changed and documentation
couldn't close up yet.
If you use zsh or bash, something like this might be helpful in
your .zshrc/.bashrc:
function locateheader {
locate \*.h | while read F; do
if fgrep $1 "$F" 2>/dev/null; then echo "$F"; fi;
done
}
(somebody with tcsh experience wants to translate this?)
To find the proper header, one would use it like:
locateheader SHA1_
The results on my box below, but I must admit, I didn't upgrade
to December Developer Tools yet:
Nobile:~$ locateheader SHA1_
#define CKSUMTYPE_HMAC_SHA1_DES3 0x000c
/System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.
framework/Versions/A/Headers/krb5.h
#ifndef _NETINET6_SHA1_H_
#define _NETINET6_SHA1_H_
typedef struct sha1_ctxt SHA1_CTX;
#define SHA1_RESULTLEN (160/8)
#endif /*_NETINET6_SHA1_H_*/
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/crypto/sha1.
h
CSSM_ALGID_SSL3SHA1_MAC =
CSSM_ALGID_NONE + 66,
CSSM_ALGID_PKCS12_SHA1_PBE = CSSM_ALGID_NONE + 86,
/System/Library/Frameworks/Security.framework/Versions/A/Headers/cssmtype.
h
#ifndef _NETINET6_SHA1_H_
#define _NETINET6_SHA1_H_
typedef struct sha1_ctxt SHA1_CTX;
#define SHA1_RESULTLEN (160/8)
#endif /*_NETINET6_SHA1_H_*/
/usr/include/crypto/sha1.h
#ifndef APACHE_SHA1_H
#define APACHE_SHA1_H
} AP_SHA1_CTX;
API_EXPORT(void) ap_SHA1Init(AP_SHA1_CTX *context);
API_EXPORT(void) ap_SHA1Update(AP_SHA1_CTX *context, const char *input,
API_EXPORT(void) ap_SHA1Update_binary(AP_SHA1_CTX *context,
AP_SHA1_CTX *context);
#endif /* !APACHE_SHA1_H */
/usr/include/httpd/ap_sha1.h
#define CKSUMTYPE_HMAC_SHA1_DES3 0x000c
/usr/include/Kerberos/krb5.h
Hope that helps,
Markus
P.S.: I noticed recently, locate would find files added a few
hours before without explicitely updating the database. Was this
a halluscination or is this some really cool feature?
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.