이 프로젝트는 설곽에서 이석 등 작업을 편리하게 할 수 있게 해주는 데에 목표가 있다.
설치는 다음 명령어를 통해 가능하다.
git clone https://github.com/adofai07/SSHSDB컴파일은 다음 명령어를 통해 가능하다.
gcc .\main.c .\getinput.c .\makeaccount.c .\u8string.c .\getsheet.c .\groups.c .\getenv.c -o main -lregex컴파일을 했다면 main.exe가 생성되었을 것이다. 이 main.exe를 실행하면 된다.
& .\main.exe| Name | File |
|---|---|
| 최은호 | u8string.c, MoveSeat.py |
| 안준혁 | Project Manager |
| 고민재 | main.c, typing.h |
| 신믿음 | getsheet.c, makeaccount.c |
| 김유현 | groups.c, getinput.c |
| 남규영 | None |
int main() {
return 0;
}while (int i = 0; i < 5; i++) {
// do something
}int *a, *b;// Do this
int a;
int b; // and not this/// @brief Checks is string is a positive integer
/// @param s string
/// @param len length of string
/// @return 0 if string is not an integer, 1 if it is
int is_number(char *s, int len) {
int chk = 1;
for (int i = 0; i < len; i++) {
if (!('0' <= s[i] && s[i] <= '9')) {
chk = 0;
break;
}
}
return chk;
}// Good
int memory_limit;
// Bad
int memoryLimit;struct account {
char email[50];
char password[50];
char name[50];
int role;
int student_no;
int pos_pts;
int neg_pts;
};
typedef struct account account_t;int a = (3 + 5) ^ 5;
int b = ~a;(),[],->,.,->*,.*는 피연산자와 붙여 쓴다.- 타입 캐스팅 연산자는 피연산자와 띄어 쓴다.
int a, b = 5, c;// Good
#define min(a,b) \
({ \
__typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; \
})
// Bad
#define min(a, b) (a < b ? a : b)int cnt[3] = { 0, 0, 0 };for (int i = 0; i < cnt; i++) {
fprintf(fptr, "%s %s %s %d %d %d %d\n",
accounts[i].email, accounts[i].password, accounts[i].name, accounts[i].role,
accounts[i].student_no, accounts[i].pos_pts, accounts[i].neg_pts);
}// Good
new_string = (char *) malloc((len + n_bytes + 1) * sizeof(char));
if (new_string == NULL) {
exit(EXIT_FAILURE);
}
// Bad
if ((new_string = (char *) malloc((len + n_bytes + 1) * sizeof(char))) == NULL) {
exit(EXIT_FAILURE);
}// Good
const char *a = "\uAC00";
// Bad
const char *a = "가";char s[7] = "\uC2DC\uBC1C";#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <wchar.h>
#include <locale.h>
#include "makeaccount.h"
#include "u8string.h"
#include "typing.h"#ifndef GETINPUT_H
#define GETINPUT_H
int is_number(char *, int);
int str_to_int(char *, int);
int get_input(int, int);
#endif| Name | What it does |
|---|---|
admin_accountRequest.txt |
pending account log |
admin_recovery.txt |
account recovery requests |
{teacher name}_move.txt |
move request to {teacher name} |
{teacher name}_out.txt |
outing request to {teacher name} |
notifications_global.txt |
global notifications |
notifications_{student id}.txt |
personal notifications: {student id} |
notifications_{teacher name}.txt |
personal notifications: {teacher name} |
notifications_admin.txt |
personal notifications: admin |
alleviations.txt |
list of applicable alleviations |
accounts.txt |
registered account data |
groups.txt |
list of generated groups |
sheet.txt |
sheet data |