Rearrange contacts-service.service from default.target to delayed.target
[platform/core/pim/contacts-service.git] / build-util / DB-schema-gen.c
1 /*
2  * Contacts Service
3  *
4  * Copyright (c) 2010 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19 #include <stdio.h>
20 #include <stdlib.h>
21
22 int main(int argc, char **argv)
23 {
24         FILE *fp;
25         int c;
26
27         if (argc < 2)
28                 exit(EXIT_FAILURE);
29
30         fp = fopen(argv[1], "r");
31         if (fp == NULL)
32                 exit(EXIT_FAILURE);
33
34         do {
35                 c = fgetc(fp);
36                 switch (c) {
37                 case '\n':
38                         printf("\\\n");
39                         break;
40                 case '-':
41                         if ('-' == (c = fgetc(fp))) {
42                                 while ('\n' != c && EOF != c)
43                                         c = fgetc(fp);
44                                 printf("\\\n");
45                         } else {
46                                 printf("-%c", c);
47                         }
48                         break;
49                 case EOF:
50                         break;
51                 default:
52                         printf("%c", c);
53                 }
54         } while (EOF != c);
55
56         exit(EXIT_SUCCESS);
57 }
58