2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-10-27 08:28:16 +01:00
< meta name = "generator" content = "ZealOS V1.04" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
2021-10-08 07:06:11 +01:00
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
2021-07-03 05:07:57 +01:00
< / style >
< / head >
< body >
2021-07-05 01:12:38 +01:00
< pre style = "font-family:monospace;font-size:12pt" >
2021-07-03 05:07:57 +01:00
< a name = "l1" > < / a > < span class = cF0 > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " Cmd Line (Typically)" < / span > < span class = cF0 >
< a name = "l2" > < / a >
< a name = "l3" > < / a > < / span > < span class = cF9 > CDirEntry< / span > < span class = cF0 > < / span > < span class = cF5 > MGFind< / span > < span class = cF0 > (< / span > < span class = cF9 > CDirEntry< / span > < span class = cF0 > *needle_entry, < / span > < span class = cF9 > CDirEntry< / span > < span class = cF0 > *haystack_list)
< a name = "l4" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l5" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (haystack_list)
< a name = "l6" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l7" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > StrCompare< / span > < span class = cF7 > (< / span > < span class = cF0 > needle_entry-> name, haystack_list-> name< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l8" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > haystack_list;
< a name = "l9" > < / a > haystack_list = haystack_list-> next;
< a name = "l10" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l11" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l12" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l13" > < / a > }
< a name = "l14" > < / a >
< a name = "l15" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > Merge2< / span > < span class = cF0 > (< / span > < span class = cF9 > CDirEntry< / span > < span class = cF0 > *tmpde1, < / span > < span class = cF9 > CDirEntry< / span > < span class = cF0 > *tmpde2, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_fuf_flags, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_df_flags)
< a name = "l16" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l17" > < / a > < / span > < span class = cF9 > CDirEntry< / span > < span class = cF0 > *tmpde;
2021-07-03 05:07:57 +01:00
< a name = "l18" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l19" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpde1 & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > *_df_flags & < / span > < span class = cF3 > DF_ABORT_ALL_FILES< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l20" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l21" > < / a > tmpde = < / span > < span class = cF5 > MGFind< / span > < span class = cF0 > (tmpde1, tmpde2);
< a name = "l22" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!tmpde)
< a name = "l23" > < / a > < / span > < span class = cF6 > " $BROWN$Does Not Exist:%s$FG$\n" < / span > < span class = cF0 > , tmpde1-> full_name;
< a name = "l24" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l25" > < / a > {
< a name = "l26" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpde1-> attr & < / span > < span class = cF3 > RS_ATTR_DIR< / span > < span class = cF0 > )
< a name = "l27" > < / a > < / span > < span class = cF5 > Merge2< / span > < span class = cF0 > (tmpde1-> sub, tmpde-> sub, _fuf_flags, _df_flags);
< a name = "l28" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l29" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l30" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > AbsI64< / span > < span class = cF7 > (< / span > < span class = cF0 > tmpde1-> datetime - tmpde-> datetime< / span > < span class = cF7 > )< / span > < span class = cF0 > > < / span > < span class = cF3 > CDATE_FREQ< / span > < span class = cF0 > * < / span > < span class = cFE > 2< / span > < span class = cF0 > ) {< / span > < span class = cF2 > //slop< / span > < span class = cF0 >
2021-08-13 22:04:00 +01:00
< a name = "l31" > < / a > < / span > < span class = cF6 > " \n$LTRED$%s$FG$\n" < / span > < span class = cF0 > , tmpde-> full_name;
< a name = "l32" > < / a > < / span > < span class = cF6 > " $LTGREEN$%s$FG$" < / span > < span class = cF0 > , tmpde1-> full_name;
< a name = "l33" > < / a > < / span > < span class = cF6 > '\n'< / span > < span class = cF0 > ;
< a name = "l34" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Bt< / span > < span class = cF7 > (< / span > < span class = cF0 > _fuf_flags, < / span > < span class = cF3 > FUf_DIFF< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l35" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l36" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > FilesFindMatch< / span > < span class = cF7 > (< / span > < span class = cF0 > tmpde1-> full_name, < / span > < span class = cF3 > FILEMASK_TXT< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l37" > < / a > < / span > < span class = cF5 > Diff< / span > < span class = cF0 > (tmpde-> full_name, tmpde1-> full_name, _df_flags);
< a name = "l38" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l39" > < / a > }
< a name = "l40" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l41" > < / a > }
< a name = "l42" > < / a > tmpde1 = tmpde1-> next;
< a name = "l43" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l44" > < / a > }
< a name = "l45" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > Merge< / span > < span class = cF0 > (< / span > < span class = cF1 > U8< / span > < span class = cF0 > *dst_files_find_mask=< / span > < span class = cF6 > " /*" < / span > < span class = cF0 > , < / span > < span class = cF1 > U8< / span > < span class = cF0 > *src_files_find_mask=< / span > < span class = cF6 > " /*" < / span > < span class = cF0 > , < / span > < span class = cF1 > U8< / span > < span class = cF0 > *fu_flags=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > )
< a name = "l46" > < / a > {< / span > < span class = cF2 > /*Merge text files from one list into another.< / span > < span class = cF0 >
< a name = "l47" > < / a > < / span > < span class = cF2 > Report files whos date/time is different.< / span > < span class = cF0 >
< a name = "l48" > < / a >
< a name = "l49" > < / a > < / span > < span class = cF2 > " +d" will do < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Utils/Diff.CC.html#l260" > < span class = cF4 > Diff< / span > < / a > < span class = cF2 > () on files and prompt to< / span > < span class = cF0 >
< a name = "l50" > < / a > < / span > < span class = cF2 > merge changes from source files into< / span > < span class = cF0 >
< a name = "l51" > < / a > < / span > < span class = cF2 > destination files.< / span > < span class = cF0 >
< a name = "l52" > < / a > < / span > < span class = cF2 > */< / span > < span class = cF0 >
< a name = "l53" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > df_flags = < / span > < span class = cFE > 0< / span > < span class = cF0 > , fuf_flags = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l54" > < / a > < / span > < span class = cF9 > CDirEntry< / span > < span class = cF0 > *tmpde1 = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > , *tmpde2 = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l55" > < / a >
< a name = "l56" > < / a > < / span > < span class = cF5 > FlagsScan< / span > < span class = cF0 > (& fuf_flags, < / span > < span class = cF5 > Define< / span > < span class = cF7 > (< / span > < span class = cF6 > " ST_FILE_UTIL_FLAGS" < / span > < span class = cF7 > )< / span > < span class = cF0 > , < / span > < span class = cF6 > " +r" < / span > < span class = cF0 > );
< a name = "l57" > < / a > < / span > < span class = cF5 > FlagsScan< / span > < span class = cF0 > (& fuf_flags, < / span > < span class = cF5 > Define< / span > < span class = cF7 > (< / span > < span class = cF6 > " ST_FILE_UTIL_FLAGS" < / span > < span class = cF7 > )< / span > < span class = cF0 > , fu_flags);
< a name = "l58" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (fuf_flags & ~< / span > < span class = cF7 > (< / span > < span class = cF3 > FUG_FILES_FIND< / span > < span class = cF0 > | < / span > < span class = cF3 > FUF_DIFF< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l59" > < / a > < / span > < span class = cF5 > throw< / span > < span class = cF0 > (< / span > < span class = cF6 > 'FUF'< / span > < span class = cF0 > );
< a name = "l60" > < / a > < / span > < span class = cF3 > ST_WARN_ST< / span > < span class = cF0 > < / span > < span class = cF6 > " This is based strictly on file dates.\n" < / span > < span class = cF0 > ;
< a name = "l61" > < / a > tmpde1 = < / span > < span class = cF5 > FilesFind< / span > < span class = cF0 > (src_files_find_mask, fuf_flags & < / span > < span class = cF3 > FUG_FILES_FIND< / span > < span class = cF0 > );
< a name = "l62" > < / a > tmpde2 = < / span > < span class = cF5 > FilesFind< / span > < span class = cF0 > (dst_files_find_mask, fuf_flags & < / span > < span class = cF3 > FUG_FILES_FIND< / span > < span class = cF0 > );
< a name = "l63" > < / a > fuf_flags & = < / span > < span class = cF3 > FUF_DIFF< / span > < span class = cF0 > ;
< a name = "l64" > < / a > < / span > < span class = cF5 > Merge2< / span > < span class = cF0 > (tmpde1, tmpde2, & fuf_flags, & df_flags);
< a name = "l65" > < / a > < / span > < span class = cF5 > DirTreeDel< / span > < span class = cF0 > (tmpde1);
< a name = "l66" > < / a > < / span > < span class = cF5 > DirTreeDel< / span > < span class = cF0 > (tmpde2);
< a name = "l67" > < / a > }
< a name = "l68" > < / a >
< a name = "l69" > < / a > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " Utils;Cmd Line (Typically)" < / span > < span class = cF0 >
< a name = "l70" > < / a >
< a name = "l71" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > NewFiles< / span > < span class = cF0 > (< / span > < span class = cF1 > U8< / span > < span class = cF0 > *files_find_mask=< / span > < span class = cF6 > " /*" < / span > < span class = cF0 > , < / span > < span class = cF9 > CDate< / span > < span class = cF0 > cdt=< / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF1 > U8< / span > < span class = cF0 > *fu_flags=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > )
< a name = "l72" > < / a > {< / span > < span class = cF2 > //Report files newer than a certain date.< / span > < span class = cF0 >
< a name = "l73" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > fuf_flags = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l74" > < / a > < / span > < span class = cF9 > CDirEntry< / span > < span class = cF0 > *tmpde, *tmpde1;
< a name = "l75" > < / a >
< a name = "l76" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!cdt)
< a name = "l77" > < / a > cdt = < / span > < span class = cFB > sys_compile_time< / span > < span class = cF0 > ;
< a name = "l78" > < / a > < / span > < span class = cF5 > FlagsScan< / span > < span class = cF0 > (& fuf_flags, < / span > < span class = cF5 > Define< / span > < span class = cF7 > (< / span > < span class = cF6 > " ST_FILE_UTIL_FLAGS" < / span > < span class = cF7 > )< / span > < span class = cF0 > , < / span > < span class = cF6 > " +r+F" < / span > < span class = cF0 > );
< a name = "l79" > < / a > < / span > < span class = cF5 > FlagsScan< / span > < span class = cF0 > (& fuf_flags, < / span > < span class = cF5 > Define< / span > < span class = cF7 > (< / span > < span class = cF6 > " ST_FILE_UTIL_FLAGS" < / span > < span class = cF7 > )< / span > < span class = cF0 > , fu_flags);
< a name = "l80" > < / a > tmpde = tmpde1 = < / span > < span class = cF5 > FilesFind< / span > < span class = cF0 > (files_find_mask, fuf_flags);
< a name = "l81" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpde)
< a name = "l82" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l83" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpde-> datetime > cdt)
< a name = "l84" > < / a > < / span > < span class = cF6 > " %s\n" < / span > < span class = cF0 > , tmpde-> full_name;
< a name = "l85" > < / a > tmpde = tmpde-> next;
< a name = "l86" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l87" > < / a > < / span > < span class = cF5 > DirTreeDel< / span > < span class = cF0 > (tmpde1);
< a name = "l88" > < / a > }
2021-07-03 05:07:57 +01:00
< / span > < / pre > < / body >
< / html >