Lieber Patrick,
ich habe zwar keine Ahnung vom Programmieren, aber ich habe mir mal die
Ausgaben/Meldungen im Programmtext angeschaut und angemerkt, an welchen
Stellen ich Satzzeichen setzen würde.
Keine Ahnung, welche Richtlinien für AqBanking gelten.
Liebe Grüße,
Paul
Am Montag, den 22.09.2008, 09:12 +0200 schrieb Patrick Prasse:
> + if (rv==GWEN_ARGS_RESULT_ERROR) {
> + fprintf(stderr, "ERROR: Could not parse arguments\n");
Punkt.
> + return 1;
> + }
> + else if (rv==GWEN_ARGS_RESULT_HELP) {
> + GWEN_BUFFER *ubuf;
> +
> + ubuf=GWEN_Buffer_new(0, 1024, 0, 1);
> + if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) {
> + fprintf(stderr, "ERROR: Could not create help string\n");
Punkt.
> + return 1;
> + }
> + fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf));
> + GWEN_Buffer_free(ubuf);
> + return 0;
> + }
> +
> + rv=AB_Banking_Init(ab);
> + if (rv) {
> + DBG_ERROR(0, "Error on init (%d)", rv);
Keine Ahnung, ob Punkt oder nicht.
> + return 2;
> + }
> +
> + rv=AB_Banking_OnlineInit(ab);
> + if (rv) {
> + DBG_ERROR(0, "Error on init (%d)", rv);
Ditto.
> + return 2;
> + }
> +
> + pro=AB_Banking_GetProvider(ab, "aqhbci");
> + assert(pro);
> +
> + bankId=GWEN_DB_GetCharValue(db, "bankId", 0, 0);
> + userId=GWEN_DB_GetCharValue(db, "userId", 0, 0);
> + customerId=GWEN_DB_GetCharValue(db, "customerId", 0, 0);
> + userName=GWEN_DB_GetCharValue(db, "userName", 0, 0);
> + delAll=GWEN_DB_GetIntValue(db, "all", 0, 0);
> + delAccounts=GWEN_DB_GetIntValue(db, "withAccounts", 0, 0);
> + pretend=GWEN_DB_GetIntValue(db, "pretend", 0, 0);
> +
> + matches = AB_User_List2_new();
> +
> + ul=AB_Banking_FindUsers(ab, AH_PROVIDER_NAME, "*", "*", "*", "*");
> + if (ul) {
> +
> + uit=AB_User_List2_First(ul);
> + if (uit) {
> + const char *s;
> + AB_USER *u;
> + int i=0;
> +
> + u=AB_User_List2Iterator_Data(uit);
> + assert(u);
> + while(u) {
> + int match = 1;
> +
> + if (match && bankId) {
> + s=AB_User_GetBankCode(u);
> + if (!s || !*s || -1==GWEN_Text_ComparePattern(s, bankId, 0))
> + match=0;
> + }
> +
> + if (match && userId) {
> + s=AB_User_GetUserId(u);
> + if (!s || !*s || -1==GWEN_Text_ComparePattern(s, userId, 0))
> + match=0;
> + }
> +
> + if (match && customerId) {
> + s=AB_User_GetCustomerId(u);
> + if (!s || !*s || -1==GWEN_Text_ComparePattern(s, customerId, 0))
> + match=0;
> + }
> +
> + if (match && userName) {
> + s=AB_User_GetUserName(u);
> + if (!s || !*s || -1==GWEN_Text_ComparePattern(s, userName, 0))
> + match=0;
> + }
> +
> + if( match )
> + {
> + match_count++;
> + fprintf(stdout, "User %d: Bank: %s/%s User Id: %s Customer Id:
> %s\n",
> + i++,
> + AB_User_GetCountry(u),
> + AB_User_GetBankCode(u),
> + AB_User_GetUserId(u),
> + AB_User_GetCustomerId(u));
> + AB_User_List2_PushBack( matches, u );
> +
> + haveaccounts_count += (AB_Banking_FindFirstAccountOfUser(ab, u) !=
> NULL ? 1 : 0 );
> + }
> +
> + u=AB_User_List2Iterator_Next(uit);
> + }
> + AB_User_List2Iterator_free(uit);
> + }
> + AB_User_List2_free(ul);
> + }
> +
> +
> + if( !match_count )
> + {
> + fprintf( stderr, "ERROR: No matching users\n" );
Punkt.
> + return 3;
> + }
> +
> + if( match_count > 1 && !delAll )
> + {
> + fprintf( stderr, "ERROR: %d users match. Refusing to delete more than
> one user. Please specify --all to delete all matching users.\n", match_count
> );
> + return 3;
> + }
> +
> + if( haveaccounts_count && !delAccounts )
> + {
> + fprintf( stderr, "ERROR: %d users still have accounts. Refusing to
> delete those users. Please specify --with-accounts to delete all accounts of
> matching users.\n", haveaccounts_count );
> + return 3;
> + }
> +
> + if( !pretend )
> + {
> + uit=AB_User_List2_First(matches);
> + if (uit) {
> + AB_USER *u;
> + int i=0;
> +
> + u=AB_User_List2Iterator_Data(uit);
> + assert(u);
> + while(u) {
> + int error = 0;
> +
> + if( delAccounts )
> + {
> + AB_ACCOUNT *a;
> + a = AB_Banking_FindFirstAccountOfUser( ab, u );
> + while( a )
> + {
> + rv = AB_Banking_DeleteAccount( ab, a );
> + if( rv )
> + {
> + fprintf( stderr, "ERROR: Error deleting account %d for user %d
> (%d), aborting this user.\n", AB_Account_GetUniqueId(a), i, rv );
aborting the deletion of account of this user? oder aborting operation
(Vorgang?)
> + error++;
> + error_count++;
> + }
> + else
> + fprintf( stdout, "Account %d deleted.\n",
> AB_Account_GetUniqueId(a) );
> + a = AB_Banking_FindFirstAccountOfUser( ab, u );
> + }
> + }
> +
> + if( !error )
> + {
> + rv = AB_Banking_DeleteUser( ab, u );
> + if( rv )
> + {
> + fprintf( stderr, "ERROR: Error deleting user %d (%d).\n", i, rv
> );
> + error++;
> + error_count++;
> + }
> + else
> + fprintf( stdout, "User %d deleted.\n", i );
> + }
> +
> + u=AB_User_List2Iterator_Next(uit);
> + i++;
> + }
> + AB_User_List2Iterator_free(uit);
> + }
> + AB_User_List2_free(matches);
> + } // !pretend
> + else
> + {
> + fprintf( stdout, "Nothing deleted.\n" );
> + }
> +
> + rv=AB_Banking_OnlineFini(ab);
> + if (rv) {
> + fprintf(stderr, "ERROR: Error on deinit (%d)\n", rv);
Punkt?
> + return 5;
> + }
> +
> +
> + rv=AB_Banking_Fini(ab);
> + if (rv) {
> + fprintf(stderr, "ERROR: Error on deinit (%d)\n", rv);
Punkt?
> + return 5;
> + }
> +
> + return error_count > 0 ? 3 : 0;
> +}
> +
> +
> +
> +
> +
Neue leere Zeilen?
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Aqbanking-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/aqbanking-devel
