C언어 프로젝트에 쓰고 있는 코드 스켈레톤이다. 해당 란이 빈 경우는 타이틀부분을 삭제해서 정리하면 깔끔하다. 다른 깔끔한 코딩 스타일도 많겠지만, 가독성만 뛰어나면 이도 저도 다 좋은 것이라고 생각한다.
1. 헤더파일
/*
** ---------------------------------------------------------------------------
** filename: Skeleton.h
** description: Main Header
** Author: GoddessGuardian@exigate.com
** Created on: 2009/08/26
** ---------------------------------------------------------------------------
*/
#ifndef SKELETON_H_
#define SKELETON_H_
/*
** ---------------------------------------------------------------------------
** ENVIRONMENT DEFINITION
** ---------------------------------------------------------------------------
*/
//디버그, Win32등의 환경설정
/*
** ---------------------------------------------------------------------------
** INCLUDE FILES
** ---------------------------------------------------------------------------
*/
#include "WIPIheader.h"
/*
** ---------------------------------------------------------------------------
** DATA STRUCTURE LAYOUTS
** ---------------------------------------------------------------------------
*/
//소스코드에 사용될 데이터타입, 구조체 등의 정의
/*
** ---------------------------------------------------------------------------
** DEFINE VARIABLES
** ---------------------------------------------------------------------------
*/
#define something1 something2
/*
** ---------------------------------------------------------------------------
** FUNCTION PROTOTYPES
** ---------------------------------------------------------------------------
*/
//함수원형 선언
#endif //SKELETON_H_
2. 소스코드
/*
** ---------------------------------------------------------------------------
** filename: Skeleton.c
** description: Main Source
** Author: GoddessGuardian@exigate.com
** Created on: 2009/08/26
** ---------------------------------------------------------------------------
*/
/*
** ---------------------------------------------------------------------------
** INCLUDE FILES
** ---------------------------------------------------------------------------
*/
#include "Skeleton.h"
/*
** ---------------------------------------------------------------------------
** DECLARATION OF GLOBAL VARIABLES
** ---------------------------------------------------------------------------
*/
//전역변수 선언
/*
** ---------------------------------------------------------------------------
** FUNCTION PROTOTYPES
** ---------------------------------------------------------------------------
*/
//함수원형 선언
/*
** ---------------------------------------------------------------------------
** 자동으로 디버그와 빌드를 수행하는 함수 //함수설명을 간략하게 써준다
** Parameter: daf(바이너리 파일 식별자 값), mob(보조 파일 식별자 값), etc
** ---------------------------------------------------------------------------
*/
void autoDebugBuild( int daf, int mob )
{
//declaration
int i;
//initialization
i = 0;
//do automatic debug and build
return;
}