diff --git a/Makefile b/Makefile index 9403b83e..5bf77ee1 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \ swad_course_config.o swad_cryptography.o \ swad_database.o swad_date.o swad_degree.o swad_degree_config.o \ swad_degree_type.o swad_department.o swad_duplicate.o \ - swad_enrolment.o swad_exam.o swad_exam_log.o \ + swad_enrolment.o swad_error.o swad_exam.o swad_exam_log.o \ swad_exam_print.o swad_exam_result.o swad_exam_session.o \ swad_exam_set.o \ swad_figure.o swad_figure_cache.o swad_file.o swad_file_browser.o \ diff --git a/icon/filext32x32/cct32x32.gif b/icon/filext32x32/cct32x32.gif new file mode 100644 index 00000000..5bf90d0c Binary files /dev/null and b/icon/filext32x32/cct32x32.gif differ diff --git a/icon/filext32x32/clf32x32.gif b/icon/filext32x32/clf32x32.gif new file mode 100644 index 00000000..5bf90d0c Binary files /dev/null and b/icon/filext32x32/clf32x32.gif differ diff --git a/icon/filext32x32/tim32x32.gif b/icon/filext32x32/tim32x32.gif new file mode 100644 index 00000000..5bf90d0c Binary files /dev/null and b/icon/filext32x32/tim32x32.gif differ diff --git a/swad_API.c b/swad_API.c index 0217a89e..bf8e8e66 100644 --- a/swad_API.c +++ b/swad_API.c @@ -105,6 +105,7 @@ cp -f /home/acanas/swad/swad/swad /var/www/cgi-bin/ #include "swad_API.h" #include "swad_attendance.h" #include "swad_database.h" +#include "swad_error.h" #include "swad_file_browser.h" #include "swad_forum.h" #include "swad_global.h" @@ -1653,7 +1654,7 @@ static int API_WritePageIntoHTMLBuffer (struct soap *soap, /***** Write page from file to text buffer *****/ /* Open file */ if ((FileHTML = fopen (PathRelFileHTML,"rb")) == NULL) - Lay_ShowErrorAndExit ("Can not open XML file."); + Err_ShowErrorAndExit ("Can not open XML file."); /* Compute file size */ fseek (FileHTML,0L,SEEK_END); @@ -1664,7 +1665,7 @@ static int API_WritePageIntoHTMLBuffer (struct soap *soap, if ((*HTMLBuffer = malloc (Length + 1)) == NULL) { fclose (FileHTML); - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); return soap_receiver_fault (soap, "Web page can not be copied into buffer", "Not enough memory for buffer"); @@ -2262,7 +2263,7 @@ int swad__sendMyGroups (struct soap *soap, /***** Create a list of groups selected from myGroups *****/ if ((LstGrpsIWant.GrpCods = calloc (LstGrpsIWant.NumGrps, sizeof (*LstGrpsIWant.GrpCods))) == NULL) - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); for (NumGrp = 0, Ptr = myGroups; *Ptr; NumGrp++) @@ -2836,7 +2837,7 @@ static void API_GetLstGrpsSel (const char *Groups) // Here NestedCalls is always 1 if ((Gbl.Crs.Grps.LstGrpsSel.GrpCods = calloc (Gbl.Crs.Grps.LstGrpsSel.NumGrps, sizeof (*Gbl.Crs.Grps.LstGrpsSel.GrpCods))) == NULL) - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); for (Ptr = Groups, NumGrp = 0; *Ptr; @@ -3636,7 +3637,7 @@ int swad__sendMessage (struct soap *soap, /***** Allocate space for query *****/ if ((Query = malloc (API_MAX_BYTES_QUERY_RECIPIENTS + 1)) == NULL) - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); /***** Build query for recipients from database *****/ if (ReplyUsrCod > 0) diff --git a/swad_HTML.c b/swad_HTML.c index 6948a57a..83712a21 100644 --- a/swad_HTML.c +++ b/swad_HTML.c @@ -30,6 +30,7 @@ #include // For vasprintf #include // For free +#include "swad_error.h" #include "swad_global.h" #include "swad_HTML.h" @@ -128,7 +129,7 @@ void HTM_TABLE_Begin (const char *fmt,...) NumBytesPrinted = vasprintf (&Class,fmt,ap); va_end (ap); if (NumBytesPrinted < 0) // -1 if no memory or any other error - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); /***** Print HTML *****/ HTM_TxtF ("",Class); @@ -252,7 +253,7 @@ void HTM_TBODY_Begin (const char *fmt,...) NumBytesPrinted = vasprintf (&Attr,fmt,ap); va_end (ap); if (NumBytesPrinted < 0) // -1 if no memory or any other error - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); /***** Print HTML *****/ HTM_TxtF ("",Attr); @@ -294,7 +295,7 @@ void HTM_TR_Begin (const char *fmt,...) NumBytesPrinted = vasprintf (&Attr,fmt,ap); va_end (ap); if (NumBytesPrinted < 0) // -1 if no memory or any other error - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); /***** Print HTML *****/ HTM_TxtF ("",Attr); @@ -391,7 +392,7 @@ static void HTM_TH_BeginAttr (const char *fmt,...) NumBytesPrinted = vasprintf (&Attr,fmt,ap); va_end (ap); if (NumBytesPrinted < 0) // -1 if no memory or any other error - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); /***** Print HTML *****/ HTM_TxtF ("
",Attr); @@ -453,7 +454,7 @@ void HTM_TD_Begin (const char *fmt,...) NumBytesPrinted = vasprintf (&Attr,fmt,ap); va_end (ap); if (NumBytesPrinted < 0) // -1 if no memory or any other error - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); /***** Print HTML *****/ HTM_TxtF ("",Attr); @@ -528,7 +529,7 @@ void HTM_DIV_Begin (const char *fmt,...) NumBytesPrinted = vasprintf (&Attr,fmt,ap); va_end (ap); if (NumBytesPrinted < 0) // -1 if no memory or any other error - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); /***** Print HTML *****/ HTM_TxtF ("
",Attr); @@ -619,7 +620,7 @@ void HTM_SPAN_Begin (const char *fmt,...) NumBytesPrinted = vasprintf (&Attr,fmt,ap); va_end (ap); if (NumBytesPrinted < 0) // -1 if no memory or any other error - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); /***** Print HTML *****/ HTM_TxtF ("",Attr); @@ -685,7 +686,7 @@ void HTM_UL_Begin (const char *fmt,...) NumBytesPrinted = vasprintf (&Attr,fmt,ap); va_end (ap); if (NumBytesPrinted < 0) // -1 if no memory or any other error - Lay_NotEnoughMemoryExit (); + Err_NotEnoughMemoryExit (); /***** Print HTML *****/ HTM_TxtF ("