commit 60038de76ff051f7d08a9f1e4da8e780e0f14df5 parent 02acefb7e73875ab2cb029022b4f97efc9834ba6 Author: Abdul Rahim <abdul.rahim@myyahoo.com> Date: Thu, 3 Oct 2024 16:58:09 +0530 Deleted unnecessary comments in get_lang.c Diffstat:
A | description | | | 1 | + |
M | get_lang.c | | | 105 | ------------------------------------------------------------------------------- |
A | owner | | | 1 | + |
3 files changed, 2 insertions(+), 105 deletions(-)
diff --git a/description b/description @@ -0,0 +1 @@ +A light and fast web based git repository viewer diff --git a/get_lang.c b/get_lang.c @@ -81,108 +81,3 @@ const char *get_lang(const char* filename) return NULL; } } - -//int main() -//{ -// // Test Case 1: Standard Extensions -// printf("Input: program.c\n"); -// get_lang("program.c"); // Expected output: C -//printf("\n"); -// -// printf("Input: script.py\n"); -// get_lang("script.py"); // Expected output: Python -//printf("\n"); -// -// printf("Input: document.java\n"); -// get_lang("document.java"); // Expected output: Java -//printf("\n"); -// -// printf("Input: webpage.html\n"); -// get_lang("webpage.html"); // Expected output: HTML -//printf("\n"); -// -// // Test Case 2: No Extension -// printf("Input: file_without_extension\n"); -// get_lang("file_without_extension"); // Expected output: No language found -//printf("\n"); -// -// printf("Input: path/to/directory/file\n"); -// get_lang("path/to/directory/file"); // Expected output: No language found -//printf("\n"); -// -// // Test Case 3: Dot Files (Hidden Files on UNIX Systems) -// printf("Input: .hiddenfile\n"); -// get_lang(".hiddenfile"); // Expected output: No language found -//printf("\n"); -// -// printf("Input: /path/.config\n"); -// get_lang("/path/.config"); // Expected output: No language found -//printf("\n"); -// -// // Test Case 4: Files with Multiple Dots -// printf("Input: archive.tar.gz\n"); -// get_lang("archive.tar.gz"); // Expected output: GZip (or Tar if multiple extensions are supported) -//printf("\n"); -// -// printf("Input: backup.data.sql\n"); -// get_lang("backup.data.sql"); // Expected output: SQL -//printf("\n"); -// -// printf("Input: path/to/file.min.js\n"); -// get_lang("path/to/file.min.js"); // Expected output: JavaScript -//printf("\n"); -// -// // Test Case 5: Files with Double Dots -// printf("Input: file..py\n"); -// get_lang("file..py"); // Expected output: Python -//printf("\n"); -// -// printf("Input: weird..ext..c\n"); -// get_lang("weird..ext..c"); // Expected output: C -//printf("\n"); -// -// // Test Case 6: Trailing Dots (No Extension After) -// printf("Input: file_with_trailing_dot.\n"); -// get_lang("file_with_trailing_dot."); // Expected output: No language found -//printf("\n"); -// -// printf("Input: file_with..trailing_dots..\n"); -// get_lang("file_with..trailing_dots.."); // Expected output: No language found -//printf("\n"); -// -// // Test Case 7: Case Insensitivity -// printf("Input: script.PY\n"); -// get_lang("script.PY"); // Expected output: Python -//printf("\n"); -// -// printf("Input: program.JAVA\n"); -// get_lang("program.JAVA"); // Expected output: Java -//printf("\n"); -// -// printf("Input: index.HTML\n"); -// get_lang("index.HTML"); // Expected output: HTML -//printf("\n"); -// -// // Test Case 8: Non-Programming Extensions -// printf("Input: photo.jpg\n"); -// get_lang("photo.jpg"); // Expected output: No language found -//printf("\n"); -// -// printf("Input: document.pdf\n"); -// get_lang("document.pdf"); // Expected output: No language found -//printf("\n"); -// -// // Test Case 9: Invalid File Path -// printf("Input: /invalid/path/file\n"); -// get_lang("/invalid/path/file"); // Expected output: No language found -//printf("\n"); -// -// // Test Case 10: Language Map File Missing -// // Rename or remove exts.json and run the program -// printf("Input: file.py\n"); -// get_lang("file.py"); // Expected output: Unable to open file: exts.json -//printf("\n"); -// -// return 0; -//} -// diff --git a/owner b/owner @@ -0,0 +1 @@ +Abdul Rahim