Skip to content

Commit

Permalink
fixed some directory issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeSH825 committed Sep 22, 2019
1 parent 6672da4 commit 9497b80
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 35 deletions.
73 changes: 61 additions & 12 deletions Chamelange/Debug/Chamelange.log
Original file line number Diff line number Diff line change
@@ -1,14 +1,63 @@
 main.c
D:\Git\Chamelange\Chamelange\main.c(24,1): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\time.h(506): message : 'localtime' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\main.c(74,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\main.c(75,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\main.c(80,1): warning C4996: 'fscanf': This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(1197): message : 'fscanf' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\main.c(93,1): warning C4996: 'fscanf': This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(1197): message : 'fscanf' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\main.c(157,1): warning C4996: '_sleep': This function or variable has been superceded by newer library or operating system functionality. Consider using Sleep instead. See online help for details.
 fileManage.c
D:\Git\Chamelange\Chamelange\fileManage.c(11,1): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(1774): message : 'sprintf' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(51,8): warning C4013: 'gotoxy'이(가) 정의되지 않았습니다. extern은 int형을 반환하는 것으로 간주합니다.
D:\Git\Chamelange\Chamelange\fileManage.c(83,6): warning C4013: 'main'이(가) 정의되지 않았습니다. extern은 int형을 반환하는 것으로 간주합니다.
D:\Git\Chamelange\Chamelange\fileManage.c(85,10): warning C4098: 'save_File': 'void' 함수에서 값을 반환하고 있습니다.
D:\Git\Chamelange\Chamelange\fileManage.c(44,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(53,1): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(1274): message : 'scanf' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(55,1): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(90): message : 'strcat' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(56,1): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(90): message : 'strcat' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(59,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(72,1): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(1774): message : 'sprintf' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(74,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(49,7): warning C4101: 'folder' :참조되지 않은 지역 변수입니다.
D:\Git\Chamelange\Chamelange\fileManage.c(41,6): warning C4101: 'b' :참조되지 않은 지역 변수입니다.
D:\Git\Chamelange\Chamelange\fileManage.c(40,6): warning C4101: 'fail' :참조되지 않은 지역 변수입니다.
D:\Git\Chamelange\Chamelange\fileManage.c(174,8): warning C4013: 'editor'이(가) 정의되지 않았습니다. extern은 int형을 반환하는 것으로 간주합니다.
D:\Git\Chamelange\Chamelange\fileManage.c(114,1): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(1274): message : 'scanf' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(115,1): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(90): message : 'strcat' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(116,1): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(90): message : 'strcat' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(117,1): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(1774): message : 'sprintf' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(118,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(122,1): warning C4996: '_sleep': This function or variable has been superceded by newer library or operating system functionality. Consider using Sleep instead. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdlib.h(1274): message : '_sleep' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(126,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(144,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(110,7): warning C4101: 'load' :참조되지 않은 지역 변수입니다.
D:\Git\Chamelange\Chamelange\fileManage.c(104,6): warning C4101: 'i' :참조되지 않은 지역 변수입니다.
D:\Git\Chamelange\Chamelange\fileManage.c(105,6): warning C4101: 't' :참조되지 않은 지역 변수입니다.
D:\Git\Chamelange\Chamelange\fileManage.c(181,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(195,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(224,1): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(1274): message : 'scanf' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(226,1): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(90): message : 'strcat' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(227,1): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(90): message : 'strcat' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(228,1): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(1774): message : 'sprintf' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(229,1): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h(208): message : 'fopen' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(233,1): warning C4996: '_sleep': This function or variable has been superceded by newer library or operating system functionality. Consider using Sleep instead. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdlib.h(1274): message : '_sleep' 선언을 참조하십시오.
D:\Git\Chamelange\Chamelange\fileManage.c(217,6): warning C4101: 'i' :참조되지 않은 지역 변수입니다.
D:\Git\Chamelange\Chamelange\fileManage.c(253): warning C4716: 'find_File': 값을 반환해야 합니다.
D:\Git\Chamelange\Chamelange\fileManage.c(261): warning C4716: 'file_Manager': 값을 반환해야 합니다.
Chamelange.vcxproj -> D:\Git\Chamelange\Chamelange\Debug\Chamelange.exe
Binary file modified Chamelange/Debug/Chamelange.tlog/CL.command.1.tlog
Binary file not shown.
Binary file modified Chamelange/Debug/Chamelange.tlog/CL.read.1.tlog
Binary file not shown.
Binary file modified Chamelange/Debug/Chamelange.tlog/CL.write.1.tlog
Binary file not shown.
30 changes: 11 additions & 19 deletions Chamelange/fileManage.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ void save_File() //Save_as
{
int fail;
int b;
char loc[100] = { "C:https://UDiT//" }; //파일 저장 경로
char temp_loc[20] = { "C:https://UDiT//temp.txt" }; //임시 파일 저장 경로
FILE* in = fopen("C:https://UDiT//temp.txt", "rb");
char loc[100] = { "./" }; //파일 저장 경로
char temp_loc[20] = { "./temp.txt" }; //임시 파일 저장 경로
FILE* in = fopen("./temp.txt", "rb");
FILE* out = NULL;
char name[50];

Expand All @@ -56,7 +56,7 @@ void save_File() //Save_as
strcat(loc, name); //합성

//FILE *bmk = fopen("C:https://UDiT//bookmarks.txt", "r+");
FILE* ref = fopen("C:https://UDiT//recentfiles.txt", "r+");
FILE* ref = fopen("./recentfiles.txt", "r+");
/*if (bmkn == 1)
{
fprintf(bmk, " %s\n", loc);
Expand Down Expand Up @@ -104,7 +104,7 @@ int open_File()
int i;
int t;
char b;
char temp_path[100] = { "C:https://UDiT//" };//찾으려는 경로
char temp_path[100] = { "./" };//찾으려는 경로
char file_path[100];
char temp[50];
char load[1000];
Expand All @@ -123,7 +123,7 @@ int open_File()
system("cls");
main();
}
FILE* tmp = fopen("C:https://UDiT//temp.txt", "wb");
FILE* tmp = fopen("./temp.txt", "wb");

while (1) //파일 복사
{
Expand All @@ -141,7 +141,7 @@ int open_File()
fclose(in); // 수정하려는 파일 복사 완료 => 닫기
fclose(tmp); // 다른 모드로 열려고 함
system("cls");
FILE* tmpa = fopen("C:https://UDiT//temp.txt", "r+");
FILE* tmpa = fopen("./temp.txt", "r+");
gotoxy(0, 1);

//시연때 에러난 부분
Expand Down Expand Up @@ -178,7 +178,7 @@ int open_File()
int open_e_File(FILE* in)
{
char b;
FILE* out = fopen("C:https://UDiT//temp.txt", "wb");
FILE* out = fopen("./temp.txt", "wb");

while (1) //파일 복사
{
Expand All @@ -192,7 +192,7 @@ int open_e_File(FILE* in)
fclose(in); // 수정하려는 파일 복사 완료 => 닫기
fclose(out); // 다른 모드로 열려고 함
system("cls");
FILE* tmpa = fopen("C:https://UDiT//temp.txt", "r+");
FILE* tmpa = fopen("./temp.txt", "r+");
gotoxy(0, 1);
while (1) //파일 옮기기, 뿌리기
{
Expand All @@ -210,20 +210,12 @@ int open_e_File(FILE* in)
return 0;
}

int new_File() //newFile은 단순히 경로 없으면 경로 만드는걸로 하면 안될까?
{
FILE* tmp = NULL;
tmp = fopen("C:https://UDiT//temp.txt", "w+"); //이전에 사용하던거 있으면 지우고 새로 열기
edit_Interface();
editor();

return 0;
}

int find_File() //시간 되면 리스트 출력 다른 경로에서도 찾자
{
int i;
char loc[100] = { "C:https://UDiT//" }; //찾으려는 파일 경로
char loc[100] = { "./" }; //찾으려는 파일 경로
char temp[50];//파일이름
char loca[100];
char sel_o;
Expand Down Expand Up @@ -262,7 +254,7 @@ int open_e_File(FILE* in)

int file_Manager()
{
char path[100] = "C:https://UDiT//";
char path[100] = "./";
GetfileList(path);
system("pause");
main();
Expand Down
2 changes: 1 addition & 1 deletion Chamelange/fileManage.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void save_File();
void copy_file(FILE* in, FILE* out);
int open_File();
int open_e_File(FILE* in);
int new_File();

int find_File();
int file_Manager();

Expand Down
1 change: 1 addition & 0 deletions Chamelange/line_temp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 change: 1 addition & 0 deletions Chamelange/temp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17 changes: 14 additions & 3 deletions Chamelange/textEditor.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@

//#define COLORS


int new_File() //newFile은 단순히 경로 없으면 경로 만드는걸로 하면 안될까?
{
FILE* tmp = NULL;
tmp = fopen("./temp.txt", "w+"); //이전에 사용하던거 있으면 지우고 새로 열기
edit_Interface();
editor();

return 0;
}

int editor() //에디팅 끝난 다음에 fclose()
{
int i;
Expand All @@ -16,7 +27,7 @@
int t_point;
int last_ch = -1;

FILE* tmp = fopen("C:https://UDiT//temp.txt", "r+"); //에디터는 무조건 temp 파일에서만
FILE* tmp = fopen("./temp.txt", "r+"); //에디터는 무조건 temp 파일에서만

now_Line(line); //현재 줄 수 확인

Expand Down Expand Up @@ -350,7 +361,7 @@
case 'Y':
{
//bmkn = 1;
FILE* bmk = fopen("C:https://UDiT//bookmarks.txt", "r+");
FILE* bmk = fopen("./bookmarks.txt", "r+");
fseek(bmk, 0, SEEK_END);
fprintf(bmk, "%d %d\n", pointer, line);
fflush(bmk);
Expand Down Expand Up @@ -408,7 +419,7 @@
int j_x = now_x();
int i_y = now_y();

FILE* tmp = fopen("C:https://UDiT//line_temp.txt", "w+"); //읽기모드로 임시파일 접근
FILE* tmp = fopen("./line_temp.txt", "w+"); //읽기모드로 임시파일 접근
if (last_line = 1) //뒤에 뭔가 있을때만
{
copy_file(fp, tmp); //원래 파일의 다음 라인부터 끝까지 복사
Expand Down
1 change: 1 addition & 0 deletions Chamelange/textEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

//#define COLORS

int new_File();
int editor();
void save_Line(FILE* fp, char* buffer);
void print_whole_file(FILE* fp, int line);
Expand Down

0 comments on commit 9497b80

Please sign in to comment.