summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLibravatar Mubashshir <ahmubashshir@gmail.com>2025-05-22 17:49:46 +0600
committerLibravatar Mubashshir <ahmubashshir@gmail.com>2025-05-22 17:49:46 +0600
commitcefb440148fd80cac7537b3743dd0e018df3a797 (patch)
tree33ad297fd7226d4ef74678194cce444ba0d7cf90 /src/main.c
parentff1ba1e770b4205c2cc367ff513325e5f22c73e8 (diff)
downloadc-obp-example-cefb440148fd80cac7537b3743dd0e018df3a797.tar.gz
c-obp-example-cefb440148fd80cac7537b3743dd0e018df3a797.zip
Rework class template
Signed-off-by: Mubashshir <ahmubashshir@gmail.com>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 650cf05..ecb1e65 100644
--- a/src/main.c
+++ b/src/main.c
@@ -13,19 +13,19 @@ void process(ref(char) line, unsigned idx, team obj)
unsigned s;
switch(idx) {
case 1:
- set(obj, name, line);
+ Set(obj, name, line);
break;
case 2:
- set(obj, institution, line);
+ Set(obj, institution, line);
break;
case 3:
sscanf(line, "%u", &s);
- set(obj, solved, s);
+ Set(obj, solved, s);
break;
case 4: // falls through
case 5: // falls through
case 6:
- set(obj, member_name, idx - 3, line);
+ Set(obj, member_name, idx - 3, line);
break;
default:
break;
@@ -48,7 +48,7 @@ int main()
}
for(i = 0; i < num; i++) {
- teams[i] = new(team);
+ teams[i] = New(team);
unsigned idx = 0;
while (idx ++ < 6) {
getline(line, 255, stdin);
@@ -56,10 +56,10 @@ int main()
}
}
- team champion = call(dref(teams), find_champion, teams, num);
- call(champion, printf);
+ team champion = Call(dref(teams), find_champion, teams, num);
+ Call(champion, printf);
- while(num --) del(team, teams[num]);
+ while(num --) Del(team, teams[num]);
free(teams);
return 0;