mirror of https://github.com/acanas/swad-core.git
Version19.54.6
This commit is contained in:
parent
e0e6b8295c
commit
4731e69f3f
10
swad_API.c
10
swad_API.c
|
@ -2849,7 +2849,7 @@ int swad__sendAttendanceUsers (struct soap *soap,
|
|||
Att.AttCod,SubQueryAllUsrs);
|
||||
|
||||
/* Free memory for subquery string */
|
||||
free ((void *) SubQueryAllUsrs);
|
||||
free (SubQueryAllUsrs);
|
||||
|
||||
/* Clean table att_usr */
|
||||
Att_RemoveUsrsAbsentWithoutCommentsFromAttEvent (Att.AttCod);
|
||||
|
@ -3089,7 +3089,7 @@ int swad__getNotifications (struct soap *soap,
|
|||
Length);
|
||||
|
||||
/* Free memory used by content string */
|
||||
free ((void *) ContentStr);
|
||||
free (ContentStr);
|
||||
ContentStr = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -4751,9 +4751,9 @@ static void API_ListDir (unsigned Level,const char *Path,const char *PathInTree)
|
|||
}
|
||||
}
|
||||
|
||||
free ((void *) FileList[NumFile]);
|
||||
free (FileList[NumFile]);
|
||||
}
|
||||
free ((void *) FileList);
|
||||
free (FileList);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5082,7 +5082,7 @@ int swad__getMarks (struct soap *soap,
|
|||
getMarksOut->content = (char *) soap_malloc (Gbl.soap,Length + 1);
|
||||
Str_Copy (getMarksOut->content,ContentStr,
|
||||
Length);
|
||||
free ((void *) ContentStr);
|
||||
free (ContentStr);
|
||||
ContentStr = NULL;
|
||||
}
|
||||
else
|
||||
|
|
42
swad_HTML.c
42
swad_HTML.c
|
@ -122,7 +122,7 @@ void HTM_TABLE_Begin (const char *fmt,...)
|
|||
|
||||
HTM_TABLE_NestingLevel++;
|
||||
|
||||
free ((void *) Class);
|
||||
free (Class);
|
||||
}
|
||||
else
|
||||
HTM_TABLE_BeginWithoutAttr ();
|
||||
|
@ -247,7 +247,7 @@ void HTM_TR_Begin (const char *fmt,...)
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<tr %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_TR_BeginWithoutAttr ();
|
||||
|
@ -347,7 +347,7 @@ static void HTM_TH_BeginAttr (const char *fmt,...)
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<th %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_TH_BeginWithoutAttr ();
|
||||
|
@ -412,7 +412,7 @@ void HTM_TD_Begin (const char *fmt,...)
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<td %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_TD_BeginWithoutAttr ();
|
||||
|
@ -490,7 +490,7 @@ void HTM_DIV_Begin (const char *fmt,...)
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<div %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_DIV_BeginWithoutAttr ();
|
||||
|
@ -584,7 +584,7 @@ void HTM_UL_Begin (const char *fmt,...)
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<ul %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_UL_BeginWithoutAttr ();
|
||||
|
@ -636,7 +636,7 @@ void HTM_LI_Begin (const char *fmt,...)
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<li %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_LI_BeginWithoutAttr ();
|
||||
|
@ -688,7 +688,7 @@ void HTM_A_Begin (const char *fmt,...)
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<a %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_A_BeginWithoutAttr ();
|
||||
|
@ -768,7 +768,7 @@ void HTM_LABEL_Begin (const char *fmt,...)
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<label %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_LABEL_BeginWithoutAttr ();
|
||||
|
@ -825,7 +825,7 @@ void HTM_INPUT_TEXT (const char *Name,unsigned MaxLength,const char *Value,bool
|
|||
/***** Print attributes *****/
|
||||
fprintf (Gbl.F.Out," %s",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -863,7 +863,7 @@ void HTM_INPUT_SEARCH (const char *Name,unsigned MaxLength,const char *Value,
|
|||
/***** Print attributes *****/
|
||||
fprintf (Gbl.F.Out," %s",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -897,7 +897,7 @@ void HTM_INPUT_TEL (const char *Name,const char *Value,bool SubmitOnChange,
|
|||
/***** Print attributes *****/
|
||||
fprintf (Gbl.F.Out," %s",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -935,7 +935,7 @@ void HTM_INPUT_EMAIL (const char *Name,unsigned MaxLength,const char *Value,
|
|||
/***** Print attributes *****/
|
||||
fprintf (Gbl.F.Out," %s",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -969,7 +969,7 @@ void HTM_INPUT_URL (const char *Name,const char *Value,bool SubmitOnChange,
|
|||
/***** Print attributes *****/
|
||||
fprintf (Gbl.F.Out," %s",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1057,7 +1057,7 @@ void HTM_INPUT_RADIO (const char *Name,bool SubmitOnClick,
|
|||
/***** Print attributes *****/
|
||||
fprintf (Gbl.F.Out," %s",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1092,7 +1092,7 @@ void HTM_INPUT_CHECKBOX (const char *Name,bool SubmitOnChange,
|
|||
/***** Print attributes *****/
|
||||
fprintf (Gbl.F.Out," %s",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1128,7 +1128,7 @@ void HTM_TEXTAREA_Begin (const char *fmt,...)
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<textarea %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_TEXTAREA_BeginWithoutAttr ();
|
||||
|
@ -1181,7 +1181,7 @@ void HTM_SELECT_Begin (bool SubmitOnChange,
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<select %s",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
else
|
||||
HTM_SELECT_BeginWithoutAttr ();
|
||||
|
@ -1213,7 +1213,7 @@ void HTM_SELECT_End (void)
|
|||
HTM_SELECT_NestingLevel--;
|
||||
}
|
||||
|
||||
void HTM_OPTION (HTM_Type_t Type,void *ValuePtr,bool Selected,bool Disabled,
|
||||
void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,bool Selected,bool Disabled,
|
||||
const char *fmt,...)
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -1256,7 +1256,7 @@ void HTM_OPTION (HTM_Type_t Type,void *ValuePtr,bool Selected,bool Disabled,
|
|||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"%s",Content);
|
||||
|
||||
free ((void *) Content);
|
||||
free (Content);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1306,7 +1306,7 @@ void HTM_IMG (const char *URL,const char *Icon,const char *Title,
|
|||
/***** Print attributes *****/
|
||||
fprintf (Gbl.F.Out," %s",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
free (Attr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ void HTM_TEXTAREA_End (void);
|
|||
void HTM_SELECT_Begin (bool SubmitOnChange,
|
||||
const char *fmt,...);
|
||||
void HTM_SELECT_End (void);
|
||||
void HTM_OPTION (HTM_Type_t Type,void *ValuePtr,bool Selected,bool Disabled,
|
||||
void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,bool Selected,bool Disabled,
|
||||
const char *fmt,...);
|
||||
|
||||
void HTM_IMG (const char *URL,const char *Icon,const char *Title,
|
||||
|
|
|
@ -156,7 +156,7 @@ void ID_FreeListIDs (struct UsrData *UsrDat)
|
|||
{
|
||||
/***** Free list *****/
|
||||
if (UsrDat->IDs.Num && UsrDat->IDs.List)
|
||||
free ((void *) UsrDat->IDs.List);
|
||||
free (UsrDat->IDs.List);
|
||||
|
||||
/***** Reset list *****/
|
||||
UsrDat->IDs.List = NULL;
|
||||
|
@ -236,7 +236,7 @@ unsigned ID_GetListUsrCodsFromUsrID (struct UsrData *UsrDat,
|
|||
"");
|
||||
|
||||
/***** Free memory for subquery string *****/
|
||||
free ((void *) SubQueryAllUsrs);
|
||||
free (SubQueryAllUsrs);
|
||||
|
||||
if (ListUsrCods->NumUsrs)
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ void MFU_AllocateMFUActions (struct MFU_ListMFUActions *ListMFUActions,unsigned
|
|||
void MFU_FreeMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
||||
{
|
||||
if (ListMFUActions->Actions != NULL)
|
||||
free ((void *) ListMFUActions->Actions);
|
||||
free (ListMFUActions->Actions);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -120,7 +120,7 @@ void QR_ImageQRCode (const char *QRString)
|
|||
HTM_IMG (URL,NULL,QRString,
|
||||
"style=\"width:%upx;height:%upx;border:1px dashed silver;\"",
|
||||
QR_CODE_SIZE,QR_CODE_SIZE);
|
||||
free ((void *) URL);
|
||||
free (URL);
|
||||
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod)
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (URL,NULL,Txt_Shortcut,
|
||||
"style=\"width:%upx;height:%upx;\"",Size,Size);
|
||||
free ((void *) URL);
|
||||
free (URL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -165,7 +165,7 @@ void QR_ExamAnnnouncement (void)
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (URL,NULL,Txt_Link_to_announcement_of_exam,
|
||||
"style=\"width:250px;height:250px;\"");
|
||||
free ((void *) URL);
|
||||
free (URL);
|
||||
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
|
|
@ -758,7 +758,7 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x6);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
|
||||
/* Event */
|
||||
|
@ -1080,7 +1080,7 @@ static void Agd_GetListEvents (Agd_AgendaType_t AgendaType)
|
|||
OrderBySubQuery[Gbl.Agenda.SelectedOrder]);
|
||||
|
||||
/* Free allocated memory for subquery */
|
||||
free ((void *) UsrSubQuery);
|
||||
free (UsrSubQuery);
|
||||
|
||||
if (NumRows) // Events found...
|
||||
{
|
||||
|
@ -1199,7 +1199,7 @@ void Agd_FreeListEvents (void)
|
|||
if (Gbl.Agenda.LstIsRead && Gbl.Agenda.LstAgdCods)
|
||||
{
|
||||
/***** Free memory used by the list of events *****/
|
||||
free ((void *) Gbl.Agenda.LstAgdCods);
|
||||
free (Gbl.Agenda.LstAgdCods);
|
||||
Gbl.Agenda.LstAgdCods = NULL;
|
||||
Gbl.Agenda.Num = 0;
|
||||
Gbl.Agenda.LstIsRead = false;
|
||||
|
|
10
swad_alert.c
10
swad_alert.c
|
@ -184,14 +184,14 @@ static void Ale_ResetAlert (size_t i)
|
|||
/***** Free memory allocated for text *****/
|
||||
if (Gbl.Alerts.List[i].Text)
|
||||
{
|
||||
free ((void *) Gbl.Alerts.List[i].Text);
|
||||
free (Gbl.Alerts.List[i].Text);
|
||||
Gbl.Alerts.List[i].Text = NULL;
|
||||
}
|
||||
|
||||
/***** Free memory allocated for section *****/
|
||||
if (Gbl.Alerts.List[i].Section)
|
||||
{
|
||||
free ((void *) Gbl.Alerts.List[i].Section);
|
||||
free (Gbl.Alerts.List[i].Section);
|
||||
Gbl.Alerts.List[i].Section = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ void Ale_ShowAlert (Ale_AlertType_t AlertType,const char *fmt,...)
|
|||
Ale_ShowFixAlert (AlertType,Txt);
|
||||
|
||||
/***** Free text *****/
|
||||
free ((void *) Txt);
|
||||
free (Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ void Ale_ShowAlertAndButton (Act_Action_t NextAction,const char *Anchor,
|
|||
FuncParams,Button,TxtButton);
|
||||
|
||||
/***** Free text *****/
|
||||
free ((void *) Txt);
|
||||
free (Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -378,7 +378,7 @@ void Ale_ShowAlertAndButton1 (Ale_AlertType_t AlertType,const char *fmt,...)
|
|||
Ale_ShowFixAlertAndButton1 (AlertType,Txt);
|
||||
|
||||
/***** Free text *****/
|
||||
free ((void *) Txt);
|
||||
free (Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -394,7 +394,7 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
|
||||
/* Assignment title */
|
||||
|
@ -844,7 +844,7 @@ void Asg_FreeListAssignments (void)
|
|||
if (Gbl.Asgs.LstIsRead && Gbl.Asgs.LstAsgCods)
|
||||
{
|
||||
/***** Free memory used by the list of assignments *****/
|
||||
free ((void *) Gbl.Asgs.LstAsgCods);
|
||||
free (Gbl.Asgs.LstAsgCods);
|
||||
Gbl.Asgs.LstAsgCods = NULL;
|
||||
Gbl.Asgs.Num = 0;
|
||||
Gbl.Asgs.LstIsRead = false;
|
||||
|
|
|
@ -431,7 +431,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
|
||||
/* Attendance event title */
|
||||
|
@ -806,7 +806,7 @@ void Att_FreeListAttEvents (void)
|
|||
if (Gbl.AttEvents.LstIsRead && Gbl.AttEvents.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of attendance events *****/
|
||||
free ((void *) Gbl.AttEvents.Lst);
|
||||
free (Gbl.AttEvents.Lst);
|
||||
Gbl.AttEvents.Lst = NULL;
|
||||
Gbl.AttEvents.Num = 0;
|
||||
Gbl.AttEvents.LstIsRead = false;
|
||||
|
@ -1131,9 +1131,9 @@ void Att_RequestCreatOrEditAttEvent (void)
|
|||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_SELECT_Begin (false,
|
||||
"id=\"ComTchVisible\" name=\"ComTchVisible\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "N",!Att.CommentTchVisible,false,
|
||||
HTM_OPTION (HTM_Type_STRING,"N",!Att.CommentTchVisible,false,
|
||||
"%s",Txt_Hidden_MALE_PLURAL);
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "Y",Att.CommentTchVisible,false,
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",Att.CommentTchVisible,false,
|
||||
"%s",Txt_Visible_MALE_PLURAL);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
@ -2225,7 +2225,7 @@ static void Att_PutParamsCodGrps (long AttCod)
|
|||
}
|
||||
|
||||
Par_PutHiddenParamString (NULL,"GrpCods",GrpCods);
|
||||
free ((void *) GrpCods);
|
||||
free (GrpCods);
|
||||
}
|
||||
else
|
||||
/***** Write the boolean parameter that indicates if all the groups must be listed *****/
|
||||
|
@ -2478,7 +2478,7 @@ static unsigned Att_GetNumStdsFromAListWhoAreInAttEvent (long AttCod,long LstSel
|
|||
AttCod,SubQueryAllUsrs);
|
||||
|
||||
/***** Free memory for subquery string *****/
|
||||
free ((void *) SubQueryAllUsrs);
|
||||
free (SubQueryAllUsrs);
|
||||
}
|
||||
return NumStdsInAttEvent;
|
||||
}
|
||||
|
@ -2744,7 +2744,7 @@ static void Usr_ListOrPrintMyAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
|||
Box_BoxEnd ();
|
||||
|
||||
/***** Free memory for list of attendance events selected *****/
|
||||
free ((void *) Gbl.AttEvents.StrAttCodsSelected);
|
||||
free (Gbl.AttEvents.StrAttCodsSelected);
|
||||
|
||||
/***** Free list of groups selected *****/
|
||||
Grp_FreeListCodSelectedGrps ();
|
||||
|
@ -2830,10 +2830,10 @@ static void Usr_ListOrPrintUsrsAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
|||
Box_BoxEnd ();
|
||||
|
||||
/***** Free memory for list of attendance events selected *****/
|
||||
free ((void *) Gbl.AttEvents.StrAttCodsSelected);
|
||||
free (Gbl.AttEvents.StrAttCodsSelected);
|
||||
|
||||
/***** Free list of user codes *****/
|
||||
free ((void *) LstSelectedUsrCods);
|
||||
free (LstSelectedUsrCods);
|
||||
|
||||
/***** Free list of groups selected *****/
|
||||
Grp_FreeListCodSelectedGrps ();
|
||||
|
@ -3138,7 +3138,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
HTM_TD_Begin ("class=\"DAT LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.AttEvents.Lst[NumAttEvent].Title);
|
||||
|
@ -3583,7 +3583,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ void Ban_FreeListBanners (void)
|
|||
if (Gbl.Banners.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of banners *****/
|
||||
free ((void *) Gbl.Banners.Lst);
|
||||
free (Gbl.Banners.Lst);
|
||||
Gbl.Banners.Lst = NULL;
|
||||
Gbl.Banners.Num = 0;
|
||||
}
|
||||
|
@ -1092,7 +1092,7 @@ static void Ban_EditingBannerDestructor (void)
|
|||
/***** Free memory used for place *****/
|
||||
if (Ban_EditingBan != NULL)
|
||||
{
|
||||
free ((void *) Ban_EditingBan);
|
||||
free (Ban_EditingBan);
|
||||
Ban_EditingBan = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -372,8 +372,8 @@ static void Ctr_Configuration (bool PrintView)
|
|||
HTM_IMG (URL,Icon,Gbl.Hierarchy.Ctr.FullName,
|
||||
"class=\"%s\"",PrintView ? "CENTRE_PHOTO_PRINT" :
|
||||
"CENTRE_PHOTO_SHOW");
|
||||
free ((void *) Icon);
|
||||
free ((void *) URL);
|
||||
free (Icon);
|
||||
free (URL);
|
||||
if (PutLink)
|
||||
HTM_A_End ();
|
||||
HTM_DIV_End ();
|
||||
|
@ -434,7 +434,7 @@ static void Ctr_Configuration (bool PrintView)
|
|||
for (NumIns = 0;
|
||||
NumIns < Gbl.Hierarchy.Cty.Inss.Num;
|
||||
NumIns++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod,
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod == Gbl.Hierarchy.Ins.InsCod,false,
|
||||
"%s",Gbl.Hierarchy.Cty.Inss.Lst[NumIns].ShrtName);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -524,13 +524,13 @@ static void Ctr_Configuration (bool PrintView)
|
|||
Frm_StartForm (ActChgCtrPlcCfg);
|
||||
HTM_SELECT_Begin (true,
|
||||
"name=\"PlcCod\" class=\"INPUT_SHORT_NAME\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "0",
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Gbl.Hierarchy.Ctr.PlcCod == 0,false,
|
||||
"%s",Txt_Another_place);
|
||||
for (NumPlc = 0;
|
||||
NumPlc < Gbl.Plcs.Num;
|
||||
NumPlc++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Plcs.Lst[NumPlc].PlcCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Plcs.Lst[NumPlc].PlcCod,
|
||||
Gbl.Plcs.Lst[NumPlc].PlcCod == Gbl.Hierarchy.Ctr.PlcCod,false,
|
||||
"%s",Gbl.Plcs.Lst[NumPlc].ShrtName);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1358,7 +1358,7 @@ static void Ctr_FreePhotoAttribution (char **PhotoAttribution)
|
|||
{
|
||||
if (*PhotoAttribution)
|
||||
{
|
||||
free ((void *) *PhotoAttribution);
|
||||
free (*PhotoAttribution);
|
||||
*PhotoAttribution = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -1372,7 +1372,7 @@ void Ctr_FreeListCentres (void)
|
|||
if (Gbl.Hierarchy.Ins.Ctrs.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of courses in degree *****/
|
||||
free ((void *) Gbl.Hierarchy.Ins.Ctrs.Lst);
|
||||
free (Gbl.Hierarchy.Ins.Ctrs.Lst);
|
||||
Gbl.Hierarchy.Ins.Ctrs.Lst = NULL;
|
||||
Gbl.Hierarchy.Ins.Ctrs.Num = 0;
|
||||
}
|
||||
|
@ -1401,7 +1401,7 @@ void Ctr_WriteSelectorOfCentre (void)
|
|||
HTM_SELECT_Begin (false,
|
||||
"id=\"ctr\" name=\"ctr\" class=\"HIE_SEL\""
|
||||
" disabled=\"disabled\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "",
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Gbl.Hierarchy.Ctr.CtrCod < 0,true,
|
||||
"[%s]",Txt_Centre);
|
||||
|
||||
|
@ -1428,7 +1428,7 @@ void Ctr_WriteSelectorOfCentre (void)
|
|||
Lay_ShowErrorAndExit ("Wrong code of centre.");
|
||||
|
||||
/* Write option */
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &CtrCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&CtrCod,
|
||||
Gbl.Hierarchy.Ctr.CtrCod > 0 &&
|
||||
CtrCod == Gbl.Hierarchy.Ctr.CtrCod,false,
|
||||
"%s",row[1]);
|
||||
|
@ -1511,13 +1511,13 @@ static void Ctr_ListCentresForEdition (void)
|
|||
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
|
||||
HTM_SELECT_Begin (true,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "0",
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Ctr->PlcCod == 0,false,
|
||||
"%s",Txt_Another_place);
|
||||
for (NumPlc = 0;
|
||||
NumPlc < Gbl.Plcs.Num;
|
||||
NumPlc++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Plcs.Lst[NumPlc].PlcCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Plcs.Lst[NumPlc].PlcCod,
|
||||
Gbl.Plcs.Lst[NumPlc].PlcCod == Ctr->PlcCod,false,
|
||||
"%s",Gbl.Plcs.Lst[NumPlc].ShrtName);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1616,11 +1616,11 @@ static void Ctr_ListCentresForEdition (void)
|
|||
"name=\"Status\" class=\"INPUT_STATUS\"");
|
||||
|
||||
StatusUnsigned = (unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_PENDING);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &StatusUnsigned,true,false,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&StatusUnsigned,true,false,
|
||||
"%s",Txt_CENTRE_STATUS[Ctr_STATUS_PENDING]);
|
||||
|
||||
StatusUnsigned = (unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_ACTIVE);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &StatusUnsigned,false,false,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&StatusUnsigned,false,false,
|
||||
"%s",Txt_CENTRE_STATUS[Ctr_STATUS_ACTIVE]);
|
||||
|
||||
HTM_SELECT_End ();
|
||||
|
@ -2495,13 +2495,13 @@ static void Ctr_PutFormToCreateCentre (void)
|
|||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_SELECT_Begin (false,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL\">");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "0",
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Ctr_EditingCtr->PlcCod == 0,false,
|
||||
"%s",Txt_Another_place);
|
||||
for (NumPlc = 0;
|
||||
NumPlc < Gbl.Plcs.Num;
|
||||
NumPlc++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Plcs.Lst[NumPlc].PlcCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Plcs.Lst[NumPlc].PlcCod,
|
||||
Gbl.Plcs.Lst[NumPlc].PlcCod == Ctr_EditingCtr->PlcCod,false,
|
||||
"%s",Gbl.Plcs.Lst[NumPlc].ShrtName);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -2953,7 +2953,7 @@ static void Ctr_EditingCentreDestructor (void)
|
|||
/***** Free memory used for centre *****/
|
||||
if (Ctr_EditingCtr != NULL)
|
||||
{
|
||||
free ((void *) Ctr_EditingCtr);
|
||||
free (Ctr_EditingCtr);
|
||||
Ctr_EditingCtr = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -490,7 +490,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.54.5 (2019-11-06)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.54.6 (2019-11-06)"
|
||||
#define CSS_FILE "swad19.47.css"
|
||||
#define JS_FILE "swad19.39.js"
|
||||
/*
|
||||
|
@ -498,6 +498,7 @@ ps2pdf source.ps destination.pdf
|
|||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
|
||||
|
||||
Version 19.54.6: Nov 05, 2019 Code refactoring in HTML select options. (245941 lines)
|
||||
Version 19.54.5: Nov 05, 2019 Code refactoring in HTML select options. (245985 lines)
|
||||
Version 19.54.4: Nov 05, 2019 Code refactoring in HTML select options. (246023 lines)
|
||||
Version 19.54.3: Nov 05, 2019 Code refactoring in HTML select options. (246050 lines)
|
||||
|
|
|
@ -455,7 +455,7 @@ void Cla_FreeListClassrooms (void)
|
|||
if (Gbl.Classrooms.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of classrooms in institution *****/
|
||||
free ((void *) Gbl.Classrooms.Lst);
|
||||
free (Gbl.Classrooms.Lst);
|
||||
Gbl.Classrooms.Lst = NULL;
|
||||
Gbl.Classrooms.Num = 0;
|
||||
}
|
||||
|
@ -1060,7 +1060,7 @@ static void Cla_EditingClassroomDestructor (void)
|
|||
/***** Free memory used for classroom *****/
|
||||
if (Cla_EditingCla != NULL)
|
||||
{
|
||||
free ((void *) Cla_EditingCla);
|
||||
free (Cla_EditingCla);
|
||||
Cla_EditingCla = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ void Cfg_GetConfigFromFile (void)
|
|||
}
|
||||
|
||||
/* Copy file content into buffer */
|
||||
if (fread ((void *) Config,sizeof (char),Length,FileCfg) != Length)
|
||||
if (fread (Config,sizeof (char),Length,FileCfg) != Length)
|
||||
{
|
||||
fclose (FileCfg);
|
||||
Lay_ShowErrorAndExit ("Can not read config.");
|
||||
|
|
|
@ -860,8 +860,8 @@ void Cty_DrawCountryMap (struct Country *Cty,const char *Class)
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (URL,Icon,Cty->Name[Gbl.Prefs.Language],
|
||||
"class=\"%s\"",Class);
|
||||
free ((void *) Icon);
|
||||
free ((void *) URL);
|
||||
free (Icon);
|
||||
free (URL);
|
||||
}
|
||||
else
|
||||
Ico_PutIcon ("tr16x16.gif",Cty->Name[Gbl.Prefs.Language],Class);
|
||||
|
@ -1128,7 +1128,7 @@ void Cty_GetListCountries (Cty_GetExtraData_t GetExtraData)
|
|||
|
||||
/***** Free memory for subquery *****/
|
||||
if (OrderBySubQuery)
|
||||
free ((void *) OrderBySubQuery);
|
||||
free (OrderBySubQuery);
|
||||
|
||||
if (NumRows) // Countries found...
|
||||
{
|
||||
|
@ -1234,7 +1234,7 @@ void Cty_WriteSelectorOfCountry (void)
|
|||
Frm_StartFormGoTo (ActSeeIns);
|
||||
HTM_SELECT_Begin (true,
|
||||
"id=\"cty\" name=\"cty\" class=\"HIE_SEL\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "",Gbl.Hierarchy.Cty.CtyCod < 0,true,
|
||||
HTM_OPTION (HTM_Type_STRING,"",Gbl.Hierarchy.Cty.CtyCod < 0,true,
|
||||
"[%s]",Txt_Country);
|
||||
|
||||
/***** Get countries from database *****/
|
||||
|
@ -1258,7 +1258,7 @@ void Cty_WriteSelectorOfCountry (void)
|
|||
Lay_ShowErrorAndExit ("Wrong code of country.");
|
||||
|
||||
/* Write option */
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &CtyCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&CtyCod,
|
||||
CtyCod == Gbl.Hierarchy.Cty.CtyCod,false,
|
||||
"%s",row[1]);
|
||||
}
|
||||
|
@ -1568,7 +1568,7 @@ static void Cty_FreeMapAttribution (char **MapAttribution)
|
|||
{
|
||||
if (*MapAttribution)
|
||||
{
|
||||
free ((void *) *MapAttribution);
|
||||
free (*MapAttribution);
|
||||
*MapAttribution = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -1582,7 +1582,7 @@ void Cty_FreeListCountries (void)
|
|||
if (Gbl.Hierarchy.Sys.Ctys.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of courses in institution *****/
|
||||
free ((void *) Gbl.Hierarchy.Sys.Ctys.Lst);
|
||||
free (Gbl.Hierarchy.Sys.Ctys.Lst);
|
||||
Gbl.Hierarchy.Sys.Ctys.Lst = NULL;
|
||||
Gbl.Hierarchy.Sys.Ctys.Num = 0;
|
||||
}
|
||||
|
@ -2508,7 +2508,7 @@ static void Cty_EditingCountryDestructor (void)
|
|||
/***** Free memory used for country *****/
|
||||
if (Cty_EditingCty != NULL)
|
||||
{
|
||||
free ((void *) Cty_EditingCty);
|
||||
free (Cty_EditingCty);
|
||||
Cty_EditingCty = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ static void Crs_Configuration (bool PrintView)
|
|||
for (NumDeg = 0;
|
||||
NumDeg < Gbl.Hierarchy.Ctr.Degs.Num;
|
||||
NumDeg++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].DegCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].DegCod,
|
||||
Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].DegCod == Gbl.Hierarchy.Deg.DegCod,false,
|
||||
"%s",Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].ShrtName);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -346,7 +346,7 @@ static void Crs_Configuration (bool PrintView)
|
|||
for (Year = 0;
|
||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||
Year++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &Year,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
Year == Gbl.Hierarchy.Crs.Year,false,
|
||||
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -887,7 +887,7 @@ void Crs_WriteSelectorOfCourse (void)
|
|||
HTM_SELECT_Begin (false,
|
||||
"id=\"crs\" name=\"crs\" class=\"HIE_SEL\""
|
||||
" disabled=\"disabled\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "",Gbl.Hierarchy.Crs.CrsCod < 0,true,
|
||||
HTM_OPTION (HTM_Type_STRING,"",Gbl.Hierarchy.Crs.CrsCod < 0,true,
|
||||
"[%s]",Txt_Course);
|
||||
|
||||
if (Gbl.Hierarchy.Deg.DegCod > 0)
|
||||
|
@ -913,7 +913,7 @@ void Crs_WriteSelectorOfCourse (void)
|
|||
Lay_ShowErrorAndExit ("Wrong course.");
|
||||
|
||||
/* Write option */
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &CrsCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&CrsCod,
|
||||
Gbl.Hierarchy.Level == Hie_CRS && // Course selected
|
||||
CrsCod == Gbl.Hierarchy.Crs.CrsCod,false,
|
||||
"%s",row[1]);
|
||||
|
@ -1021,7 +1021,7 @@ void Crs_FreeListCoursesInCurrentDegree (void)
|
|||
if (Gbl.Hierarchy.Deg.Crss.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of courses in degree *****/
|
||||
free ((void *) Gbl.Hierarchy.Deg.Crss.Lst);
|
||||
free (Gbl.Hierarchy.Deg.Crss.Lst);
|
||||
Gbl.Hierarchy.Deg.Crss.Lst = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -1054,7 +1054,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
|
|||
|
||||
/***** Write an option when no course selected *****/
|
||||
if (Gbl.Hierarchy.Crs.CrsCod <= 0) // No course selected
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "-1",true,true,
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",true,true,
|
||||
"%s",Txt_Course);
|
||||
|
||||
if (Gbl.Usrs.Me.MyCrss.Num)
|
||||
|
@ -1077,7 +1077,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
|
|||
LastDegCod = DegCod;
|
||||
}
|
||||
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Usrs.Me.MyCrss.Crss[NumMyCrs].CrsCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Usrs.Me.MyCrss.Crss[NumMyCrs].CrsCod,
|
||||
CrsCod == Gbl.Hierarchy.Crs.CrsCod,false, // Course selected
|
||||
"%s",CrsShortName);
|
||||
}
|
||||
|
@ -1090,7 +1090,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
|
|||
when I don't belong to it *****/
|
||||
if (Gbl.Hierarchy.Level == Hie_CRS && // Course selected
|
||||
!Gbl.Usrs.Me.IBelongToCurrentCrs) // I do not belong to it
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Hierarchy.Crs.CrsCod,true,true,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Crs.CrsCod,true,true,
|
||||
"%s",Gbl.Hierarchy.Crs.ShrtName);
|
||||
|
||||
/***** End form *****/
|
||||
|
@ -1469,7 +1469,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
for (YearAux = 0;
|
||||
YearAux <= Deg_MAX_YEARS_PER_DEGREE;
|
||||
YearAux++) // All the years are permitted because it's possible to move this course to another degree (with other active years)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &YearAux,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&YearAux,
|
||||
YearAux == Crs->Year,false,
|
||||
"%s",Txt_YEAR_OF_DEGREE[YearAux]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1537,11 +1537,11 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
"name=\"Status\" class=\"INPUT_STATUS\"");
|
||||
|
||||
StatusUnsigned = (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &StatusUnsigned,true,false,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&StatusUnsigned,true,false,
|
||||
"%s",Txt_COURSE_STATUS[Crs_STATUS_PENDING]);
|
||||
|
||||
StatusUnsigned = (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_ACTIVE);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &StatusUnsigned,false,false,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&StatusUnsigned,false,false,
|
||||
"%s",Txt_COURSE_STATUS[Crs_STATUS_ACTIVE]);
|
||||
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1662,7 +1662,7 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
for (Year = 0;
|
||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||
Year++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &Year,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
Year == Crs_EditingCrs->Year,false,
|
||||
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -2973,7 +2973,7 @@ void Crs_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role)
|
|||
UsrDat->UsrCod,SubQuery);
|
||||
|
||||
/***** Free allocated memory for subquery *****/
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/***** List the courses (one row per course) *****/
|
||||
if (NumCrss)
|
||||
|
@ -3275,7 +3275,7 @@ void Crs_AskRemoveOldCrss (void)
|
|||
for (i = Crs_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS;
|
||||
i <= Crs_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS;
|
||||
i++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &i,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&i,
|
||||
i == MonthsWithoutAccess,false,
|
||||
"%u",i);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -3386,7 +3386,7 @@ static void Crs_EditingCourseDestructor (void)
|
|||
/***** Free memory used for course *****/
|
||||
if (Crs_EditingCrs != NULL)
|
||||
{
|
||||
free ((void *) Crs_EditingCrs);
|
||||
free (Crs_EditingCrs);
|
||||
Crs_EditingCrs = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3333,7 +3333,7 @@ static unsigned long DB_QuerySELECTusingQueryStr (char *Query,
|
|||
|
||||
/***** Query database and free query string pointer *****/
|
||||
Result = mysql_query (&Gbl.mysql,Query); // Returns 0 on success
|
||||
free ((void *) Query);
|
||||
free (Query);
|
||||
if (Result)
|
||||
DB_ExitOnMySQLError (MsgError);
|
||||
|
||||
|
@ -3411,7 +3411,7 @@ void DB_QueryINSERT (const char *MsgError,const char *fmt,...)
|
|||
|
||||
/***** Query database and free query string pointer *****/
|
||||
Result = mysql_query (&Gbl.mysql,Query); // Returns 0 on success
|
||||
free ((void *) Query);
|
||||
free (Query);
|
||||
if (Result)
|
||||
DB_ExitOnMySQLError (MsgError);
|
||||
}
|
||||
|
@ -3438,7 +3438,7 @@ long DB_QueryINSERTandReturnCode (const char *MsgError,const char *fmt,...)
|
|||
|
||||
/***** Query database and free query string pointer *****/
|
||||
Result = mysql_query (&Gbl.mysql,Query); // Returns 0 on success
|
||||
free ((void *) Query);
|
||||
free (Query);
|
||||
if (Result)
|
||||
DB_ExitOnMySQLError (MsgError);
|
||||
|
||||
|
@ -3468,7 +3468,7 @@ void DB_QueryREPLACE (const char *MsgError,const char *fmt,...)
|
|||
|
||||
/***** Query database and free query string pointer *****/
|
||||
Result = mysql_query (&Gbl.mysql,Query); // Returns 0 on success
|
||||
free ((void *) Query);
|
||||
free (Query);
|
||||
if (Result)
|
||||
DB_ExitOnMySQLError (MsgError);
|
||||
}
|
||||
|
@ -3495,7 +3495,7 @@ void DB_QueryUPDATE (const char *MsgError,const char *fmt,...)
|
|||
|
||||
/***** Query database and free query string pointer *****/
|
||||
Result = mysql_query (&Gbl.mysql,Query); // Returns 0 on success
|
||||
free ((void *) Query);
|
||||
free (Query);
|
||||
if (Result)
|
||||
DB_ExitOnMySQLError (MsgError);
|
||||
}
|
||||
|
@ -3522,7 +3522,7 @@ void DB_QueryDELETE (const char *MsgError,const char *fmt,...)
|
|||
|
||||
/***** Query database and free query string pointer *****/
|
||||
Result = mysql_query (&Gbl.mysql,Query); // Returns 0 on success
|
||||
free ((void *) Query);
|
||||
free (Query);
|
||||
if (Result)
|
||||
DB_ExitOnMySQLError (MsgError);
|
||||
}
|
||||
|
@ -3549,7 +3549,7 @@ void DB_Query (const char *MsgError,const char *fmt,...)
|
|||
|
||||
/***** Query database and free query string pointer *****/
|
||||
Result = mysql_query (&Gbl.mysql,Query); // Returns 0 on success
|
||||
free ((void *) Query);
|
||||
free (Query);
|
||||
if (Result)
|
||||
DB_ExitOnMySQLError (MsgError);
|
||||
}
|
||||
|
|
70
swad_date.c
70
swad_date.c
|
@ -172,7 +172,7 @@ void Dat_PutScriptDateFormat (Dat_Format_t Format)
|
|||
Dat_WriteLocalDateHMSFromUTC (Id,Gbl.StartExecutionTimeUTC,
|
||||
Format,Dat_SEPARATOR_NONE,
|
||||
false,true,false,0x0);
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -581,8 +581,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
for (Year = FirstYear;
|
||||
Year <= LastYear;
|
||||
Year++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%u</option>",
|
||||
Year,Year);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,false,false,
|
||||
"%u",Year);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -607,8 +607,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
for (Month = 1;
|
||||
Month <= 12;
|
||||
Month++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%s</option>",
|
||||
Month,Txt_MONTHS_SMALL[Month - 1]);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Month,false,false,
|
||||
"%s",Txt_MONTHS_SMALL[Month - 1]);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -629,8 +629,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
for (Day = 1;
|
||||
Day <= 31;
|
||||
Day++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%u</option>",
|
||||
Day,Day);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Day,false,false,
|
||||
"%u",Day);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -651,8 +651,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
for (Hour = 0;
|
||||
Hour <= 23;
|
||||
Hour++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%02u h</option>",
|
||||
Hour,Hour);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Hour,false,false,
|
||||
"%02u h",Hour);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -670,13 +670,11 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
"id=\"%sMinute\" name=\"%sMinute\""
|
||||
" onchange=\"setUTCFromLocalDateTimeForm('%s');\"",
|
||||
Id,ParamName,Id);
|
||||
|
||||
for (Minute = 0;
|
||||
Minute < 60;
|
||||
Minute += MinutesIInterval[FormSeconds])
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%02u '</option>",
|
||||
Minute,Minute);
|
||||
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Minute,false,false,
|
||||
"%02u '",Minute);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -699,8 +697,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
for (Second = 0;
|
||||
Second <= 59;
|
||||
Second++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%02u "</option>",
|
||||
Second,Second);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Second,false,false,
|
||||
"%02u "",Second);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
@ -713,7 +711,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
if (asprintf (&ParamTimeUTC,"%sTimeUTC",Id) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Par_PutHiddenParamLong (ParamTimeUTC,ParamTimeUTC,(long) TimeUTC);
|
||||
free ((void *) ParamTimeUTC);
|
||||
free (ParamTimeUTC);
|
||||
|
||||
/***** Script to set selectors to local date and time from UTC time *****/
|
||||
HTM_SCRIPT_Begin (NULL,NULL);
|
||||
|
@ -876,16 +874,14 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
Id,Id,
|
||||
Disabled ? " disabled=\"disabled\"" : "",
|
||||
Id);
|
||||
fprintf (Gbl.F.Out,"<option value=\"0\">-</option>");
|
||||
HTM_OPTION (HTM_Type_STRING,"0",false,false,
|
||||
"-");
|
||||
for (Year = FirstYear;
|
||||
Year <= LastYear;
|
||||
Year++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",Year);
|
||||
if (Year == DateSelected->Year)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%u</option>",Year);
|
||||
}
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
Year == DateSelected->Year,false,
|
||||
"%u",Year);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -907,16 +903,14 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
Id,Id,
|
||||
Disabled ? " disabled=\"disabled\"" : "",
|
||||
Id);
|
||||
fprintf (Gbl.F.Out,"<option value=\"0\">-</option>");
|
||||
for (Month = 1;
|
||||
HTM_OPTION (HTM_Type_STRING,"0",false,false,
|
||||
"-");
|
||||
for (Month = 1;
|
||||
Month <= 12;
|
||||
Month++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",Month);
|
||||
if (Month == DateSelected->Month)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",Txt_MONTHS_SMALL[Month - 1]);
|
||||
}
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Month,
|
||||
Month == DateSelected->Month,false,
|
||||
"%u",Txt_MONTHS_SMALL[Month - 1]);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -926,19 +920,17 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
"id=\"%sDay\" name=\"%sDay\"%s",
|
||||
Id,Id,
|
||||
Disabled ? " disabled=\"disabled\"" : "");
|
||||
fprintf (Gbl.F.Out,"<option value=\"0\">-</option>");
|
||||
HTM_OPTION (HTM_Type_STRING,"0",false,false,
|
||||
"-");
|
||||
NumDaysSelectedMonth = (DateSelected->Month == 0) ? 31 :
|
||||
((DateSelected->Month == 2) ? Dat_GetNumDaysFebruary (DateSelected->Year) :
|
||||
Dat_NumDaysMonth[DateSelected->Month]);
|
||||
for (Day = 1;
|
||||
for (Day = 1;
|
||||
Day <= NumDaysSelectedMonth;
|
||||
Day++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",Day);
|
||||
if (Day == DateSelected->Day)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%u</option>",Day);
|
||||
}
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Day,
|
||||
Day == DateSelected->Day,false,
|
||||
"%u",Day);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -363,11 +363,9 @@ static void Deg_Configuration (bool PrintView)
|
|||
for (NumCtr = 0;
|
||||
NumCtr < Gbl.Hierarchy.Ins.Ctrs.Num;
|
||||
NumCtr++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"%s>%s</option>",
|
||||
Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].CtrCod,
|
||||
Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].CtrCod == Gbl.Hierarchy.Ctr.CtrCod ? " selected=\"selected\"" :
|
||||
"",
|
||||
Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].ShrtName);
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].CtrCod,
|
||||
Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].CtrCod == Gbl.Hierarchy.Ctr.CtrCod,false,
|
||||
"%s",Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].ShrtName);
|
||||
HTM_SELECT_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -602,11 +600,9 @@ void Deg_WriteSelectorOfDegree (void)
|
|||
HTM_SELECT_Begin (false,
|
||||
"id=\"deg\" name=\"deg\" class=\"HIE_SEL\""
|
||||
" disabled=\"disabled\"");
|
||||
fprintf (Gbl.F.Out,"<option value=\"\"");
|
||||
if (Gbl.Hierarchy.Deg.DegCod < 0)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>",
|
||||
Txt_Degree);
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Gbl.Hierarchy.Deg.DegCod < 0,true,
|
||||
"[%s]",Txt_Degree);
|
||||
|
||||
if (Gbl.Hierarchy.Ctr.CtrCod > 0)
|
||||
{
|
||||
|
@ -632,11 +628,10 @@ void Deg_WriteSelectorOfDegree (void)
|
|||
Lay_ShowErrorAndExit ("Wrong degree.");
|
||||
|
||||
/* Write option */
|
||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",DegCod);
|
||||
if (Gbl.Hierarchy.Deg.DegCod > 0 &&
|
||||
(DegCod == Gbl.Hierarchy.Deg.DegCod))
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",row[1]);
|
||||
HTM_OPTION (HTM_Type_LONG,&DegCod,
|
||||
Gbl.Hierarchy.Deg.DegCod > 0 &&
|
||||
DegCod == Gbl.Hierarchy.Deg.DegCod,false,
|
||||
"%s",row[1]);
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
|
@ -688,6 +683,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
struct UsrData UsrDat;
|
||||
bool ICanEdit;
|
||||
Deg_StatusTxt_t StatusTxt;
|
||||
unsigned StatusUnsigned;
|
||||
unsigned NumCrss;
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
|
@ -775,11 +771,10 @@ static void Deg_ListDegreesForEdition (void)
|
|||
NumDegTyp++)
|
||||
{
|
||||
DegTyp = &Gbl.DegTypes.Lst[NumDegTyp];
|
||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"%s>%s</option>",
|
||||
DegTyp->DegTypCod,
|
||||
(DegTyp->DegTypCod == Deg->DegTypCod) ? " selected=\"selected\"" :
|
||||
"",
|
||||
DegTyp->DegTypName);
|
||||
HTM_OPTION (HTM_Type_LONG,&DegTyp->DegTypCod,
|
||||
Gbl.Hierarchy.Deg.DegCod > 0 &&
|
||||
DegTyp->DegTypCod == Deg->DegTypCod,false,
|
||||
"%s",DegTyp->DegTypName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
Frm_EndForm ();
|
||||
|
@ -837,12 +832,12 @@ static void Deg_ListDegreesForEdition (void)
|
|||
Deg_PutParamOtherDegCod (Deg->DegCod);
|
||||
HTM_SELECT_Begin (true,
|
||||
"name=\"Status\" class=\"INPUT_STATUS\"");
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
|
||||
"<option value=\"%u\">%s</option>",
|
||||
(unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING),
|
||||
Txt_DEGREE_STATUS[Deg_STATUS_PENDING],
|
||||
(unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_ACTIVE),
|
||||
Txt_DEGREE_STATUS[Deg_STATUS_ACTIVE]);
|
||||
StatusUnsigned = (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&StatusUnsigned,true,false,
|
||||
"%s",Txt_DEGREE_STATUS[Deg_STATUS_PENDING]);
|
||||
StatusUnsigned = (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_ACTIVE);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&StatusUnsigned,false,false,
|
||||
"%s",Txt_DEGREE_STATUS[Deg_STATUS_ACTIVE]);
|
||||
HTM_SELECT_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -974,11 +969,9 @@ static void Deg_PutFormToCreateDegree (void)
|
|||
NumDegTyp++)
|
||||
{
|
||||
DegTyp = &Gbl.DegTypes.Lst[NumDegTyp];
|
||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"%s>%s</option>",
|
||||
DegTyp->DegTypCod,
|
||||
DegTyp->DegTypCod == Deg_EditingDeg->DegTypCod ? " selected=\"selected\"" :
|
||||
"",
|
||||
DegTyp->DegTypName);
|
||||
HTM_OPTION (HTM_Type_LONG,&DegTyp->DegTypCod,
|
||||
DegTyp->DegTypCod == Deg_EditingDeg->DegTypCod,false,
|
||||
"%s",DegTyp->DegTypName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
@ -1466,7 +1459,7 @@ void Deg_FreeListDegs (struct ListDegrees *Degs)
|
|||
{
|
||||
if (Degs->Lst)
|
||||
{
|
||||
free ((void *) Degs->Lst);
|
||||
free (Degs->Lst);
|
||||
Degs->Lst = NULL;
|
||||
Degs->Num = 0;
|
||||
}
|
||||
|
@ -2616,7 +2609,7 @@ static void Deg_EditingDegreeDestructor (void)
|
|||
/***** Free memory used for degree *****/
|
||||
if (Deg_EditingDeg != NULL)
|
||||
{
|
||||
free ((void *) Deg_EditingDeg);
|
||||
free (Deg_EditingDeg);
|
||||
Deg_EditingDeg = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,22 +112,15 @@ void DT_WriteSelectorDegreeTypes (void)
|
|||
/* List degree types */
|
||||
HTM_SELECT_Begin (true,
|
||||
"id=\"OthDegTypCod\" name=\"OthDegTypCod\"");
|
||||
|
||||
fprintf (Gbl.F.Out,"<option value=\"-1\"");
|
||||
if (Gbl.Stat.DegTypCod == -1L)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",Txt_Any_type_of_degree);
|
||||
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Stat.DegTypCod == -1L,false,
|
||||
"%s",Txt_Any_type_of_degree);
|
||||
for (NumDegTyp = 0;
|
||||
NumDegTyp < Gbl.DegTypes.Num;
|
||||
NumDegTyp++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",Gbl.DegTypes.Lst[NumDegTyp].DegTypCod );
|
||||
if (Gbl.DegTypes.Lst[NumDegTyp].DegTypCod == Gbl.Stat.DegTypCod)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",Gbl.DegTypes.Lst[NumDegTyp].DegTypName);
|
||||
}
|
||||
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.DegTypes.Lst[NumDegTyp].DegTypCod,
|
||||
Gbl.DegTypes.Lst[NumDegTyp].DegTypCod == Gbl.Stat.DegTypCod,false,
|
||||
"%s",Gbl.DegTypes.Lst[NumDegTyp].DegTypName);
|
||||
HTM_SELECT_End ();
|
||||
|
||||
/***** Free list of degree types *****/
|
||||
|
@ -712,7 +705,7 @@ void DT_FreeListDegreeTypes (void)
|
|||
/***** Free memory used by the list of degree types *****/
|
||||
if (Gbl.DegTypes.Lst)
|
||||
{
|
||||
free ((void *) Gbl.DegTypes.Lst);
|
||||
free (Gbl.DegTypes.Lst);
|
||||
Gbl.DegTypes.Lst = NULL;
|
||||
Gbl.DegTypes.Num = 0;
|
||||
}
|
||||
|
@ -1047,7 +1040,7 @@ static void DT_EditingDegreeTypeDestructor (void)
|
|||
/***** Free memory used for degree type *****/
|
||||
if (DT_EditingDegTyp != NULL)
|
||||
{
|
||||
free ((void *) DT_EditingDegTyp);
|
||||
free (DT_EditingDegTyp);
|
||||
DT_EditingDegTyp = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -465,7 +465,7 @@ void Dpt_FreeListDepartments (void)
|
|||
{
|
||||
if (Gbl.Dpts.Lst)
|
||||
/***** Free memory used by the list of departments *****/
|
||||
free ((void *) Gbl.Dpts.Lst);
|
||||
free (Gbl.Dpts.Lst);
|
||||
|
||||
Gbl.Dpts.Lst = NULL;
|
||||
Gbl.Dpts.Num = 0;
|
||||
|
@ -541,18 +541,14 @@ static void Dpt_ListDepartmentsForEdition (void)
|
|||
Dpt_PutParamDptCod (Dpt->DptCod);
|
||||
HTM_SELECT_Begin (true,
|
||||
"name=\"OthInsCod\" class=\"HIE_SEL_NARROW\"");
|
||||
fprintf (Gbl.F.Out,"<option value=\"0\"");
|
||||
if (Dpt->InsCod == 0)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",Txt_Another_institution);
|
||||
HTM_OPTION (HTM_Type_STRING,"0",Dpt->InsCod == 0,false,
|
||||
"%s",Txt_Another_institution);
|
||||
for (NumIns = 0;
|
||||
NumIns < Gbl.Hierarchy.Cty.Inss.Num;
|
||||
NumIns++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"%s>%s</option>",
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod,
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod == Dpt->InsCod ? " selected=\"selected\"" :
|
||||
"",
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].ShrtName);
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod,
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod == Dpt->InsCod,false,
|
||||
"%s",Gbl.Hierarchy.Cty.Inss.Lst[NumIns].ShrtName);
|
||||
HTM_SELECT_End ();
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
@ -919,18 +915,14 @@ static void Dpt_PutFormToCreateDepartment (void)
|
|||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (false,
|
||||
"name=\"OthInsCod\" class=\"HIE_SEL_NARROW\"");
|
||||
fprintf (Gbl.F.Out,"<option value=\"0\"");
|
||||
if (Dpt_EditingDpt->InsCod == 0)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",Txt_Another_institution);
|
||||
HTM_OPTION (HTM_Type_STRING,"0",Dpt_EditingDpt->InsCod == 0,false,
|
||||
"%s",Txt_Another_institution);
|
||||
for (NumIns = 0;
|
||||
NumIns < Gbl.Hierarchy.Cty.Inss.Num;
|
||||
NumIns++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"%s>%s</option>",
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod,
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod == Dpt_EditingDpt->InsCod ? " selected=\"selected\"" :
|
||||
"",
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].ShrtName);
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod,
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod == Dpt_EditingDpt->InsCod,false,
|
||||
"%s",Gbl.Hierarchy.Cty.Inss.Lst[NumIns].ShrtName);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -1118,32 +1110,22 @@ void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
|
|||
if (TextWhenNoDptSelected[0])
|
||||
NoDptSelectable = true;
|
||||
|
||||
fprintf (Gbl.F.Out,"<option value=\"-1\"");
|
||||
if (DptCod < 0)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
if (!NoDptSelectable)
|
||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",TextWhenNoDptSelected);
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",DptCod < 0,!NoDptSelectable,
|
||||
"%s",TextWhenNoDptSelected);
|
||||
}
|
||||
|
||||
/* Another department selected (different to all departments listed) */
|
||||
fprintf (Gbl.F.Out,"<option value=\"0\"");
|
||||
if (DptCod == 0)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",
|
||||
Txt_Another_department);
|
||||
HTM_OPTION (HTM_Type_STRING,"0",DptCod == 0,false,
|
||||
"%s",Txt_Another_department);
|
||||
}
|
||||
|
||||
/* List all departments */
|
||||
for (NumDpt = 0;
|
||||
NumDpt < Gbl.Dpts.Num;
|
||||
NumDpt++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",Gbl.Dpts.Lst[NumDpt].DptCod);
|
||||
if (Gbl.Dpts.Lst[NumDpt].DptCod == DptCod)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",Gbl.Dpts.Lst[NumDpt].FullName);
|
||||
}
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Dpts.Lst[NumDpt].DptCod,
|
||||
Gbl.Dpts.Lst[NumDpt].DptCod == DptCod,false,
|
||||
"%s",Gbl.Dpts.Lst[NumDpt].FullName);
|
||||
|
||||
/* End selector */
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1180,7 +1162,7 @@ static void Dpt_EditingDepartmentDestructor (void)
|
|||
/***** Free memory used for department *****/
|
||||
if (Dpt_EditingDpt != NULL)
|
||||
{
|
||||
free ((void *) Dpt_EditingDpt);
|
||||
free (Dpt_EditingDpt);
|
||||
Dpt_EditingDpt = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -810,12 +810,9 @@ void Enr_AskRemoveOldUsrs (void)
|
|||
for (Months = Usr_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS;
|
||||
Months <= Usr_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS;
|
||||
Months++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<option");
|
||||
if (Months == Usr_DEF_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%u</option>",Months);
|
||||
}
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Months,
|
||||
Months == Usr_DEF_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS,false,
|
||||
"%u",Months);
|
||||
HTM_SELECT_End ();
|
||||
fprintf (Gbl.F.Out," ");
|
||||
fprintf (Gbl.F.Out,Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_2_OF_2,
|
||||
|
|
16
swad_exam.c
16
swad_exam.c
|
@ -232,37 +232,37 @@ void Exa_FreeMemExamAnnouncement (void)
|
|||
{
|
||||
if (Gbl.ExamAnns.ExaDat.Place)
|
||||
{
|
||||
free ((void *) Gbl.ExamAnns.ExaDat.Place);
|
||||
free (Gbl.ExamAnns.ExaDat.Place);
|
||||
Gbl.ExamAnns.ExaDat.Place = NULL;
|
||||
}
|
||||
if (Gbl.ExamAnns.ExaDat.Mode)
|
||||
{
|
||||
free ((void *) Gbl.ExamAnns.ExaDat.Mode);
|
||||
free (Gbl.ExamAnns.ExaDat.Mode);
|
||||
Gbl.ExamAnns.ExaDat.Mode = NULL;
|
||||
}
|
||||
if (Gbl.ExamAnns.ExaDat.Structure)
|
||||
{
|
||||
free ((void *) Gbl.ExamAnns.ExaDat.Structure);
|
||||
free (Gbl.ExamAnns.ExaDat.Structure);
|
||||
Gbl.ExamAnns.ExaDat.Structure = NULL;
|
||||
}
|
||||
if (Gbl.ExamAnns.ExaDat.DocRequired)
|
||||
{
|
||||
free ((void *) Gbl.ExamAnns.ExaDat.DocRequired);
|
||||
free (Gbl.ExamAnns.ExaDat.DocRequired);
|
||||
Gbl.ExamAnns.ExaDat.DocRequired = NULL;
|
||||
}
|
||||
if (Gbl.ExamAnns.ExaDat.MatRequired)
|
||||
{
|
||||
free ((void *) Gbl.ExamAnns.ExaDat.MatRequired);
|
||||
free (Gbl.ExamAnns.ExaDat.MatRequired);
|
||||
Gbl.ExamAnns.ExaDat.MatRequired = NULL;
|
||||
}
|
||||
if (Gbl.ExamAnns.ExaDat.MatAllowed)
|
||||
{
|
||||
free ((void *) Gbl.ExamAnns.ExaDat.MatAllowed);
|
||||
free (Gbl.ExamAnns.ExaDat.MatAllowed);
|
||||
Gbl.ExamAnns.ExaDat.MatAllowed = NULL;
|
||||
}
|
||||
if (Gbl.ExamAnns.ExaDat.OtherInfo)
|
||||
{
|
||||
free ((void *) Gbl.ExamAnns.ExaDat.OtherInfo);
|
||||
free (Gbl.ExamAnns.ExaDat.OtherInfo);
|
||||
Gbl.ExamAnns.ExaDat.OtherInfo = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -802,7 +802,7 @@ void Exa_FreeListExamAnnouncements (void)
|
|||
{
|
||||
if (Gbl.ExamAnns.Lst)
|
||||
{
|
||||
free ((void *) Gbl.ExamAnns.Lst);
|
||||
free (Gbl.ExamAnns.Lst);
|
||||
Gbl.ExamAnns.Lst = NULL;
|
||||
Gbl.ExamAnns.NumExaAnns = 0;
|
||||
}
|
||||
|
|
|
@ -196,6 +196,7 @@ void Fig_ReqShowFigures (void)
|
|||
extern const char *Txt_FIGURE_TYPES[Fig_NUM_FIGURES];
|
||||
extern const char *Txt_Show_statistic;
|
||||
Fig_FigureType_t FigureType;
|
||||
unsigned FigureTypeUnsigned;
|
||||
|
||||
/***** Form to show statistic *****/
|
||||
Frm_StartForm (ActSeeUseGbl);
|
||||
|
@ -228,14 +229,10 @@ void Fig_ReqShowFigures (void)
|
|||
FigureType < Fig_NUM_FIGURES;
|
||||
FigureType++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",
|
||||
(unsigned) FigureType);
|
||||
if (FigureType == Gbl.Figures.FigureType)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out," />"
|
||||
"%s"
|
||||
"</option>",
|
||||
Txt_FIGURE_TYPES[FigureType]);
|
||||
FigureTypeUnsigned = (unsigned) FigureType;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&FigureTypeUnsigned,
|
||||
FigureType == Gbl.Figures.FigureType,false,
|
||||
"%s",Txt_FIGURE_TYPES[FigureType]);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_LABEL_End ();
|
||||
|
@ -4057,7 +4054,7 @@ static void Fig_WriteForumTitleAndStats (For_ForumType_t ForumType,
|
|||
ForumName1,ForumName2) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ico_PutIcon (Icon,ForumName,"ICO16x16");
|
||||
free ((void *) ForumName);
|
||||
free (ForumName);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"DAT LT\"");
|
||||
|
@ -4219,7 +4216,7 @@ static void Fig_GetAndShowNumUsrsPerNotifyEvent (void)
|
|||
(1 << NotifyEvent)) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[NotifyEvent] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Get number of notifications by email from database */
|
||||
switch (Gbl.Scope.Current)
|
||||
|
@ -4694,7 +4691,7 @@ static void Fig_GetAndShowNumUsrsPerPrivacyForAnObject (const char *TxtObject,
|
|||
FieldName,Pri_VisibilityDB[Visibility]) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[Visibility] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[Visibility];
|
||||
|
@ -4782,7 +4779,7 @@ static void Fig_GetAndShowNumUsrsPerCookies (void)
|
|||
AcceptedInDB[i]) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[i] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[i];
|
||||
|
@ -4858,7 +4855,7 @@ static void Fig_GetAndShowNumUsrsPerLanguage (void)
|
|||
Lan_STR_LANG_ID[Lan]) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[Lan] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[Lan];
|
||||
|
@ -4938,7 +4935,7 @@ static void Fig_GetAndShowNumUsrsPerFirstDayOfWeek (void)
|
|||
(unsigned) FirstDayOfWeek) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[FirstDayOfWeek] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[FirstDayOfWeek];
|
||||
|
@ -4960,8 +4957,8 @@ static void Fig_GetAndShowNumUsrsPerFirstDayOfWeek (void)
|
|||
Txt_First_day_of_the_week,Txt_DAYS_SMALL[FirstDayOfWeek]) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ico_PutIcon (Icon,Title,"ICO40x40");
|
||||
free ((void *) Title);
|
||||
free ((void *) Icon);
|
||||
free (Title);
|
||||
free (Icon);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"DAT RM\"");
|
||||
|
@ -5021,7 +5018,7 @@ static void Fig_GetAndShowNumUsrsPerDateFormat (void)
|
|||
(unsigned) Format) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[Format] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[Format];
|
||||
|
@ -5099,7 +5096,7 @@ static void Fig_GetAndShowNumUsrsPerIconSet (void)
|
|||
Ico_IconSetId[IconSet]) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[IconSet] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[IconSet];
|
||||
|
@ -5118,7 +5115,7 @@ static void Fig_GetAndShowNumUsrsPerIconSet (void)
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (URL,"cog.svg",Ico_IconSetNames[IconSet],
|
||||
"class=\"ICO40x40\"");
|
||||
free ((void *) URL);
|
||||
free (URL);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"DAT RM\"");
|
||||
|
@ -5180,7 +5177,7 @@ static void Fig_GetAndShowNumUsrsPerMenu (void)
|
|||
(unsigned) Menu) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[Menu] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[Menu];
|
||||
|
@ -5257,7 +5254,7 @@ static void Fig_GetAndShowNumUsrsPerTheme (void)
|
|||
The_ThemeId[Theme]) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[Theme] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[Theme];
|
||||
|
@ -5276,7 +5273,7 @@ static void Fig_GetAndShowNumUsrsPerTheme (void)
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (URL,"theme_32x20.gif",The_ThemeNames[Theme],
|
||||
"style=\"width:40px;height:25px;\"");
|
||||
free ((void *) URL);
|
||||
free (URL);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"DAT RM\"");
|
||||
|
@ -5338,7 +5335,7 @@ static void Fig_GetAndShowNumUsrsPerSideColumns (void)
|
|||
SideCols) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
NumUsrs[SideCols] = Fig_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[SideCols];
|
||||
|
@ -5357,7 +5354,7 @@ static void Fig_GetAndShowNumUsrsPerSideColumns (void)
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (Cfg_URL_ICON_PUBLIC,Icon,Txt_LAYOUT_SIDE_COLUMNS[SideCols],
|
||||
"style=\"width:40px;height:25px;\"");
|
||||
free ((void *) Icon);
|
||||
free (Icon);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"DAT RM\"");
|
||||
|
|
16
swad_file.c
16
swad_file.c
|
@ -288,12 +288,12 @@ bool Fil_EndReceptionOfFile (char *FileNameDataTmp,struct Param *Param)
|
|||
{
|
||||
BytesToCopy = (RemainingBytesToCopy >= NUM_BYTES_PER_CHUNK) ? NUM_BYTES_PER_CHUNK :
|
||||
RemainingBytesToCopy;
|
||||
if (fread ((void *) Bytes,1,BytesToCopy,Gbl.F.Tmp) != BytesToCopy)
|
||||
if (fread (Bytes,1,BytesToCopy,Gbl.F.Tmp) != BytesToCopy)
|
||||
{
|
||||
fclose (FileDataTmp);
|
||||
return false;
|
||||
}
|
||||
if (fwrite ((void *) Bytes,sizeof (Bytes[0]),BytesToCopy,FileDataTmp) != BytesToCopy)
|
||||
if (fwrite (Bytes,sizeof (Bytes[0]),BytesToCopy,FileDataTmp) != BytesToCopy)
|
||||
{
|
||||
fclose (FileDataTmp);
|
||||
return false;
|
||||
|
@ -450,9 +450,9 @@ void Fil_RemoveTree (const char Path[PATH_MAX + 1])
|
|||
Path,FileList[NumFile]->d_name);
|
||||
Fil_RemoveTree (PathFileRel);
|
||||
}
|
||||
free ((void *) FileList[NumFile]);
|
||||
free (FileList[NumFile]);
|
||||
}
|
||||
free ((void *) FileList);
|
||||
free (FileList);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Error while scanning directory.");
|
||||
|
@ -516,9 +516,9 @@ void Fil_RemoveOldTmpFiles (const char *Path,time_t TimeToRemove,
|
|||
Path,FileList[NumFile]->d_name);
|
||||
Fil_RemoveOldTmpFiles (Path2,TimeToRemove,true); // Recursive call
|
||||
}
|
||||
free ((void *) FileList[NumFile]);
|
||||
free (FileList[NumFile]);
|
||||
}
|
||||
free ((void *) FileList);
|
||||
free (FileList);
|
||||
|
||||
if (RemoveDirectory)
|
||||
/* Remove the directory itself */
|
||||
|
@ -568,8 +568,8 @@ void Fil_FastCopyOfOpenFiles (FILE *FileSrc,FILE *FileTgt)
|
|||
unsigned char Bytes[NUM_BYTES_PER_CHUNK];
|
||||
size_t NumBytesRead;
|
||||
|
||||
while ((NumBytesRead = fread ((void *) Bytes,sizeof (Bytes[0]),(size_t) NUM_BYTES_PER_CHUNK,FileSrc)))
|
||||
fwrite ((void *) Bytes,sizeof (Bytes[0]),NumBytesRead,FileTgt);
|
||||
while ((NumBytesRead = fread (Bytes,sizeof (Bytes[0]),(size_t) NUM_BYTES_PER_CHUNK,FileSrc)))
|
||||
fwrite (Bytes,sizeof (Bytes[0]),NumBytesRead,FileTgt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -5298,9 +5298,9 @@ static void Brw_CalcSizeOfDirRecursive (unsigned Level,char *Path)
|
|||
Gbl.FileBrowser.Size.TotalSiz += (unsigned long long) FileStatus.st_size;
|
||||
}
|
||||
}
|
||||
free ((void *) FileList[NumFile]);
|
||||
free (FileList[NumFile]);
|
||||
}
|
||||
free ((void *) FileList);
|
||||
free (FileList);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Error while scanning directory.");
|
||||
|
@ -5382,8 +5382,8 @@ static void Brw_ListDir (unsigned Level,const char *ParentRowId,
|
|||
for (NumFileInSubdir = 0;
|
||||
NumFileInSubdir < NumFilesInSubdir;
|
||||
NumFileInSubdir++)
|
||||
free ((void *) SubdirFileList[NumFileInSubdir]);
|
||||
free ((void *) SubdirFileList);
|
||||
free (SubdirFileList[NumFileInSubdir]);
|
||||
free (SubdirFileList);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Error while scanning directory.");
|
||||
|
@ -5408,9 +5408,9 @@ static void Brw_ListDir (unsigned Level,const char *ParentRowId,
|
|||
Brw_ICON_TREE_NOTHING);
|
||||
}
|
||||
}
|
||||
free ((void *) FileList[NumFile]);
|
||||
free (FileList[NumFile]);
|
||||
}
|
||||
free ((void *) FileList);
|
||||
free (FileList);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Error while scanning directory.");
|
||||
|
@ -5657,7 +5657,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId,
|
|||
Brw_WriteFileOrFolderPublisher (Level,FileMetadata.PublisherUsrCod);
|
||||
|
||||
/***** End this row *****/
|
||||
free ((void *) Anchor);
|
||||
free (Anchor);
|
||||
HTM_TR_End ();
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
|
@ -6200,9 +6200,9 @@ static void Brw_PutIconFile (unsigned Size,Brw_FileType_t FileType,const char *F
|
|||
"class=\"CONTEXT_OPT ICO_HIGHLIGHT %s\"",
|
||||
(Size == 16) ? "CONTEXT_ICO_16x16" :
|
||||
"ICO40x40");
|
||||
free ((void *) Title);
|
||||
free ((void *) Icon);
|
||||
free ((void *) URL);
|
||||
free (Title);
|
||||
free (Icon);
|
||||
free (URL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6397,7 +6397,7 @@ static void Brw_WriteDatesAssignment (void)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
true,true,false,0x7);
|
||||
fprintf (Gbl.F.Out,"</span>");
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/***** Arrow *****/
|
||||
fprintf (Gbl.F.Out,"→");
|
||||
|
@ -6410,7 +6410,7 @@ static void Brw_WriteDatesAssignment (void)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
true,false,false,0x7);
|
||||
fprintf (Gbl.F.Out,"</span>");
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out," (%s)",Txt_unknown_assignment);
|
||||
|
@ -6451,7 +6451,7 @@ static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata)
|
|||
Dat_WriteLocalDateHMSFromUTC (Id,FileMetadata->Time,
|
||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
true,true,false,0x6);
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
@ -8242,9 +8242,9 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
FirstFilCod))
|
||||
CopyIsGoingSuccessful = false;
|
||||
}
|
||||
free ((void *) FileList[NumFile]);
|
||||
free (FileList[NumFile]);
|
||||
}
|
||||
free ((void *) FileList);
|
||||
free (FileList);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Error while scanning directory.");
|
||||
|
@ -12296,9 +12296,9 @@ static void Brw_ScanDirRemovingOldFiles (unsigned Level,
|
|||
(Removed->NumFiles)++; // It's a file
|
||||
}
|
||||
}
|
||||
free ((void *) FileList[NumFile]);
|
||||
free (FileList[NumFile]);
|
||||
}
|
||||
free ((void *) FileList);
|
||||
free (FileList);
|
||||
|
||||
if (Level > 1) // If not root folder
|
||||
{
|
||||
|
@ -12312,8 +12312,8 @@ static void Brw_ScanDirRemovingOldFiles (unsigned Level,
|
|||
for (NumFile = 0;
|
||||
NumFile < NumFiles;
|
||||
NumFile++)
|
||||
free ((void *) FileList[NumFile]);
|
||||
free ((void *) FileList);
|
||||
free (FileList[NumFile]);
|
||||
free (FileList);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Error while scanning directory.");
|
||||
|
|
|
@ -334,7 +334,7 @@ void Frm_FreeAnchorStr (char *Anchor)
|
|||
{
|
||||
if (Anchor)
|
||||
{
|
||||
free ((void *) Anchor);
|
||||
free (Anchor);
|
||||
Anchor = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3461,7 +3461,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,false,0x6);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
else
|
||||
for (Column = 1;
|
||||
|
|
|
@ -435,7 +435,7 @@ void Gam_ShowOneGame (long GamCod,
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
|
||||
/***** Game title and main data *****/
|
||||
|
@ -693,7 +693,7 @@ void Gam_GetListGames (void)
|
|||
OrderBySubQuery[Gbl.Games.SelectedOrder]);
|
||||
|
||||
/***** Free allocated memory for subquery *****/
|
||||
free ((void *) HiddenSubQuery);
|
||||
free (HiddenSubQuery);
|
||||
|
||||
if (NumRows) // Games found...
|
||||
{
|
||||
|
@ -837,7 +837,7 @@ void Gam_FreeListGames (void)
|
|||
if (Gbl.Games.LstIsRead && Gbl.Games.LstGamCods)
|
||||
{
|
||||
/***** Free memory used by the list of games *****/
|
||||
free ((void *) Gbl.Games.LstGamCods);
|
||||
free (Gbl.Games.LstGamCods);
|
||||
Gbl.Games.LstGamCods = NULL;
|
||||
Gbl.Games.Num = 0;
|
||||
Gbl.Games.LstIsRead = false;
|
||||
|
@ -1900,7 +1900,7 @@ static void Gam_FreeListsSelectedQuestions (void)
|
|||
{
|
||||
if (Gbl.Games.ListQuestions)
|
||||
{
|
||||
free ((void *) Gbl.Games.ListQuestions);
|
||||
free (Gbl.Games.ListQuestions);
|
||||
Gbl.Games.ListQuestions = NULL;
|
||||
}
|
||||
}
|
||||
|
|
22
swad_group.c
22
swad_group.c
|
@ -505,7 +505,7 @@ void Grp_PutParamsCodGrps (void)
|
|||
}
|
||||
|
||||
Par_PutHiddenParamString (NULL,"GrpCods",GrpCods);
|
||||
free ((void *) GrpCods);
|
||||
free (GrpCods);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -607,7 +607,7 @@ void Grp_GetParCodsSeveralGrps (void)
|
|||
}
|
||||
|
||||
/***** Free memory used for the list of groups to show *****/
|
||||
free ((void *) ParamLstCodGrps);
|
||||
free (ParamLstCodGrps);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -621,7 +621,7 @@ void Grp_FreeListCodSelectedGrps (void)
|
|||
if (--Gbl.Crs.Grps.LstGrpsSel.NestedCalls == 0)
|
||||
if (Gbl.Crs.Grps.LstGrpsSel.GrpCods)
|
||||
{
|
||||
free ((void *) Gbl.Crs.Grps.LstGrpsSel.GrpCods);
|
||||
free (Gbl.Crs.Grps.LstGrpsSel.GrpCods);
|
||||
Gbl.Crs.Grps.LstGrpsSel.GrpCods = NULL;
|
||||
Gbl.Crs.Grps.LstGrpsSel.NumGrps = 0;
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ static void Grp_ConstructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **Al
|
|||
|
||||
static void Grp_DestructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **AlreadyExistsGroupOfType)
|
||||
{
|
||||
free ((void *) *AlreadyExistsGroupOfType);
|
||||
free (*AlreadyExistsGroupOfType);
|
||||
*AlreadyExistsGroupOfType = NULL;
|
||||
}
|
||||
|
||||
|
@ -2357,7 +2357,7 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp)
|
|||
Dat_WriteLocalDateHMSFromUTC (Id,GrpTyp->OpenTimeUTC,
|
||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
true,true,true,0x7);
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
@ -2992,14 +2992,14 @@ void Grp_FreeListGrpTypesAndGrps (void)
|
|||
GrpTyp = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp];
|
||||
if (GrpTyp->LstGrps)
|
||||
{
|
||||
free ((void *) GrpTyp->LstGrps);
|
||||
free (GrpTyp->LstGrps);
|
||||
GrpTyp->LstGrps = NULL;
|
||||
GrpTyp->NumGrps = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/***** Free memory used by the list of group types *****/
|
||||
free ((void *) Gbl.Crs.Grps.GrpTypes.LstGrpTypes);
|
||||
free (Gbl.Crs.Grps.GrpTypes.LstGrpTypes);
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes = NULL;
|
||||
Gbl.Crs.Grps.GrpTypes.Num = 0;
|
||||
}
|
||||
|
@ -3533,7 +3533,7 @@ bool Grp_GetIfAvailableGrpTyp (long GrpTypCod)
|
|||
SubQueryGrpTypes,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Free allocated memory for subquery *****/
|
||||
free ((void *) SubQueryGrpTypes);
|
||||
free (SubQueryGrpTypes);
|
||||
|
||||
return (NumGrpTypes != 0);
|
||||
}
|
||||
|
@ -4944,12 +4944,12 @@ void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted)
|
|||
LstGrpsWanted->GrpCods[NumGrpWanted] = Str_ConvertStrCodToLongCod (LongStr);
|
||||
}
|
||||
/* Free memory used by the list of group codes of this type */
|
||||
free ((void *) LstStrCodGrps[NumGrpTyp]);
|
||||
free (LstStrCodGrps[NumGrpTyp]);
|
||||
}
|
||||
}
|
||||
|
||||
/***** Free memory used by the lists of group codes of each type *****/
|
||||
free ((void *) LstStrCodGrps);
|
||||
free (LstStrCodGrps);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4959,7 +4959,7 @@ void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted)
|
|||
void Grp_FreeListCodGrp (struct ListCodGrps *LstGrps)
|
||||
{
|
||||
if (LstGrps->NumGrps && LstGrps->GrpCods)
|
||||
free ((void *) LstGrps->GrpCods);
|
||||
free (LstGrps->GrpCods);
|
||||
LstGrps->GrpCods = NULL;
|
||||
LstGrps->NumGrps = 0;
|
||||
}
|
||||
|
|
|
@ -530,7 +530,7 @@ void Hld_FreeListHolidays (void)
|
|||
if (Gbl.Hlds.LstIsRead && Gbl.Hlds.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of courses in degree *****/
|
||||
free ((void *) Gbl.Hlds.Lst);
|
||||
free (Gbl.Hlds.Lst);
|
||||
Gbl.Hlds.Lst = NULL;
|
||||
Gbl.Hlds.Num = 0;
|
||||
Gbl.Hlds.LstIsRead = false;
|
||||
|
@ -1196,7 +1196,7 @@ static void Hld_EditingHolidayDestructor (void)
|
|||
/***** Free memory used for holiday *****/
|
||||
if (Hld_EditingHld != NULL)
|
||||
{
|
||||
free ((void *) Hld_EditingHld);
|
||||
free (Hld_EditingHld);
|
||||
Hld_EditingHld = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -904,7 +904,7 @@ int Inf_WritePageIntoHTMLBuffer (char **HTMLBuffer)
|
|||
}
|
||||
|
||||
/* Copy file content into buffer */
|
||||
if (fread ((void *) *HTMLBuffer,sizeof (char),Length,FileHTML) != Length)
|
||||
if (fread (*HTMLBuffer,sizeof (char),Length,FileHTML) != Length)
|
||||
{
|
||||
fclose (FileHTML);
|
||||
return soap_receiver_fault (Gbl.soap,
|
||||
|
@ -2015,7 +2015,7 @@ int Inf_WritePlainTextIntoHTMLBuffer (char **HTMLBuffer)
|
|||
|
||||
/***** Copy file content into buffer *****/
|
||||
fseek (FileHTMLTmp,0L,SEEK_SET);
|
||||
if (fread ((void *) *HTMLBuffer,sizeof (char),Length,FileHTMLTmp) != Length)
|
||||
if (fread (*HTMLBuffer,sizeof (char),Length,FileHTMLTmp) != Length)
|
||||
{
|
||||
fclose (FileHTMLTmp);
|
||||
unlink (FileNameHTMLTmp);
|
||||
|
|
|
@ -1349,7 +1349,7 @@ void Ins_FreeListInstitutions (void)
|
|||
if (Gbl.Hierarchy.Cty.Inss.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of institutions *****/
|
||||
free ((void *) Gbl.Hierarchy.Cty.Inss.Lst);
|
||||
free (Gbl.Hierarchy.Cty.Inss.Lst);
|
||||
Gbl.Hierarchy.Cty.Inss.Lst = NULL;
|
||||
Gbl.Hierarchy.Cty.Inss.Num = 0;
|
||||
}
|
||||
|
@ -2572,7 +2572,7 @@ static void Ins_EditingInstitutionDestructor (void)
|
|||
/***** Free memory used for institution *****/
|
||||
if (Ins_EditingIns != NULL)
|
||||
{
|
||||
free ((void *) Ins_EditingIns);
|
||||
free (Ins_EditingIns);
|
||||
Ins_EditingIns = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ void Lan_PutSelectorToSelectLanguage (void)
|
|||
Lan++)
|
||||
{
|
||||
LanUnsigned = (unsigned) Lan;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &LanUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&LanUnsigned,
|
||||
Lan == Gbl.Prefs.Language,false,
|
||||
"%s",Txt_STR_LANG_NAME[Lan]);
|
||||
}
|
||||
|
|
|
@ -393,7 +393,7 @@ void Lnk_FreeListLinks (void)
|
|||
if (Gbl.Links.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of links *****/
|
||||
free ((void *) Gbl.Links.Lst);
|
||||
free (Gbl.Links.Lst);
|
||||
Gbl.Links.Lst = NULL;
|
||||
Gbl.Links.Num = 0;
|
||||
}
|
||||
|
@ -883,7 +883,7 @@ static void Lnk_EditingLinkDestructor (void)
|
|||
/***** Free memory used for link *****/
|
||||
if (Lnk_EditingLnk != NULL)
|
||||
{
|
||||
free ((void *) Lnk_EditingLnk);
|
||||
free (Lnk_EditingLnk);
|
||||
Lnk_EditingLnk = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,8 +183,8 @@ void Log_DrawLogo (Hie_Level_t Scope,long Cod,const char *AltText,
|
|||
"",
|
||||
ClassNotEmpty ? Class :
|
||||
"");
|
||||
free ((void *) Icon);
|
||||
free ((void *) URL);
|
||||
free (Icon);
|
||||
free (URL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -456,7 +456,7 @@ void Mai_FreeListMailDomains (void)
|
|||
if (Gbl.Mails.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of mail domains *****/
|
||||
free ((void *) Gbl.Mails.Lst);
|
||||
free (Gbl.Mails.Lst);
|
||||
Gbl.Mails.Lst = NULL;
|
||||
Gbl.Mails.Num = 0;
|
||||
}
|
||||
|
@ -1939,7 +1939,7 @@ static void Mai_EditingMailDomainDestructor (void)
|
|||
/***** Free memory used for mail domain *****/
|
||||
if (Mai_EditingMai != NULL)
|
||||
{
|
||||
free ((void *) Mai_EditingMai);
|
||||
free (Mai_EditingMai);
|
||||
Mai_EditingMai = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -254,7 +254,7 @@ void Mch_ListMatches (struct Game *Game,bool PutFormNewMatch)
|
|||
SubQuery);
|
||||
|
||||
/* Free allocated memory for subquery */
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/***** Begin box *****/
|
||||
Gam_SetParamCurrentGamCod (Game->GamCod); // Used to pass parameter
|
||||
|
@ -560,7 +560,7 @@ static void Mch_ListOneOrMoreMatchesTimes (const struct Match *Match,unsigned Un
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2818,8 +2818,8 @@ static void Mch_DrawScoreRow (double Score,double MinScore,double MaxScore,
|
|||
HTM_IMG (Cfg_URL_ICON_PUBLIC,Icon,Title,
|
||||
"class=\"MCH_SCO_BAR\" style=\"width:%u%%;\"",BarWidth);
|
||||
fprintf (Gbl.F.Out," %u",NumUsrs);
|
||||
free ((void *) Title);
|
||||
free ((void *) Icon);
|
||||
free (Title);
|
||||
free (Icon);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
|
|
@ -439,7 +439,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,false,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
|
||||
/* Write match title */
|
||||
|
@ -794,7 +794,7 @@ void McR_ShowOneMchResult (void)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
14
swad_media.c
14
swad_media.c
|
@ -236,7 +236,7 @@ static void Med_FreeMediaURL (struct Media *Media)
|
|||
// Media->URL is initialized to NULL in constructor
|
||||
if (Media->URL)
|
||||
{
|
||||
free ((void *) Media->URL);
|
||||
free (Media->URL);
|
||||
Media->URL = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ static void Med_FreeMediaTitle (struct Media *Media)
|
|||
// Media->Title is initialized to NULL in constructor
|
||||
if (Media->Title)
|
||||
{
|
||||
free ((void *) Media->Title);
|
||||
free (Media->Title);
|
||||
Media->Title = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ static void Med_PutHiddenFormTypeMediaUploader (const char UniqueId[Frm_MAX_BYTE
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
Par_PutHiddenParamUnsignedDisabled (Id,ParamUploadMedia->FormType,
|
||||
(unsigned) MediaUploader->FormType);
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1557,7 +1557,7 @@ static void Med_ShowJPG (struct Media *Media,
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (URL,FileNameMedia,Media->Title,
|
||||
"class=\"%s\" lazyload=\"on\"",ClassMedia); // Lazy load of the media
|
||||
free ((void *) URL);
|
||||
free (URL);
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out,"%s",Txt_File_not_found);
|
||||
|
@ -1641,9 +1641,9 @@ static void Med_ShowGIF (struct Media *Media,
|
|||
fprintf (Gbl.F.Out,"%s",Txt_File_not_found);
|
||||
|
||||
/***** Free URLs *****/
|
||||
free ((void *) URL_PNG);
|
||||
free ((void *) URL_GIF);
|
||||
free ((void *) URL);
|
||||
free (URL_PNG);
|
||||
free (URL_GIF);
|
||||
free (URL);
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out,"%s",Txt_File_not_found);
|
||||
|
|
|
@ -2050,7 +2050,7 @@ static unsigned long Msg_GetSentOrReceivedMsgs (long UsrCod,
|
|||
SubQuery);
|
||||
|
||||
/***** Free memory used for subquery *****/
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
return NumMsgs;
|
||||
}
|
||||
|
@ -2618,7 +2618,7 @@ void Msg_ShowFormSelectCourseSentOrRecMsgs (void)
|
|||
fprintf (Gbl.F.Out,"%s ",TxtSelector[Gbl.Msg.TypeOfMessages]);
|
||||
HTM_SELECT_Begin (false,
|
||||
"name=\"FilterCrsCod\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "",
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Gbl.Msg.FilterCrsCod < 0,false,
|
||||
"%s",Txt_any_course);
|
||||
|
||||
|
@ -2626,7 +2626,7 @@ void Msg_ShowFormSelectCourseSentOrRecMsgs (void)
|
|||
for (NumOriginCrs = 0;
|
||||
NumOriginCrs < Gbl.Msg.NumCourses;
|
||||
NumOriginCrs++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Msg.Courses[NumOriginCrs].CrsCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Msg.Courses[NumOriginCrs].CrsCod,
|
||||
Gbl.Msg.Courses[NumOriginCrs].CrsCod == Gbl.Msg.FilterCrsCod,false,
|
||||
"%s",Gbl.Msg.Courses[NumOriginCrs].ShrtName);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -3616,7 +3616,7 @@ void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground)
|
|||
/***** End cell *****/
|
||||
HTM_TD_End ();
|
||||
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -702,7 +702,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
|||
Dat_WriteLocalDateHMSFromUTC (Id,TimeUTC,
|
||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,false,0x6);
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** Write the content of the notice *****/
|
||||
|
|
|
@ -592,7 +592,7 @@ void Ntf_ShowMyNotifications (void)
|
|||
|
||||
if (ContentStr != NULL)
|
||||
{
|
||||
free ((void *) ContentStr);
|
||||
free (ContentStr);
|
||||
ContentStr = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ bool Par_GetQueryString (void)
|
|||
return false;
|
||||
|
||||
/* Copy query string from stdin */
|
||||
if (fread ((void *) Gbl.Params.QueryString,sizeof (char),Gbl.Params.ContentLength,stdin) != Gbl.Params.ContentLength)
|
||||
if (fread (Gbl.Params.QueryString,sizeof (char),Gbl.Params.ContentLength,stdin) != Gbl.Params.ContentLength)
|
||||
{
|
||||
Gbl.Params.QueryString[0] = '\0';
|
||||
return false;
|
||||
|
@ -471,12 +471,12 @@ void Par_FreeParams (void)
|
|||
Param = NextParam)
|
||||
{
|
||||
NextParam = Param->Next;
|
||||
free ((void *) Param);
|
||||
free (Param);
|
||||
}
|
||||
|
||||
/***** Free query string *****/
|
||||
if (Gbl.Params.QueryString)
|
||||
free ((void *) Gbl.Params.QueryString);
|
||||
free (Gbl.Params.QueryString);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -603,7 +603,7 @@ unsigned Par_GetParameter (tParamType ParamType,const char *ParamName,
|
|||
PtrDst)
|
||||
{
|
||||
fseek (Gbl.F.Tmp,Param->Value.Start,SEEK_SET);
|
||||
if (fread ((void *) PtrDst,sizeof (char),Param->Value.Length,Gbl.F.Tmp) !=
|
||||
if (fread (PtrDst,sizeof (char),Param->Value.Length,Gbl.F.Tmp) !=
|
||||
Param->Value.Length)
|
||||
Lay_ShowErrorAndExit ("Error while getting value of parameter.");
|
||||
}
|
||||
|
|
|
@ -583,7 +583,7 @@ static unsigned Pwd_GetNumOtherUsrsWhoUseThisPassword (const char *EncryptedPass
|
|||
|
||||
/***** Free subquery *****/
|
||||
if (UsrCod > 0)
|
||||
free ((void *) SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
return NumUsrs;
|
||||
}
|
||||
|
|
|
@ -788,7 +788,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (Cfg_URL_PHOTO_TMP_PUBLIC,Img,Txt_Faces_detected,
|
||||
"usemap=\"#faces_map\"");
|
||||
free ((void *) Img);
|
||||
free (Img);
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** End alert *****/
|
||||
|
@ -902,7 +902,7 @@ static void Pho_UpdatePhoto2 (void)
|
|||
HTM_IMG (Cfg_URL_PHOTO_TMP_PUBLIC,Img,Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto],
|
||||
"style=\"width:%upx;height:%upx;\"",
|
||||
Pho_PHOTO_REAL_WIDTH,Pho_PHOTO_REAL_HEIGHT);
|
||||
free ((void *) Img);
|
||||
free (Img);
|
||||
fprintf (Gbl.F.Out,"<br />%s",Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto]);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
|
|
@ -502,7 +502,7 @@ void Plc_FreeListPlaces (void)
|
|||
if (Gbl.Plcs.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of places in institution *****/
|
||||
free ((void *) Gbl.Plcs.Lst);
|
||||
free (Gbl.Plcs.Lst);
|
||||
Gbl.Plcs.Lst = NULL;
|
||||
Gbl.Plcs.Num = 0;
|
||||
}
|
||||
|
@ -948,7 +948,7 @@ static void Plc_EditingPlaceDestructor (void)
|
|||
/***** Free memory used for place *****/
|
||||
if (Plc_EditingPlc != NULL)
|
||||
{
|
||||
free ((void *) Plc_EditingPlc);
|
||||
free (Plc_EditingPlc);
|
||||
Plc_EditingPlc = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ void Plg_ListPlugins (void)
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (Cfg_URL_ICON_PLUGINS_PUBLIC,Icon,Plg->Name,
|
||||
"class=\"ICO40x40\"");
|
||||
free ((void *) Icon);
|
||||
free (Icon);
|
||||
HTM_A_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -369,7 +369,7 @@ void Plg_FreeListPlugins (void)
|
|||
if (Gbl.Plugins.Lst)
|
||||
{
|
||||
/***** Free memory used by the list of plugins *****/
|
||||
free ((void *) Gbl.Plugins.Lst);
|
||||
free (Gbl.Plugins.Lst);
|
||||
Gbl.Plugins.Lst = NULL;
|
||||
Gbl.Plugins.Num = 0;
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (Cfg_URL_ICON_PLUGINS_PUBLIC,Icon,Gbl.Plugins.Lst[NumPlg].Name,
|
||||
"class=\"ICO40x40\"");
|
||||
free ((void *) Icon);
|
||||
free (Icon);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Plugin name */
|
||||
|
@ -1074,7 +1074,7 @@ static void Plg_EditingPluginDestructor (void)
|
|||
/***** Free memory used for plugin *****/
|
||||
if (Plg_EditingPlg != NULL)
|
||||
{
|
||||
free ((void *) Plg_EditingPlg);
|
||||
free (Plg_EditingPlg);
|
||||
Plg_EditingPlg = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1122,7 +1122,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/* Modification date/time */
|
||||
UniqueId++;
|
||||
|
@ -1143,7 +1143,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/* Project title */
|
||||
switch (ProjectView)
|
||||
|
@ -1501,7 +1501,7 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/***** End date/time *****/
|
||||
UniqueId++;
|
||||
|
@ -1513,7 +1513,7 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/***** Project title *****/
|
||||
HTM_TD_Begin ("class=\"LT %s COLOR%u\"",
|
||||
|
@ -2743,9 +2743,9 @@ void Prj_GetListProjects (void)
|
|||
}
|
||||
|
||||
/* Free allocated memory for subqueries */
|
||||
free ((void *) PreNonSubQuery);
|
||||
free ((void *) HidVisSubQuery);
|
||||
free ((void *) DptCodSubQuery);
|
||||
free (PreNonSubQuery);
|
||||
free (HidVisSubQuery);
|
||||
free (DptCodSubQuery);
|
||||
|
||||
if (NumRows) // Projects found...
|
||||
{
|
||||
|
@ -2972,7 +2972,7 @@ void Prj_FreeListProjects (void)
|
|||
if (Gbl.Prjs.LstIsRead && Gbl.Prjs.LstPrjCods)
|
||||
{
|
||||
/***** Free memory used by the list of projects *****/
|
||||
free ((void *) Gbl.Prjs.LstPrjCods);
|
||||
free (Gbl.Prjs.LstPrjCods);
|
||||
Gbl.Prjs.LstPrjCods = NULL;
|
||||
Gbl.Prjs.Num = 0;
|
||||
Gbl.Prjs.LstIsRead = false;
|
||||
|
@ -3344,9 +3344,9 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
|
|||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_SELECT_Begin (false,
|
||||
"name=\"Assigned\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "Y",Prj->Assigned == Prj_ASSIGNED,false,
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",Prj->Assigned == Prj_ASSIGNED,false,
|
||||
"%s",Txt_Yes);
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "N",Prj->Assigned == Prj_NONASSIG,false,
|
||||
HTM_OPTION (HTM_Type_STRING,"N",Prj->Assigned == Prj_NONASSIG,false,
|
||||
"%s",Txt_No);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
@ -3381,7 +3381,7 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
|
|||
Proposal++)
|
||||
{
|
||||
ProposalUnsigned = (unsigned) Proposal;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ProposalUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ProposalUnsigned,
|
||||
Prj->Proposal == Proposal,false,
|
||||
"%s",Txt_PROJECT_STATUS[Proposal]);
|
||||
}
|
||||
|
@ -3487,17 +3487,17 @@ void Prj_FreeMemProject (struct Project *Prj)
|
|||
{
|
||||
if (Prj->Description)
|
||||
{
|
||||
free ((void *) Prj->Description);
|
||||
free (Prj->Description);
|
||||
Prj->Description = NULL;
|
||||
}
|
||||
if (Prj->Knowledge)
|
||||
{
|
||||
free ((void *) Prj->Knowledge);
|
||||
free (Prj->Knowledge);
|
||||
Prj->Knowledge = NULL;
|
||||
}
|
||||
if (Prj->Materials)
|
||||
{
|
||||
free ((void *) Prj->Materials);
|
||||
free (Prj->Materials);
|
||||
Prj->Materials = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -4046,7 +4046,7 @@ static void Prj_FormLockUnlock (const struct Project *Prj)
|
|||
Frm_EndForm ();
|
||||
|
||||
/* Free allocated memory for subquery */
|
||||
free ((void *) OnSubmit);
|
||||
free (OnSubmit);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -340,7 +340,7 @@ void Rec_ListFieldsRecordsForEdition (void)
|
|||
Vis++)
|
||||
{
|
||||
VisUnsigned = (unsigned) Vis;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &VisUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
||||
Gbl.Crs.Records.LstFields.Lst[NumField].Visibility == Vis,false,
|
||||
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ void Rec_ShowFormCreateRecordField (void)
|
|||
Vis++)
|
||||
{
|
||||
VisUnsigned = (unsigned) Vis;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &VisUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
||||
Gbl.Crs.Records.Field.Visibility == Vis,false,
|
||||
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
||||
}
|
||||
|
@ -918,7 +918,7 @@ void Rec_FreeListFields (void)
|
|||
if (--Gbl.Crs.Records.LstFields.NestedCalls == 0)
|
||||
if (Gbl.Crs.Records.LstFields.Lst)
|
||||
{
|
||||
free ((void *) Gbl.Crs.Records.LstFields.Lst);
|
||||
free (Gbl.Crs.Records.LstFields.Lst);
|
||||
Gbl.Crs.Records.LstFields.Lst = NULL;
|
||||
Gbl.Crs.Records.LstFields.Num = 0;
|
||||
}
|
||||
|
@ -1499,7 +1499,7 @@ static void Rec_ShowLinkToPrintPreviewOfRecords (void)
|
|||
for (i = Rec_MIN_RECORDS_PER_PAGE;
|
||||
i <= Rec_MAX_RECORDS_PER_PAGE;
|
||||
i++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &i,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&i,
|
||||
i == Gbl.Usrs.Listing.RecsPerPag,false,
|
||||
"%u",i);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -2025,7 +2025,7 @@ void Rec_FreeMemFieldsRecordsCrs (void)
|
|||
/* Free memory of the text of the field */
|
||||
if (Gbl.Crs.Records.LstFields.Lst[NumField].Text)
|
||||
{
|
||||
free ((void *) Gbl.Crs.Records.LstFields.Lst[NumField].Text);
|
||||
free (Gbl.Crs.Records.LstFields.Lst[NumField].Text);
|
||||
Gbl.Crs.Records.LstFields.Lst[NumField].Text = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -2937,7 +2937,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
Role++)
|
||||
{
|
||||
RoleUnsigned = (unsigned) Role;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &RoleUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
Role == DefaultRoleInForm,false,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Role][UsrDat->Sex]);
|
||||
}
|
||||
|
@ -3000,7 +3000,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
case Rol_STD:
|
||||
case Rol_NET:
|
||||
RoleUnsigned = (unsigned) Gbl.Usrs.Me.Role.Logged;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &RoleUnsigned,true,true,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,true,true,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Gbl.Usrs.Me.Role.Logged][UsrDat->Sex]);
|
||||
break;
|
||||
case Rol_TCH:
|
||||
|
@ -3013,7 +3013,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
Role++)
|
||||
{
|
||||
RoleUnsigned = (unsigned) Role;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &RoleUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
Role == DefaultRoleInForm,false,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Role][UsrDat->Sex]);
|
||||
}
|
||||
|
@ -3035,7 +3035,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
HTM_SELECT_Begin (false,
|
||||
"id=\"Role\" name=\"Role\"");
|
||||
RoleUnsigned = (unsigned) DefaultRoleInForm;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &RoleUnsigned,true,true,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,true,true,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[DefaultRoleInForm][UsrDat->Sex]);
|
||||
HTM_SELECT_End ();
|
||||
}
|
||||
|
@ -3074,7 +3074,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
Role++)
|
||||
{
|
||||
RoleUnsigned = (unsigned) Role;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &RoleUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
Role == DefaultRoleInForm,false,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Role][Usr_SEX_UNKNOWN]);
|
||||
}
|
||||
|
@ -3091,7 +3091,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
HTM_SELECT_Begin (false,
|
||||
"id=\"Role\" name=\"Role\"");
|
||||
RoleUnsigned = (unsigned) Rol_GST;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &RoleUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
true,false,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Rol_GST][Usr_SEX_UNKNOWN]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -3280,14 +3280,14 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,
|
|||
HTM_SELECT_Begin (false,
|
||||
"id=\"OthCtyCod\" name=\"OthCtyCod\""
|
||||
" class=\"REC_C2_BOT_INPUT\" required=\"required\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "",false,false,
|
||||
HTM_OPTION (HTM_Type_STRING,"",false,false,
|
||||
"%s",Txt_Country);
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "0",UsrDat->CtyCod == 0,false,
|
||||
HTM_OPTION (HTM_Type_STRING,"0",UsrDat->CtyCod == 0,false,
|
||||
"%s",Txt_Another_country);
|
||||
for (NumCty = 0;
|
||||
NumCty < Gbl.Hierarchy.Sys.Ctys.Num;
|
||||
NumCty++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Hierarchy.Sys.Ctys.Lst[NumCty].CtyCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Sys.Ctys.Lst[NumCty].CtyCod,
|
||||
Gbl.Hierarchy.Sys.Ctys.Lst[NumCty].CtyCod == UsrDat->CtyCod,false,
|
||||
"%s",Gbl.Hierarchy.Sys.Ctys.Lst[NumCty].Name[Gbl.Prefs.Language]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -4012,13 +4012,13 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
HTM_SELECT_Begin (true,
|
||||
"id=\"OthCtyCod\" name=\"OthCtyCod\""
|
||||
" class=\"REC_C2_BOT_INPUT\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "-1",
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Usrs.Me.UsrDat.InsCtyCod <= 0,true,
|
||||
NULL);
|
||||
for (NumCty = 0;
|
||||
NumCty < Gbl.Hierarchy.Sys.Ctys.Num;
|
||||
NumCty++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Hierarchy.Sys.Ctys.Lst[NumCty].CtyCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Sys.Ctys.Lst[NumCty].CtyCod,
|
||||
Gbl.Hierarchy.Sys.Ctys.Lst[NumCty].CtyCod == Gbl.Usrs.Me.UsrDat.InsCtyCod,false,
|
||||
"%s",Gbl.Hierarchy.Sys.Ctys.Lst[NumCty].Name[Gbl.Prefs.Language]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -4048,16 +4048,16 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
HTM_SELECT_Begin (true,
|
||||
"id=\"OthInsCod\" name=\"OthInsCod\""
|
||||
" class=\"REC_C2_BOT_INPUT\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "-1",
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Usrs.Me.UsrDat.InsCod < 0,true,
|
||||
NULL);
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "0",
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Gbl.Usrs.Me.UsrDat.InsCod == 0,false,
|
||||
"%s",Txt_Another_institution);
|
||||
for (NumIns = 0;
|
||||
NumIns < Gbl.Hierarchy.Cty.Inss.Num;
|
||||
NumIns++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod,
|
||||
Gbl.Hierarchy.Cty.Inss.Lst[NumIns].InsCod == Gbl.Usrs.Me.UsrDat.InsCod,false,
|
||||
"%s",Gbl.Hierarchy.Cty.Inss.Lst[NumIns].FullName);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -4089,16 +4089,16 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
HTM_SELECT_Begin (true,
|
||||
"id=\"OthCtrCod\" name=\"OthCtrCod\""
|
||||
" class=\"REC_C2_BOT_INPUT\"");
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "-1",
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0,true,
|
||||
NULL);
|
||||
HTM_OPTION (HTM_Type_STRING,(void *) "0",
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Gbl.Usrs.Me.UsrDat.Tch.CtrCod == 0,false,
|
||||
Txt_Another_centre);
|
||||
for (NumCtr = 0;
|
||||
NumCtr < Gbl.Hierarchy.Ins.Ctrs.Num;
|
||||
NumCtr++)
|
||||
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].CtrCod,
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].CtrCod,
|
||||
Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].CtrCod == Gbl.Usrs.Me.UsrDat.Tch.CtrCod,false,
|
||||
Gbl.Hierarchy.Ins.Ctrs.Lst[NumCtr].FullName);
|
||||
HTM_SELECT_End ();
|
||||
|
|
|
@ -491,7 +491,7 @@ void Rol_PutFormToChangeMyRole (const char *ClassSelect)
|
|||
if (Gbl.Usrs.Me.Role.Available & (1 << Role))
|
||||
{
|
||||
RoleUnsigned = (unsigned) Role;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &RoleUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
Role == Gbl.Usrs.Me.Role.Logged,false,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Role][Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
}
|
||||
|
|
12
swad_scope.c
12
swad_scope.c
|
@ -122,42 +122,42 @@ void Sco_PutSelectorScope (const char *ParamName,bool SendOnChange)
|
|||
switch (Scope)
|
||||
{
|
||||
case Hie_SYS:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope,false,
|
||||
"%s: %s",
|
||||
Txt_System,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
break;
|
||||
case Hie_CTY:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope,false,
|
||||
"%s: %s",
|
||||
Txt_Country,
|
||||
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
|
||||
break;
|
||||
case Hie_INS:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope,false,
|
||||
"%s: %s",
|
||||
Txt_Institution,
|
||||
Gbl.Hierarchy.Ins.ShrtName);
|
||||
break;
|
||||
case Hie_CTR:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope,false,
|
||||
"%s: %s",
|
||||
Txt_Centre,
|
||||
Gbl.Hierarchy.Ctr.ShrtName);
|
||||
break;
|
||||
case Hie_DEG:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope,false,
|
||||
"%s: %s",
|
||||
Txt_Degree,
|
||||
Gbl.Hierarchy.Deg.ShrtName);
|
||||
break;
|
||||
case Hie_CRS:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope,false,
|
||||
"%s: %s",
|
||||
Txt_Course,
|
||||
|
|
|
@ -173,7 +173,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie
|
|||
if (Sch_CheckIfIHavePermissionToSearch (WhatToSearch))
|
||||
{
|
||||
WTS = (unsigned) WhatToSearch;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &WTS,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&WTS,
|
||||
Gbl.Search.WhatToSearch == WhatToSearch,false,
|
||||
"%s",Titles[WhatToSearch]);
|
||||
}
|
||||
|
|
|
@ -1732,7 +1732,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
true,true,false,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/* Write the action */
|
||||
if (sscanf (row[4],"%ld",&ActCod) != 1)
|
||||
|
@ -2394,7 +2394,7 @@ static void Sta_DrawAccessesPerHourForADay (Sta_ColorType_t ColorType,float Hits
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** Free memory allocated for string *****/
|
||||
free ((void *) Str);
|
||||
free (Str);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3847,7 +3847,7 @@ static void Sta_DrawBarNumHits (char Color,
|
|||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_IMG (Cfg_URL_ICON_PUBLIC,Icon,NULL,
|
||||
"style=\"width:%upx;height:10px;\"",BarWidth);
|
||||
free ((void *) Icon);
|
||||
free (Icon);
|
||||
|
||||
/***** Write the number of hits *****/
|
||||
fprintf (Gbl.F.Out," ");
|
||||
|
|
|
@ -480,9 +480,9 @@ void Str_InsertLinks (char *Txt,unsigned long MaxLength,size_t MaxCharsURLOnScre
|
|||
NumLink++)
|
||||
{
|
||||
if (Links[NumLink].Anchor1Nick)
|
||||
free ((void *) Links[NumLink].Anchor1Nick);
|
||||
free (Links[NumLink].Anchor1Nick);
|
||||
if (Links[NumLink].Anchor2Nick)
|
||||
free ((void *) Links[NumLink].Anchor2Nick);
|
||||
free (Links[NumLink].Anchor2Nick);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -893,7 +893,7 @@ void Str_WriteFloatNumToFile (FILE *FileDst,float Number)
|
|||
fprintf (FileDst,"%s",Str);
|
||||
|
||||
/***** Free memory allocated for string *****/
|
||||
free ((void *) Str);
|
||||
free (Str);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1501,7 +1501,7 @@ void Str_ChangeFormat (Str_ChangeFrom_t ChangeFrom,Str_ChangeTo_t ChangeTo,
|
|||
Str[LengthStrDst] = '\0';
|
||||
|
||||
/***** Free memory used for the destination string *****/
|
||||
free ((void *) StrDst);
|
||||
free (StrDst);
|
||||
}
|
||||
|
||||
if (RemoveLeadingAndTrailingSpaces)
|
||||
|
|
|
@ -491,7 +491,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/* End date/time */
|
||||
if (asprintf (&Id,"svy_date_end_%u",UniqueId) < 0)
|
||||
|
@ -515,7 +515,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,false,true,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/* Survey title */
|
||||
if (ShowOnlyThisSvyComplete)
|
||||
|
@ -1002,7 +1002,7 @@ static void Svy_GetListSurveys (void)
|
|||
for (Scope = Hie_SYS;
|
||||
Scope <= Hie_CRS;
|
||||
Scope++)
|
||||
free ((void *) SubQuery[Scope]);
|
||||
free (SubQuery[Scope]);
|
||||
|
||||
if (NumRows) // Surveys found...
|
||||
{
|
||||
|
@ -1420,7 +1420,7 @@ void Svy_FreeListSurveys (void)
|
|||
if (Gbl.Svys.LstIsRead && Gbl.Svys.LstSvyCods)
|
||||
{
|
||||
/***** Free memory used by the list of surveys *****/
|
||||
free ((void *) Gbl.Svys.LstSvyCods);
|
||||
free (Gbl.Svys.LstSvyCods);
|
||||
Gbl.Svys.LstSvyCods = NULL;
|
||||
Gbl.Svys.Num = 0;
|
||||
Gbl.Svys.LstIsRead = false;
|
||||
|
@ -2954,7 +2954,7 @@ static void Svy_FreeTextChoiceAnswer (struct SurveyQuestion *SvyQst,unsigned Num
|
|||
{
|
||||
if (SvyQst->AnsChoice[NumAns].Text)
|
||||
{
|
||||
free ((void *) SvyQst->AnsChoice[NumAns].Text);
|
||||
free (SvyQst->AnsChoice[NumAns].Text);
|
||||
SvyQst->AnsChoice[NumAns].Text = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -3386,7 +3386,7 @@ static void Svy_WriteQstStem (const char *Stem)
|
|||
fprintf (Gbl.F.Out,"%s",HeadingRigorousHTML);
|
||||
|
||||
/* Free memory allocated for the stem */
|
||||
free ((void *) HeadingRigorousHTML);
|
||||
free (HeadingRigorousHTML);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -466,7 +466,7 @@ void Syl_FreeListItemsSyllabus (void)
|
|||
{
|
||||
if (LstItemsSyllabus.Lst)
|
||||
{
|
||||
free ((void *) LstItemsSyllabus.Lst);
|
||||
free (LstItemsSyllabus.Lst);
|
||||
LstItemsSyllabus.Lst = NULL;
|
||||
LstItemsSyllabus.NumItems = 0;
|
||||
}
|
||||
|
@ -781,7 +781,7 @@ int Syl_WriteSyllabusIntoHTMLBuffer (char **HTMLBuffer)
|
|||
|
||||
/* Copy file content into buffer */
|
||||
fseek (FileHTMLTmp,0L,SEEK_SET);
|
||||
if (fread ((void *) *HTMLBuffer,sizeof (char),Length,FileHTMLTmp) != Length)
|
||||
if (fread (*HTMLBuffer,sizeof (char),Length,FileHTMLTmp) != Length)
|
||||
{
|
||||
fclose (FileHTMLTmp);
|
||||
unlink (FileNameHTMLTmp);
|
||||
|
|
20
swad_test.c
20
swad_test.c
|
@ -1104,7 +1104,7 @@ void Tst_WriteQstStem (const char *Stem,const char *ClassStem)
|
|||
HTM_DIV_End ();
|
||||
|
||||
/***** Free memory allocated for the stem *****/
|
||||
free ((void *) StemRigorousHTML);
|
||||
free (StemRigorousHTML);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1198,7 +1198,7 @@ void Tst_WriteQstFeedback (const char *Feedback,const char *ClassFeedback)
|
|||
HTM_DIV_End ();
|
||||
|
||||
/***** Free memory allocated for the feedback *****/
|
||||
free ((void *) FeedbackRigorousHTML);
|
||||
free (FeedbackRigorousHTML);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2922,7 +2922,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows,
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,false,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/* Write the question tags */
|
||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
|
@ -3131,7 +3131,7 @@ static void Tst_ListOneOrMoreQuestionsForSelection (unsigned long NumRows,
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||
true,true,false,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/* Write the question tags */
|
||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
|
@ -3398,9 +3398,9 @@ void Tst_WriteAnswersEdit (long QstCod)
|
|||
HTM_TR_End ();
|
||||
|
||||
/* Free memory allocated for the answer and the feedback */
|
||||
free ((void *) Answer);
|
||||
free (Answer);
|
||||
if (LengthFeedback)
|
||||
free ((void *) Feedback);
|
||||
free (Feedback);
|
||||
}
|
||||
HTM_TABLE_End ();
|
||||
break;
|
||||
|
@ -4963,7 +4963,7 @@ void Tst_FreeTagsList (void)
|
|||
{
|
||||
if (Gbl.Test.Tags.List)
|
||||
{
|
||||
free ((void *) Gbl.Test.Tags.List);
|
||||
free (Gbl.Test.Tags.List);
|
||||
Gbl.Test.Tags.List = NULL;
|
||||
Gbl.Test.Tags.Num = 0;
|
||||
}
|
||||
|
@ -5532,12 +5532,12 @@ static void Tst_FreeTextChoiceAnswer (unsigned NumOpt)
|
|||
{
|
||||
if (Gbl.Test.Answer.Options[NumOpt].Text)
|
||||
{
|
||||
free ((void *) Gbl.Test.Answer.Options[NumOpt].Text);
|
||||
free (Gbl.Test.Answer.Options[NumOpt].Text);
|
||||
Gbl.Test.Answer.Options[NumOpt].Text = NULL;
|
||||
}
|
||||
if (Gbl.Test.Answer.Options[NumOpt].Feedback)
|
||||
{
|
||||
free ((void *) Gbl.Test.Answer.Options[NumOpt].Feedback);
|
||||
free (Gbl.Test.Answer.Options[NumOpt].Feedback);
|
||||
Gbl.Test.Answer.Options[NumOpt].Feedback = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -7763,7 +7763,7 @@ static void Tst_ShowTstResults (struct UsrData *UsrDat)
|
|||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA,
|
||||
true,true,false,0x7);
|
||||
HTM_TD_End ();
|
||||
free ((void *) Id);
|
||||
free (Id);
|
||||
|
||||
/* Get number of questions (row[3]) */
|
||||
if (sscanf (row[3],"%u",&NumQstsInThisTest) != 1)
|
||||
|
|
|
@ -457,7 +457,7 @@ static void TsI_ReadQuestionsFromXMLFileAndStoreInDB (const char *FileNameXML)
|
|||
else
|
||||
{
|
||||
/***** Read file contents into XML buffer *****/
|
||||
if (fread ((void *) XMLBuffer,sizeof (char),(size_t) FileSize,Gbl.Test.XML.FileXML))
|
||||
if (fread (XMLBuffer,sizeof (char),(size_t) FileSize,Gbl.Test.XML.FileXML))
|
||||
XMLBuffer[FileSize] = '\0';
|
||||
else
|
||||
XMLBuffer[0] = '\0';
|
||||
|
@ -1148,9 +1148,9 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
HTM_TR_End ();
|
||||
|
||||
/* Free memory allocated for the answer and the feedback */
|
||||
free ((void *) AnswerText);
|
||||
free (AnswerText);
|
||||
if (AnswerFeedbackLength)
|
||||
free ((void *) AnswerFeedback);
|
||||
free (AnswerFeedback);
|
||||
}
|
||||
HTM_TABLE_End ();
|
||||
break;
|
||||
|
|
|
@ -1148,7 +1148,7 @@ static void TL_FormFavSha (Act_Action_t ActionGbl,Act_Action_t ActionUsr,
|
|||
Frm_EndForm ();
|
||||
|
||||
/* Free allocated memory for subquery */
|
||||
free ((void *) OnSubmit);
|
||||
free (OnSubmit);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -218,7 +218,7 @@ static void TT_FreeTimeTable (void)
|
|||
Weekday++)
|
||||
if (TT_TimeTable[Weekday])
|
||||
{
|
||||
free ((void *) TT_TimeTable[Weekday]);
|
||||
free (TT_TimeTable[Weekday]);
|
||||
TT_TimeTable[Weekday] = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -1406,7 +1406,7 @@ static unsigned TT_CalculateColsToDrawInCell (bool TopCall,
|
|||
|
||||
if (TopCall) // Top call, non recursive call
|
||||
/****** Free space used by list of intervals already checked *****/
|
||||
free ((void *) TT_IntervalsChecked);
|
||||
free (TT_IntervalsChecked);
|
||||
|
||||
return ColumnsToDraw;
|
||||
}
|
||||
|
@ -1457,6 +1457,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
struct Course Crs;
|
||||
struct GroupType *GrpTyp;
|
||||
struct Group *Grp;
|
||||
char *Classroom;
|
||||
|
||||
/***** Compute row span and background color depending on hour type *****/
|
||||
switch (IntervalType)
|
||||
|
@ -1523,9 +1524,9 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
HTM_TD_Begin ("%s%sclass=\"%s\"",RowSpanStr,ColSpanStr,ClassStr);
|
||||
|
||||
/* Free allocated memory for rowspan, colspan and class strings */
|
||||
free ((void *) RowSpanStr);
|
||||
free ((void *) ColSpanStr);
|
||||
free ((void *) ClassStr);
|
||||
free (RowSpanStr);
|
||||
free (ColSpanStr);
|
||||
free (ClassStr);
|
||||
|
||||
/***** Form to modify this cell *****/
|
||||
if (Gbl.TimeTable.View == TT_CRS_EDIT)
|
||||
|
@ -1604,14 +1605,9 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
if ((CT == TT_FREE) ||
|
||||
((Gbl.TimeTable.View == TT_CRS_EDIT) && (CT == TT_LECTURE || CT == TT_PRACTICAL)) ||
|
||||
((Gbl.TimeTable.View == TT_TUT_EDIT) && (CT == TT_TUTORING)))
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<option");
|
||||
if (CT == ClassType)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out," value=\"%s\">%s</option>",
|
||||
TT_ClassTypeDB[CT],
|
||||
Txt_TIMETABLE_CLASS_TYPES[CT]);
|
||||
}
|
||||
HTM_OPTION (HTM_Type_STRING,TT_ClassTypeDB[CT],
|
||||
CT == ClassType,false,
|
||||
"%s",Txt_TIMETABLE_CLASS_TYPES[CT]);
|
||||
HTM_SELECT_End ();
|
||||
|
||||
if (IntervalType == TT_FREE_INTERVAL)
|
||||
|
@ -1630,7 +1626,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
Gbl.TimeTable.Config.Range.MinutesPerInterval) < 0) // Minutes
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Par_PutHiddenParamString (NULL,"TTDur",TTDur);
|
||||
free ((void *) TTDur);
|
||||
free (TTDur);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1648,15 +1644,12 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
for (Dur = 0;
|
||||
Dur <= MaxDuration;
|
||||
Dur++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<option");
|
||||
if (Dur == DurationNumIntervals)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%u:%02u</option>",
|
||||
(Dur / Gbl.TimeTable.Config.IntervalsPerHour), // Hours
|
||||
(Dur % Gbl.TimeTable.Config.IntervalsPerHour) *
|
||||
Gbl.TimeTable.Config.Range.MinutesPerInterval); // Minutes
|
||||
}
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Dur == DurationNumIntervals,false,
|
||||
"%u:%02u",
|
||||
(Dur / Gbl.TimeTable.Config.IntervalsPerHour), // Hours
|
||||
(Dur % Gbl.TimeTable.Config.IntervalsPerHour) *
|
||||
Gbl.TimeTable.Config.Range.MinutesPerInterval); // Minutes
|
||||
HTM_SELECT_End ();
|
||||
|
||||
if (Gbl.TimeTable.View == TT_CRS_EDIT)
|
||||
|
@ -1670,10 +1663,8 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
"id=\"TTGrp%s\" name=\"TTGrp\""
|
||||
" class=\"TT_GRP\"",
|
||||
CellStr);
|
||||
fprintf (Gbl.F.Out,"<option value=\"-1\"");
|
||||
if (GrpCod <= 0)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",Txt_All_groups);
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",GrpCod <= 0,false,
|
||||
"%s",Txt_All_groups);
|
||||
for (NumGrpTyp = 0;
|
||||
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.Num;
|
||||
NumGrpTyp++)
|
||||
|
@ -1685,17 +1676,21 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
NumGrp++)
|
||||
{
|
||||
Grp = &GrpTyp->LstGrps[NumGrp];
|
||||
|
||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",
|
||||
Grp->GrpCod);
|
||||
if (GrpCod == Grp->GrpCod)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s %s",
|
||||
GrpTyp->GrpTypName,Grp->GrpName);
|
||||
if (Grp->Classroom.ClaCod > 0)
|
||||
fprintf (Gbl.F.Out," (%s)",
|
||||
Grp->Classroom.ShrtName);
|
||||
fprintf (Gbl.F.Out,"</option>");
|
||||
if (Grp->Classroom.ClaCod > 0)
|
||||
{
|
||||
if (asprintf (&Classroom," (%s)",Grp->Classroom.ShrtName) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (asprintf (&Classroom,"%s","") < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
}
|
||||
HTM_OPTION (HTM_Type_LONG,&Grp->GrpCod,
|
||||
GrpCod == Grp->GrpCod,false,
|
||||
"%s %s%s",
|
||||
GrpTyp->GrpTypName,Grp->GrpName,Classroom);
|
||||
free (Classroom);
|
||||
}
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1733,7 +1728,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
|||
}
|
||||
|
||||
/***** Free allocated unique string for this cell used in labels *****/
|
||||
free ((void *) CellStr);
|
||||
free (CellStr);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
18
swad_user.c
18
swad_user.c
|
@ -387,7 +387,7 @@ void Usr_UsrDataDestructor (struct UsrData *UsrDat)
|
|||
/***** Free memory allocated for comments *****/
|
||||
if (UsrDat->Comments)
|
||||
{
|
||||
free ((void *) UsrDat->Comments);
|
||||
free (UsrDat->Comments);
|
||||
UsrDat->Comments = NULL;
|
||||
}
|
||||
|
||||
|
@ -424,7 +424,7 @@ void Usr_FreeListUsrCods (struct ListUsrCods *ListUsrCods)
|
|||
{
|
||||
if (ListUsrCods->NumUsrs && ListUsrCods->Lst)
|
||||
{
|
||||
free ((void *) ListUsrCods->Lst);
|
||||
free (ListUsrCods->Lst);
|
||||
ListUsrCods->Lst = NULL;
|
||||
ListUsrCods->NumUsrs = 0;
|
||||
}
|
||||
|
@ -4586,7 +4586,7 @@ static void Usr_BuildQueryToGetUsrsLstCrs (char **Query,Rol_Role_t Role)
|
|||
Usr_MAX_BYTES_QUERY_GET_LIST_USRS);
|
||||
|
||||
/***** Free memory used by the list of booleans AddStdsWithoutGroupOf *****/
|
||||
free ((void *) AddStdsWithoutGroupOf);
|
||||
free (AddStdsWithoutGroupOf);
|
||||
|
||||
/***** Free list of groups types in current course *****/
|
||||
Grp_FreeListGrpTypesAndGrps ();
|
||||
|
@ -5607,7 +5607,7 @@ void Usr_FreeUsrsList (Rol_Role_t Role)
|
|||
/***** Free the list itself *****/
|
||||
if (Gbl.Usrs.LstUsrs[Role].Lst)
|
||||
{
|
||||
free ((void *) Gbl.Usrs.LstUsrs[Role].Lst);
|
||||
free (Gbl.Usrs.LstUsrs[Role].Lst);
|
||||
Gbl.Usrs.LstUsrs[Role].Lst = NULL;
|
||||
}
|
||||
|
||||
|
@ -6017,7 +6017,7 @@ void Usr_FreeListsSelectedUsrsCods (void)
|
|||
Role++)
|
||||
if (Gbl.Usrs.Selected.List[Role])
|
||||
{
|
||||
free ((void *) Gbl.Usrs.Selected.List[Role]);
|
||||
free (Gbl.Usrs.Selected.List[Role]);
|
||||
Gbl.Usrs.Selected.List[Role] = NULL;
|
||||
}
|
||||
|
||||
|
@ -6050,7 +6050,7 @@ void Usr_FreeListOtherRecipients (void)
|
|||
{
|
||||
if (Gbl.Usrs.ListOtherRecipients)
|
||||
{
|
||||
free ((void *) Gbl.Usrs.ListOtherRecipients);
|
||||
free (Gbl.Usrs.ListOtherRecipients);
|
||||
Gbl.Usrs.ListOtherRecipients = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -6559,7 +6559,7 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr)
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** Free memory used by the string with the list of group names where student belongs to *****/
|
||||
free ((void *) GroupNames);
|
||||
free (GroupNames);
|
||||
}
|
||||
else // Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs == 0
|
||||
/***** Show warning indicating no students found *****/
|
||||
|
@ -6936,7 +6936,7 @@ void Usr_ListAllDataStds (void)
|
|||
|
||||
/***** Free memory used by the string with the list of group names where student belongs to *****/
|
||||
if (Gbl.Scope.Current == Hie_CRS)
|
||||
free ((void *) GroupNames);
|
||||
free (GroupNames);
|
||||
}
|
||||
else // Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs == 0
|
||||
/***** Show warning indicating no students found *****/
|
||||
|
@ -8945,7 +8945,7 @@ void Usr_PutSelectorNumColsClassPhoto (void)
|
|||
for (Cols = 1;
|
||||
Cols <= Usr_CLASS_PHOTO_COLS_MAX;
|
||||
Cols++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &Cols,
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Cols,
|
||||
Cols == Gbl.Usrs.ClassPhoto.Cols,false,
|
||||
"%u",Cols);
|
||||
|
||||
|
|
10
swad_xml.c
10
swad_xml.c
|
@ -512,7 +512,7 @@ void XML_FreeTree (struct XMLElement *ParentElem)
|
|||
/***** Free memory allocated for TagName *****/
|
||||
if (ParentElem->TagName)
|
||||
{
|
||||
free ((void *) ParentElem->TagName);
|
||||
free (ParentElem->TagName);
|
||||
ParentElem->TagName = NULL;
|
||||
ParentElem->TagNameLength = (size_t) 0;
|
||||
}
|
||||
|
@ -522,16 +522,16 @@ void XML_FreeTree (struct XMLElement *ParentElem)
|
|||
while (Attribute)
|
||||
{
|
||||
NextAttrib = Attribute->Next;
|
||||
free ((void *) Attribute->AttributeName);
|
||||
free ((void *) Attribute->Content);
|
||||
free ((void *) Attribute);
|
||||
free (Attribute->AttributeName);
|
||||
free (Attribute->Content);
|
||||
free (Attribute);
|
||||
Attribute = NextAttrib;
|
||||
}
|
||||
|
||||
/***** Free memory allocated for Content *****/
|
||||
if (ParentElem->Content)
|
||||
{
|
||||
free ((void *) ParentElem->Content);
|
||||
free (ParentElem->Content);
|
||||
ParentElem->Content = NULL;
|
||||
ParentElem->ContentLength = (size_t) 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue