00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "giis.h"
00010
00011
00012
00013
00014
00015
00016
00017 int remove_giis ()
00018 {
00019 int i;
00020
00021 i = open (INSTALL_DIR1, 0);
00022 if (i == -1)
00023 {
00024 printf ("\n\t\t Install giis...and then try this :-)\n\n");
00025 return 0;
00026 }
00027 printf ("\n\t\tPress 1 : Continue Uninstall\n\t\tPress 2 : Abort");
00028 printf ("\n\t\tType in :");
00029 scanf ("%d", &i);
00030 if (i != 1)
00031 return 0;
00032
00033
00034
00035
00036 i = unlink (DIR_INFO_FILE);
00037 if (i == 0)
00038 printf ("\n\t%s Removed", DIR_INFO_FILE);
00039 else
00040 printf ("\n%s not Deleted...", DIR_INFO_FILE);
00041
00042 i = unlink (FILE_INFO_FILE);
00043 if (i == 0)
00044 printf ("\n\t%s Removed", FILE_INFO_FILE);
00045 else
00046 printf ("\n%s not Deleted...", FILE_INFO_FILE);
00047
00048 i = unlink (SIND_INFO_FILE);
00049 if (i == 0)
00050 printf ("\n\t%s Removed", SIND_INFO_FILE);
00051 else
00052 printf ("\n%s not Deleted...", SIND_INFO_FILE);
00053
00054 i = unlink (DIND_INFO_FILE);
00055
00056 if (i == 0)
00057 printf ("\n\t%s Removed", DIND_INFO_FILE);
00058 else
00059 printf ("\n%s not Deleted...", DIND_INFO_FILE);
00060
00061
00062 i = unlink (SAMPLE_DATA_FILE);
00063
00064 if (i == 0)
00065 printf ("\n\t%s Removed", SAMPLE_DATA_FILE);
00066 else
00067 printf ("\n%s not Deleted...", SAMPLE_DATA_FILE);
00068
00069
00070
00071 i = unlink ("/usr/bin/giis");
00072 if (i == 0)
00073 printf ("\n\t/usr/bin/giis Removed");
00074 else
00075 printf ("\n/usr/bin/giis not Deleted...");
00076
00077
00078
00079 i = unlink ("/giis/hai");
00080 if (i == 0)
00081 printf ("\n\t/giis/hai Removed");
00082 else
00083 printf ("\n/giis/hai not Deleted...");
00084
00085
00086 i = unlink ("/giis/quotes");
00087 if (i == 0)
00088 printf ("\n\t/giis/quotes Removed");
00089 else
00090 printf ("\n/giis/quotes not Deleted...");
00091
00092
00093
00094 rmdir (INSTALL_DIR3);
00095 rmdir (INSTALL_DIR2);
00096 rmdir (INSTALL_DIR4);
00097 i = rmdir (INSTALL_DIR1);
00098 if (i != 0)
00099 printf ("\n\t **Unable to Delete %s\n", INSTALL_DIR1);
00100 else
00101 printf
00102 ("\n\t **All Files Removed...\n\t***gET iT i sAY.giis-Uninstalled Successfully***\n");
00103 return 1;
00104 }