File: main.c

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (108 lines) | stat: -rw-r--r-- 2,944 bytes parent folder | download | duplicates (23)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#include <stdio.h>

void set_char(void)
{
    char i = 'a';
    printf("before (char) i = %c\n", i);
    printf("after  (char) i = %c\n", i);    // Set break point #1. //// break $source:$line
}

void set_uchar(void)
{
    unsigned char i = 'a';
    printf("before (unsigned char) i = %c\n", i);
    printf("after  (unsigned char) i = %c\n", i);   //// break $source:$line
}

void set_short(void)
{
    short i = 33;
    printf("before (short) i = %i\n", i);
    printf("after  (short) i = %i\n", i);   //// break $source:$line
}

void set_ushort(void)
{
    unsigned short i = 33;
    printf("before (unsigned short) i = %i\n", i);
    printf("after  (unsigned short) i = %i\n", i);  // Set break point #2. //// break $source:$line
}

void set_int(void)
{
    int i = 33;
    printf("before (int) i = %i\n", i);
    printf("after  (int) i = %i\n", i); //// break $source:$line
}

void set_uint(void)
{
    unsigned int i = 33;
    printf("before (unsigned int) i = %u\n", i);
    printf("after  (unsigned int) i = %u\n", i);    //// break $source:$line
}

void set_long(void)
{
    long i = 33;
    printf("before (long) i = %li\n", i);
    printf("after  (long) i = %li\n", i);   // Set break point #3. //// break $source:$line
}

void set_ulong(void)
{
    unsigned long i = 33;
    printf("before (unsigned long) i = %lu\n", i);
    printf("after  (unsigned long) i = %lu\n", i);  //// break $source:$line
}

void set_float(void)
{
    float i = 2.25;
    printf("before (float) i = %g\n", i);
    printf("after  (float) i = %g\n", i);   //// break $source:$line
}

void set_double(void)
{
    double i = 2.25;
    printf("before (double) i = %g\n", i);
    printf("after  (double) i = %g\n", i);  // Set break point #4. //// break $source:$line
}

void set_long_double(void)
{
    long double i = 2.25;
    printf("before (long double) i = %Lg\n", i);
    printf("after  (long double) i = %Lg\n", i);    // Set break point #5. //// break $source:$line
}

void set_point (void)
{
    struct point_tag {
        int x;
        int y;
    };
    struct point_tag points_2[2] = {
        {1,2},
        {3,4}
    };
}

int main (int argc, char const *argv[])
{
    // Continue to the breakpoint in set_char()
    set_char();         //// continue; var i; val -set 99 1
    set_uchar();        //// continue; var i; val -set 99 2
    set_short();        //// continue; var i; val -set -42 3
    set_ushort();       //// continue; var i; val -set 42 4
    set_int();          //// continue; var i; val -set -42 5
    set_uint();         //// continue; var i; val -set 42 6
    set_long();         //// continue; var i; val -set -42 7
    set_ulong();        //// continue; var i; val -set 42 8
    set_float();        //// continue; var i; val -set 123.456 9
    set_double();       //// continue; var i; val -set 123.456 10
    set_long_double();  //// continue; var i; val -set 123.456 11
    set_point ();       //// continue
    return 0;
}