Browse Source

Fix identation

Phyks (Lucas Verney) 2 years ago
parent
commit
8a01dbcbb2
1 changed files with 15 additions and 15 deletions
  1. 15
    15
      main.cpp

+ 15
- 15
main.cpp View File

@@ -8,7 +8,7 @@ const int BUFFER_SIZE = 1024;
8 8
 struct data
9 9
 {
10 10
     std::string src;  // String to convert
11
-	size_t src_cur;  // Reader position in the string
11
+    size_t src_cur;  // Reader position in the string
12 12
 
13 13
     std::string dst;  // Converted string
14 14
 };
@@ -16,34 +16,34 @@ struct data
16 16
 
17 17
 int reader(char *buf, void *user_data)
18 18
 {
19
-	struct data *d = (struct data *) user_data;
19
+    struct data *d = (struct data *) user_data;
20 20
 
21
-	// See how much is left to read
22
-	size_t to_write = d->src.length() - d->src_cur;
21
+    // See how much is left to read
22
+    size_t to_write = d->src.length() - d->src_cur;
23 23
 
24
-	// If finished, tell that to pandoc
25
-	if (to_write == 0) {
26
-		return 0;
24
+    // If finished, tell that to pandoc
25
+    if (to_write == 0) {
26
+        return 0;
27 27
     }
28 28
 
29
-	// Make sure not to overflow the buffer
30
-	if (to_write > BUFFER_SIZE) {
31
-		to_write = BUFFER_SIZE;
29
+    // Make sure not to overflow the buffer
30
+    if (to_write > BUFFER_SIZE) {
31
+        to_write = BUFFER_SIZE;
32 32
     }
33 33
 
34
-	// Copy this chunk of data to the buffer
34
+    // Copy this chunk of data to the buffer
35 35
     std::strcpy(buf, (d->src.substr(d->src_cur, to_write)).c_str());
36
-	d->src_cur += to_write;
36
+    d->src_cur += to_write;
37 37
 
38
-	return to_write;
38
+    return to_write;
39 39
 }
40 40
 
41 41
 
42 42
 void writer(const char *buf, int len, void *user_data)
43 43
 {
44
-	struct data *d = (struct data *) user_data;
44
+    struct data *d = (struct data *) user_data;
45 45
 
46
-	// Append what pandoc has produced
46
+    // Append what pandoc has produced
47 47
     std::string buf_str = std::string(buf).substr(0, len);
48 48
     d->dst.append(buf_str);
49 49
 }