]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/globals.h
Fix cmdline option handling
[netatalk.git] / include / atalk / globals.h
index 83fd3a1eeb0894e3795a001c9103c77ff35129ec..5607b3294c6c45f136c61af2e7c59b9dd39d7477 100644 (file)
  * Ini config sections
  **********************************************************************************************/
 
-#define INISEC_GLOBAL "General"
+#define INISEC_GLOBAL "Global"
 #define INISEC_AFP    "AFP"
 #define INISEC_CNID   "CNID"
 
 struct DSI;
 #define AFPOBJ_TMPSIZ (MAXPATHLEN)
 
-/* a couple of these options could get stuck in unions to save
- * space. */
 struct afp_volume_name {
     time_t     mtime;
-    char       *name;
-    char       *full_name;
     int        loaded;
 };
 
@@ -106,14 +102,12 @@ struct afp_options {
 };
 
 typedef struct AFPObj {
-    int argc;
-    char **argv;
-    int statuslen;
-    char status[1400];
+    const char *cmdlineconfigfile;
+    int cmdlineflags;
     const void *signature;
     struct DSI *dsi;
     struct afp_options options;
-    const dictionary *iniconfig;
+    dictionary *iniconfig;
     char username[MAXUSERLEN];
     /* to prevent confusion, only use these in afp_* calls */
     char oldtmp[AFPOBJ_TMPSIZ + 1], newtmp[AFPOBJ_TMPSIZ + 1];
@@ -144,7 +138,7 @@ extern const char         *Cnid_port;
 
 extern int  get_afp_errno   (const int param);
 extern void afp_options_init (struct afp_options *);
-extern int  afp_options_parse_cmdline (int ac, char **av);
+extern void afp_options_parse_cmdline(AFPObj *obj, int ac, char **av);
 extern int  afp_config_parse(AFPObj *AFPObj);
 extern void afp_options_free(struct afp_options *);
 extern void setmessage (const char *);