diff options
author | jbj <devnull@localhost> | 1999-10-21 18:20:12 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-10-21 18:20:12 +0000 |
commit | d1a5cef88a7340caf881c5a7b1689bcaf37f06c4 (patch) | |
tree | 29aac5c39815f08015e9ea52cc77f18ae6edc97a /popt/popt.h | |
parent | 3ae84a6867ec831d2a3bcc0423565104626efd28 (diff) | |
download | rpm-d1a5cef88a7340caf881c5a7b1689bcaf37f06c4.tar.gz rpm-d1a5cef88a7340caf881c5a7b1689bcaf37f06c4.tar.bz2 rpm-d1a5cef88a7340caf881c5a7b1689bcaf37f06c4.zip |
lclint annotations.
CVS patchset: 3391
CVS date: 1999/10/21 18:20:12
Diffstat (limited to 'popt/popt.h')
-rw-r--r-- | popt/popt.h | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/popt/popt.h b/popt/popt.h index 2d9ea8c0a..459dea70e 100644 --- a/popt/popt.h +++ b/popt/popt.h @@ -55,17 +55,17 @@ struct poptOption { /*@observer@*/ /*@null@*/ const char * longName; /* may be NULL */ char shortName; /* may be '\0' */ int argInfo; - /*@dependent@*/ /*@null@*/ void * arg; /* depends on argInfo */ + /*@shared@*/ /*@null@*/ void * arg; /* depends on argInfo */ int val; /* 0 means don't return, just update flag */ - /*@null@*/ const char * descrip; /* description for autohelp -- may be NULL */ - /*@null@*/ const char * argDescrip; /* argument description for autohelp */ + /*@shared@*/ /*@null@*/ const char * descrip; /* description for autohelp -- may be NULL */ + /*@shared@*/ /*@null@*/ const char * argDescrip; /* argument description for autohelp */ }; struct poptAlias { - /*@null@*/ const char * longName; /* may be NULL */ + /*@owned@*/ /*@null@*/ const char * longName; /* may be NULL */ char shortName; /* may be '\0' */ int argc; - const char ** argv; /* must be free()able */ + /*@owned@*/ const char ** argv; /* must be free()able */ }; extern struct poptOption poptHelpOptions[]; @@ -85,22 +85,23 @@ typedef void (*poptCallbackType)(poptContext con, const struct poptOption * opt, const char * arg, const void * data); -poptContext poptGetContext(const char * name, int argc, char ** argv, - const struct poptOption * options, int flags); +/*@only@*/ poptContext poptGetContext(/*@keep@*/ const char * name, + int argc, /*@keep@*/ char ** argv, + /*@keep@*/ const struct poptOption * options, int flags); void poptResetContext(poptContext con); /* returns 'val' element, -1 on last item, POPT_ERROR_* on error */ int poptGetNextOpt(poptContext con); /* returns NULL if no argument is available */ -char * poptGetOptArg(poptContext con); +/*@observer@*/ /*@null@*/ char * poptGetOptArg(poptContext con); /* returns NULL if no more options are available */ -char * poptGetArg(poptContext con); -const char * poptPeekArg(poptContext con); -const char ** poptGetArgs(poptContext con); +/*@observer@*/ /*@null@*/ char * poptGetArg(poptContext con); +/*@observer@*/ /*@null@*/ const char * poptPeekArg(poptContext con); +/*@observer@*/ /*@null@*/ const char ** poptGetArgs(poptContext con); /* returns the option which caused the most recent error */ -const char * poptBadOption(poptContext con, int flags); -void poptFreeContext(poptContext con); -int poptStuffArgs(poptContext con, const char ** argv); +/*@observer@*/ const char * poptBadOption(poptContext con, int flags); +void poptFreeContext( /*@only@*/ poptContext con); +int poptStuffArgs(poptContext con, /*@keep@*/ const char ** argv); int poptAddAlias(poptContext con, struct poptAlias alias, int flags); int poptReadConfigFile(poptContext con, const char * fn); /* like above, but reads /etc/popt and $HOME/.popt along with environment @@ -110,12 +111,12 @@ int poptReadDefaultConfig(poptContext con, int useEnv); the same as " and both may include \ quotes */ int poptParseArgvString(const char * s, /*@out@*/ int * argcPtr, /*@out@*/ char *** argvPtr); -const char * poptStrerror(const int error); +/*@observer@*/ const char *const poptStrerror(const int error); void poptSetExecPath(poptContext con, const char * path, int allowAbsolute); void poptPrintHelp(poptContext con, FILE * f, int flags); void poptPrintUsage(poptContext con, FILE * f, int flags); void poptSetOtherOptionHelp(poptContext con, const char * text); -const char * poptGetInvocationName(poptContext con); +/*@observer@*/ const char * poptGetInvocationName(poptContext con); #ifdef __cplusplus } |