summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/tests/expected/c/00901-code_width.c
blob: 6c2a99c7abc7aa31086af09fb517761fa02532e8 (plain)
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

static int short_function_name(struct device *dev,
                               struct device_driver *drv);

/* Assuming a 60-column limit */
static int short_function_name(struct device *dev,
                               struct device_driver *drv)
{
    this->translateLabels(labelID,
                          completedLabelID,
                          selectedLabelID,
                          text,
                          selectedText,
                          completedText,
                          fontId,
                          selectedFontId,
                          completedFontId);
    call_some_really_long_function.of_some_sort(
        some_long_parameter1,
        some_long_parameter2);

    abc = call_some_other_really_long_function.of_some_sort(
        some_long_parameter1,
        some_long_parameter2);

    abc.def.ghi =
        call_some_other_really_long_function.of_some_sort(
            some_long_parameter1,
            some_long_parameter2);

    abcdefghijklmnopqrstuvwxyz = abc + def + ghi + jkl +
                                 mno + prq + stu + vwx + yz;

    return 1;
}

typedef
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    yyyyyyyyyyyyyyyyyyyyyy;

typedef some_return_value (*some_function_type)(another_type
                                                parameter1,
                                                another_type
                                                parameter2);

typedef struct
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{
    int yyyyyyyyyyyyyyyyyyyyyy;
} x_t;

static void some_really_long_function_name(
    struct device *dev,
    struct device_driver *drv)
{
    if ((some_variable_name &&
         somefunction(param1, param2, param3))) {
        asdfghjk = asdfasdfasd.aasdfasd +
                   (asdfasd.asdas * 1234.65);
    }

    for (struct something_really_really_excessive *
         a_long_ptr_name = get_first_item();
         a_long_ptr_name != NULL;
         a_long_ptr_name = get_next_item(a_long_ptr_name))
    {
    }

    for (a = get_first(); a != NULL; a = GetNext(a))
    {
    }

    for (a_ptr = get_first(); a_ptr != NULL;
         a_ptr = GetNext(a))
    {
    }

    register_clcmd( "examine",
                    "do_examine",
                    -1,
                    "-Allows a player to examine the health and armor of a teammate" );
    register_clcmd( "/examine",
                    "do_examine",
                    -1,
                    "-Allows a player to examine the health and armor of a teammate" );
}