Difference between revisions of "User:Ksuzee/Reports"
Line 137: | Line 137: | ||
*27/06 | *27/06 | ||
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d | **made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d | ||
+ | *28-29/06 | ||
+ | **check duplications in different folder. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them |
Revision as of 10:12, 29 June 2012
GSoC 2012
0 week
- 2/05/2012 - installing Ubuntu-12.04, XChat
- 4-5/05/2012 - downloading sources, successful building with CMake
- 8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src
- 12/05/2012 - csh script for finding duplications
- 15/05/2012 - patch r50549 for adrt/isst_tcltk.c
- 16-18/05/2012 - patches:
- /fb/orle-fb.c
- /util/picbackgnd.c
- /libbu/htonf.c
1 week
- start fixing duplications, which are situated in different folders
- patch /libbu/convert.c for check
- patch /util/lowp.c for check
- patch /rt/viewarea.c for check
- getting familiar with Astyle
Also I continue to check folders which contain duplications in one file.
There're folders: util, vfont, tclscripts, sig, shapes, rtthem, remrt, proc-fb, nirt, libwdb, libtermio, libsysw, librtserver. All these directories are checked. They either have no duplications in one file which should be reducted or reductions are put to patch tracker for check. I'm working on directories: tab, rt. mged, libtclcad, librt
2 week
- 28/05
- correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)
- working at duplications in /mged/points/process.c
- 29/05
- there's a huge duplication in rt/worker.c. I'm working on it
- checking some more directories (will write the result later)
- 30/05
- checking some more directories (will write the result later)
- leave worker.c for discuss (ready, but not tested yet)
- 31/05
- correction the util/lowp.c patch
- checking some more directories
- 1/06
- all the directories are checked for duplications in one file
- 2/06
- preparing the summary about duplications
tab/tabinterp.c - functions step_interpolate and linear_interpolate -- the bodies're different but part which contains "for", "while" and "if" can be put in common static inline function.
/rt/worker.c - there're two huge parts in function "void do_pixel" in "begin unroll"-"end unroll" and "begin non-ubrolled"-"end non-unrolled". However, you told it problem file, so I'll wait your comment here.
/mged/cmd.c - functions "int cmd_ged_edit_wrapper" and "int cmd_ged_simulate_wrapper". The only ddifference is value of av[1]. Both these functions are used in setup.c, so it's better to use static inline function too. I suggest to make one more variable for parameter of argv[]
/libtclcad/tclcadobj.c - 1) functions "HIDDEN int to_mouse_move_arb_edge", "HIDDEN int to_mouse_move_arb_face" and "HIDDEN int to_mouse_move_pipept". The difference's in: av[0] = "move_arb_face"; - to_mouse_move_arb_face av[0] = "move_arb_edge"; - to_mouse_move_arb_edge av[0] = "move_pipept"; - to_mouse_move_pipept
and ret = ged_move_arb_edge(gedp, 5, (const char **)av); ret = ged_move_arb_face(gedp, 5, (const char **)av); ret = ged_move_pipept(gedp, 5, (const char **)av);
So these functions could call another static function which'd have all the body and get char * parameter for av[0] and functional type for ret. 2) functions "HIDDEN int to_poly_ell_mode" and "HIDDEN int to_poly_circ_mode". Differnce's in consts - gdvp->gdv_view->gv_mode = TCLCAD_POLY_ELLIPSE_MODE; and gdvp->gdv_view->gv_mode = TCLCAD_POLY_CIRCLE_MODE; so necessary const could be got by common function (type - ged_view, if I'm not mistaken). Also difference is in bu_vls_printf, but type char* can be transmit too.
/librt/primitives/nmg/nmg_rt_segs.c - functions "HIDDEN int state5" and "HIDDEN int state6". It'd be easy to reduct, because difference's only in ret_val (in two situations at the end of functions) which is INT. So I'd be necessary only to transmit ret_val1 and ret_val2.
/libpc/pcParameter.cpp - methods Point::Point(VCSet & vcs, std::string n, void *ptr) and Vector::Vector(VCSet & vcs, std::string n, void *ptr): the blocks in if (ptr) {...} are the same, so this block can be put in other function.
/liboptical/sh_camo.c - functions HIDDEN int marble_setup and HIDDEN int camo_setup. The difference is in bu_log (just static comment) and in memcpy.
/libbn/plot.c - functions void pd_3space and void pd_3line. I made static inline function pd_3 which gets the same parameters as those two functions + char l. Both functions call pd_3 with l == 'W' for pd3_space and l == 'V' for pd_3line. Making was successful.
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is: (void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and (void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y)); So common function can get just: struct pkg_conn *pcp, char *buf + functional type
/fb/pl-fb.c - int GetDCoords(coords *coop) and int Get3DCoords(coords *coop). Difference is only here: if (debug) {fprintf..}. So text for fprintf can be transmited like a char * in common function.
3 week
- 4/06 - getting familiar with unit tests
- 5/06 - cheking some more directories for duplications
- 6/06 - CMakeFiles and Makefile
- 7/06
- patch for src/util - files util.c and util.h.
- util_yuv is almost ready (something need to be checked)
- 8/06
- working with util_yuv (ready)
- come back to firt patch (ready *need to send patch)
- 9/06
- /mged/cmd.c is refactored
- work with /libtclcad/tclcadobj.c. Have some problems with functional type
- /fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful
4 week
- 11/06
- further checking for duplications in one directory, different files
- 12/06
- the same checking. Hope to finish it by today's evening
- 13/06
- sent all prepared patches,
- did some making and running of refactored functions to be sure in right result.
- 14/06
- /librt/primitives/nmg/nmg_rt_segs.c is refactored
- some more checking
- 15/06
- checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched
- 16/06
- getting familiar with u-f.c, d-i.c etc. Understanding how they work.
5 week
- 18/06
- reduction in sig/d-i.c and ../f-i.c. Patch's added
- 19-20/06
- reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c
- reduction in libdm. There're quite enough dups, so need a bit more time to finish
- 21/06
- reduction in libdm is finished
- 23/06
- find a bit more in libdm, add it
6 week
- 25/06
- getting familiar with g-nff, g-obj, g-xxx_facets
- 26/06
- reduction in src/conv for g-nff, g-obj and g-xxx_facets is done
- made small man pages for src/sig: f-i, d-i, u-f, i-f
- 27/06
- made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d
- 28-29/06
- check duplications in different folder. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them