Translation update done using Pootle.
[gammu.git] / tests / read-backup.c
bloba2cf56a41a31051c913ea0e635e9c01786029a48
1 #include <gammu.h>
2 #include <stdlib.h>
3 #include <stdio.h>
4 #include "common.h"
6 GSM_StateMachine *s;
8 int main(int argc, char **argv)
10 GSM_Error error;
11 GSM_Backup backup;
12 GSM_Debug_Info *debug_info;
14 if (argc != 2) {
15 printf("Usage: read-backup backup\n");
16 exit(1);
19 /* Configure debugging */
20 debug_info = GSM_GetGlobalDebug();
21 GSM_SetDebugFileDescriptor(stderr, FALSE, debug_info);
22 GSM_SetDebugLevel("textall", debug_info);
24 error = GSM_ReadBackupFile(argv[1], &backup, GSM_GuessBackupFormat(argv[1], FALSE));
25 gammu_test_result(error, "Read backup");
27 GSM_FreeBackup(&backup);
29 return 0;
32 /* Editor configuration
33 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: