https://brlcad.org/w/api.php?action=feedcontributions&user=Ksuzee&feedformat=atomBRL-CAD - User contributions [en]2024-03-28T19:36:54ZUser contributionsMediaWiki 1.32.2https://brlcad.org/w/index.php?title=SVN&diff=4950SVN2013-02-06T17:06:29Z<p>Ksuzee: </p>
<hr />
<div>The in-development code for BRL-CAD can be accessed via Subversion using the command <pre>svn co https://brlcad.svn.sourceforge.net/svnroot/brlcad/<module>/trunk <module></pre><br />
where <module> is one of the following:<br />
* '''brlcad''' - If you don't know which you want, this is probably it. This branch contains the code for the full BRL-CAD suite itself, including tools such as mged and rt.<br />
* '''jbrlcad''' - A currently inactive experimental project consisting of a very partial implementation of librt in pure Java. This served as a study of the adaptability of librt's interface to an object oriented paradigm, which turned out to be very high.<br />
* '''rt^3''' - Early development of a C++ geometry engine interface and a new modeling GUI.<br />
* '''rtcmp''' - Code for a tool to compare the output of librt with that of other ray tracing libs.<br />
* '''web''' - Placeholder for version control of the website.<br />
<br />
More information about specific branches and the code contained within them can be had by [http://brlcad.org/d/contact contacting the developers] responsible, or a similarly knowledgeable community member.<br />
<br />
Some information may be found on other pages here. To wit:<br />
<br />
* [[Mime-types]]<br />
* [[Undoing-a-commit|Undoing a commit]]<br />
<br />
[[category:Getting started]]</div>Ksuzeehttps://brlcad.org/w/index.php?title=SVN&diff=4949SVN2013-02-06T17:06:06Z<p>Ksuzee: </p>
<hr />
<div>The in-development code for BRL-CAD can be accessed via Subversion using the command <pre>svn co https://brlcad.svn.sourceforge.net/svnroot/brlcad/<module>/trunk <module></pre><br />
where <module> is one of the following:<br />
* '''brlcad''' - If you don't know which you want, this is probably it. This branch contains the code for the full BRL-CAD suite itself, including tools such as mged and rt.<br />
* '''jbrlcad''' - A currently inactive experimental project consisting of a very partial implementation of librt in pure Java. This served as a study of the adaptability of librt's interface to an object oriented paradigm, which turned out to be very high.<br />
* '''rt^3''' - Early development of a C++ geometry engine interface and a new modeling GUI.<br />
* '''rtcmp''' - Code for a tool to compare the output of librt with that of other ray tracing libs.<br />
* '''web''' - Placeholder for version control of the website.<br />
<br />
More information about specific branches and the code contained within them can be had by [http://brlcad.org/d/contact contacting the developers] responsible, or a similarly knowledgeable community member.<br />
<br />
Some information may be found on other pages here. To wit:<br />
<br />
* [[Mime-types]]<br />
* [[Undoing-a-commit|Undoing a commit]]<br />
<br />
[[category:Getting started]]<br />
<br />
HELLO!!!!!</div>Ksuzeehttps://brlcad.org/w/index.php?title=Community_Publication_Portal&diff=4588Community Publication Portal2012-11-15T04:35:21Z<p>Ksuzee: /* Improving = */</p>
<hr />
<div>Welcome to the BRL-CAD community publication portal. This page is dedicated to the preparation and editing of BRL-CAD announcements. Proposed and upcoming topics are listed. Anyone is '''welcome and encouraged''' to share news about any activity related to BRL-CAD. Community editing and review are encouraged.<br />
<br />
__TOC__<br />
<br />
'''Formatting & Editing Standards:'''<br />
<br />
* Quotations are italicized and placed between double quotes ('' "Like This" '').<br />
<br />
* AA (All Acronyms) need to be defined upon first use, don't abbrev. words.<br />
<br />
* Section headings uppercase the major words and are in bold ('''Like This''')<br />
<br />
* Use the serial comma: one, two, and three; not one, two and three.<br />
<br />
* Cite references, include hyperlinks.<br />
<br />
* Keep it brief.<br />
<br />
'''Distribution Channels:'''<br />
<br />
For release publications, follow [http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/HACKING HACKING]. For everything else, distribute to the following:<br />
<br />
* brlcad-news@lists.sourceforge.net<br />
* http://brlcad.org/d/node/add/story<br />
* https://sourceforge.net/news/?group_id=105292<br />
* (optional) https://brlcad.org/wiki/<br />
* (optional) http://www.tenlinks.com/NEWS/tl_daily/submit_news.htm<br />
* (optional) http://upfrontezine.com<br />
<br />
----<br />
----<br />
<br />
== Ready for Publication ==<br />
These articles are ready for publication. Release notes should be posted after tarballs, ideally the last or first week of a month. Other publications should be scheduled one or two weeks later, ideally on the second or third week of the month.<br />
<br />
Note: if you see a comment indicating that a section is FROZEN, any changes you make in that section may go unnoticed as the article is being prepared for distribution. If you find errors in a FROZEN article, go ahead and correct the article but contact Sean (brlcad on freenode [[IRC]]) who may be able to incorporate changes during final publication.<br />
<br />
==== Move from Final Review to Here When Ready====<br />
<br />
<br />
----<br />
<br />
== Final Editorial Review ==<br />
These should be "complete" articles. The author is done. All that remains is a structure, grammar, voice, punctuation, and spelling review. Images welcome.<br />
<br />
==== Kyle Bodt: Ronja ====<br />
<br />
http://brlcad.org/wiki/Ronja<br />
<br />
Ronja (Reasonable Optical Near Joint Access) is an innovative piece of equipment that utilizes reliable optical data links to create a current communication range of 1.4 km and a speed of 10Mbps full duplex that can be used as a general purpose wireless link for virtually any networking project. This is a very important project for Twibright Labs, a small group of computer science graduate students operating out of Charles University in Prague in the Czech Republic. The group specializes in the usage of Free Software and User Controlled Technology Development.<br />
<br />
The primary output for the Ronja project is a design. The lab does not intend to manufacture and sell the hardware that is being designed but wants to engage in open source development of the technology. The philosophy surrounding User Controlled Technology is the ideal that the end-user is provided with unrestricted access to the intellectual property surrounding the technology, including the tools that are being used to create it. One tool playing an integral part in the development of the Ronja designs is BRL-CAD. All of the models that Twibright labs use to display the different variants of their Ronja concept were created with the help of BRL-CAD. BRL-CAD has allowed the members of Twibright labs to create instructional diagrams so that the users and builders of their open source technology will be able to have the latest information with regard to the proper construction of a Ronja unit. The interactive geometry editor and ray-tracers in BRL-CAD are an integral part in the communication of design plans for Twibright labs and enables them to connect with the users, who are the driving force behind the User Controlled Technology ideal.<br />
<br />
----<br />
<br />
== Initial Drafts ==<br />
These are incomplete articles being worked on. Short 250 to 500-word articles (not counting tables, images, etc) are usually perfect.<br />
<br />
==== Anurag Murty: Voxelizing Geometry ====<br />
Given a set of primitives as input, the voxelize command uses the data obtained from BRL-CAD's raytracer to represent the input in the form of voxels(Volumetric Picture Elements). A uniform grid of rays is uniformly shot on the given input and an approximation of the volume filled in each voxel region is made from the raytracing data. Depending on the approximate volume of the voxel filled, a voxel is classified as IN or OUT of the voxelized output. The voxels are represented as RPPs. <br />
Such voxelized outputs have applications in Volumetric rendering and finite element analysis.<br />
<br />
SYNTAX : <br />
voxelize [-s "dx dy dz"] [-d n] [-t f] new_obj old_obj [old_obj2 old_obj3 ...]<br />
<br />
ARGUMENTS-<br />
<br />
-d - Specifies the level of detail(precision in approximation of volume) required. An input of n means that n * n rays will be shot through each row, and an approximation of volume filled is reached averaging these n * n values<br />
<br />
-s - Specifies the voxel size in each direction. <br />
<br />
-t - Specifies the threshold volume to decide if voxel is to be included in the voxelized output. <br />
<br />
new_obj - Name for resultant primitive that is a region containing the resulting voxels. <br />
<br />
old_obj - Name of source primitive or collection.<br />
<br />
<br />
NOTES- <br />
<br />
1. A greater level of detail usually implies a much better approximation of fill volumes at the cost of more computations.<br />
<br />
2. Lesser voxel sizes give a more precise representation of the input at the cost of more memory requirements.<br />
<br />
3. Threshold value (the argument of -t) should be a value between 0 and 1, and not a percentage.<br />
<br />
==== Cristina Precup: Visualizing Directed Acyclic Graphs ====<br />
'''Visualizing Constructive Solid Geometry''' is a project meant to illustrate in an intuitive and interactive manner the hierarchical structure of .g geometry databases.<br />
<br />
For the representation of the hierarchies, the '''Adaptagrams''' graph library has been used. This made possible organizing the objects contained within the database into directed acyclic graphs.<br />
<br />
Following, are the steps that have been taken in developing the graph layout API:<br />
<br />
* Integrate the Adaptagrams library into BRL-CAD.<br />
* Traverse the geometry database and distinguish different types of objects (''primitive'', ''combination'', ''non-geometry'') within it, as well as, establish the operations between them (''union'', ''difference'', ...). Add all this data to the graph structure constructed with Adaptagrams.<br />
* Display the objects using a Tk Canvas widget inside a window.<br />
* Develop a ''decorative routine'' that sets different colors for different types of objects, correspondingly.<br />
* Create a name label for each represented object.<br />
* Develop a layout algorithm that aligns the nodes of the graph in a hierarchical way.<br />
* Introduce the '''graph''' command in both '''MGED''' and '''Archer'''. It has two subcommands:<br />
** '''show''' which displays a list with the name and type of the objects along with the nodes' and edges' positions;<br />
** '''positions''' that lists the names, types and positions of the corresponding nodes within the graph;<br />
* Introduce the '''igraph''' command in both MGED and Archer. This command pops up a graph based visualization window of the currently opened .g database. Its documentation can be found in ''brlman''.<br />
<br />
As an example, here is how the graph for the ''share/db/axis.g'' database looks like now:<br />
:[[Image:Graph_editor_v2.png]]<br />
<br />
Further work that can extend the ''interactive'' trait of the graph layout API includes adding user actions upon the graph such as ''move'' (dragging a node) or ''delete'' functionalities.<br />
<br />
==== Ksenija Slivko: Reducing Code ====<br />
<br />
===== Abstract =====<br />
The main aim of this project was to decrease the number of lines of code in the project. Since the project is being developing for quite a long time there were many "copy-pastes". They were redacted. <br />
<br />
===== The process of developing =====<br />
Coding period can be divided into three parts:<br />
* reduction in the single files<br />
* reduction in different files in the single program or library<br />
* reduction in different libraries<br />
<br />
===== Improving =====<br />
Since the project is quite large the redaction can be continued<br />
<br />
==== Laijiren: NURBS Tessellation: What, Why, How? ====<br />
<br />
==== Suryajith Chillara: Benchmark Performance Database ====<br />
===== Abstract =====<br />
The main idea is to store the data both in the database and the log files stored in the archive. The storage in the database enables the content to be searched via the parameters such as machine descriptions, versions, results and could be compared. The storage as a file in the archive is to maintain a back up of the file and whenever a developer needs a specific bunch of benchmark logs, he could get them from the archive with or without the help of the database.<br />
<br />
===== Main Components =====<br />
* '''Log Parser :''' The data of the log file needs to be parsed and the relevant and important information has to be logged in the database so as to make the data access for the graphic display through the frontend could be made possible. <br />
* '''Web API :''' Implemented via the bottle framework so as to submit the logs from the brlcad installation via scripts.<br />
* '''Web backend :''' A backend has been implemented as a MVC framework from scratch using the python bottle framework. <br />
* '''Frontend :''' The website that can offer multiple mechanisms for adding new performance run data into the database and provide multiple graphical and non-graphical visualizations of aggregate performance data (i.e., graphs, charts, tables, etc). Graphs, tables and charts are generated with the help of Google Charts via wrapper which generates the javascript code to interact with the Google Charts service.<br />
[[Image:Absavgperfvsimagescomb.png]]<br />
<br />
<br />
Plumbing between these components is via the python scripts. <br />
<br />
<br />
===== Tool & Service dependancies =====<br />
* Python 2.7 and libraries<br />
* Bottle web framework<br />
* MySQL<br />
* Google Charts<br />
<br />
==== Wu Jianbang: NURBS surface-surface intersections ====<br />
I focused on the "NURBS surface-surface intersections" project after the mid-term evaluation of this year's GSoC, before which I worked on converting implicit primitives to NURBS B-rep forms.<br />
<br />
The function calculating NURBS surface-surface intersection curves is surface_surface_intersection() which is declared in include/nurbs.h and implemented in src/libnurbs/opennurbs_ext.cpp. It outputs intersection curves in 3d space and in both surfaces' UV parameter spaces.<br />
<br />
The approach of the algorithm originates from:<br />
<br />
Adarsh Krishnamurthy, Rahul Khardekar, Sara McMains, Kirk Haller, and Gershon Elber. 2008. Performing efficient NURBS modeling operations on the GPU. In Proceedings of the 2008 ACM symposium on Solid and physical modeling (SPM '08). ACM, New York, NY, USA, 257-268. DOI=10.1145/1364901.1364937 http://doi.acm.org/10.1145/1364901.1364937<br />
<br />
It can be divided into several steps:<br />
<br />
* Generate the bounding box of the two surfaces.<br />
* If their bounding boxes intersect:<br />
** Split the two surfaces, both into four parts, and calculate the sub-surfaces' bounding boxes<br />
** Calculate the intersection of sub-surfaces' bboxes, if they do intersect, go deeper with splitting surfaces and smaller bboxes, otherwise trace back.<br />
* After getting the intersecting bboxes, approximate the surface inside the bbox with two triangles, and calculate the intersection points of the triangles (both in 3d space and two surfaces' UV space)<br />
* Fit the intersection points into polyline curves, and then to NURBS curves. Points with distance less than max_dis are considered in one curve.<br />
<br />
It needs to be mentioned here that the value max_dis can be provided by the user or generated automatically.<br />
<br />
Besides, after calculating the intersection curves, the next steps towords evaluated NURBS are splitting the surfaces into sub-surfaces with the intersection curves as their boundaries, and some inside-outside tests to decide which sub-surfaces should be included in the final object. Some work on splitting has been done, generating some b-rep faces that can pass IsValid(), but still further work is needed.<br />
<br />
==== Andrei Popescu: Network Performance Testing ====<br />
<br />
The project that I have been working on during the summer, as part of the Google Summer of Code program,<br> can be broken down into three independent parts and it consisted in running various tests for the BRL-CAD<br> networking library(Libpkg) .<br />
<br />
*Speed testing and investigations to uncover any potential performance bottleneck.<br />
*Unit tests and code review to find and cover any untreated exceptions(crashes) in the Libpkg library.<br />
*Eliminate the assumption of globals in the API.<br />
<br />
For the first part, I have run two types of tests : <br><br />
<br />
Local ones, both the "sender" and the "receiver" were located on localhost.<br />
The script gathered data<br> regarding the transmission speed for each set of package sizes (Here, package refers to the package <br>created by networking library, not networking packages) respectively file sizes.<br />
<br />
Remote ones, where the "sender" and the "receiver" were on separate machines, connected using SSH.<br> The script ran and the data gathered was done in the same way as the localhost one.Using the data <br> obtained from the tests, two 3D graphs were drawn.However, the tests were inconclusive, I could not find<br> an "ideal" package size to use regardless of file size.<br />
<br />
After Mid-term I focused mostly on second part. I used test units from libbu(Utility library) as an example<br> for the unit test type and design.<br />
When the mentioned tests were run, several exceptions that caused<br> crashes were discovered. Lastly, I have written fixes for the discovered crashes.<br />
<br />
The third part of the project has not been covered yet, so more work is needed.Although, I am doing my<br> best to finish it in the following weeks.<br />
<br />
==== Chris Dueck: Calculating 2D Sketch Surface Area ====<br />
<br />
Calculating the surface area of a 2D Sketch primitive is not a trivial task. Sketches are created interactively by the user, and can contain straight line segments, circular arc segments (and full circles), as well as Bezier and NURBS curves.<br />
<br />
The method used to approximately compute the area of a 2D sketch is as follows:<br />
<br />
*1.) Approximate the sketch by a polygon<br />
*2.) Compute the area of the polygon exactly using Green's Theorem<br />
*3.) Add the areas of any circular arc segments that were created during (1)<br />
<br />
To approximate the sketch by a polygon, each possible curve type of a sketch must be considered.<br />
<br />
*If the curve is a straight line, it need not be approximated.<br />
<br />
*If the curve is a circular arc, it must be determined if it is a full circle (in which case its area can be computed easily) or if it is a circular arc segment. If it is a circular arc segment, the line segment from the beginning of the arc to the endpoint is added to the polygon, and the excess area of the circular arc segment itself can be calculated easily (https://en.wikipedia.org/wiki/Circular_segment)<br />
<br />
*If the curve is a Bezier curve, it can be approximated by a series of circular arcs. The algorithm used can be found here (http://itc.ktu.lt/itc354/Riskus354.pdf). The algorithm recursively subdivides the Bezier until it is approximated to tolerance by a biarc and uses the curvature value of the Bezier at a point to determine the depth of subdivision. Then each circular arc in the approximation of the Bezier curve is treated as above.<br />
<br />
Finally, the area of the polygon can be efficiently calculated using Green's Theorem (http://www.softsurfer.com/Archive/algorithm_0101/algorithm_0101.htm#3D%20Standard%20Formula) using cross products.<br />
<br />
==== Cliff Yapp: NURBS Ray Tracing in BRL-CAD ====<br />
<br />
Over the past year, an intense development effort by BRL-CAD's development team has successfully implemented raytracing of Non-Uniform Rational BSpline (NURBS) geometry within the BRL-CAD Computer-Aided Design (CAD) package. NURBS surfaces are very general, very complex mathematical shapes used by virtually all modern commercial CAD software packages. Because BRL-CAD did not originally support this type of geometry, commercial models could only be imported into BRL-CAD after a labor-intensive and difficult conversion process from NURBS form to triangle-base geometry (referred to in BRL-CAD as Bags-of-Triangles or BoTs). The new NURBS raytracing capability builds on work by many developers over a period of years, who in turn built on the open source library OpenNURBS. Support for this primitive type means BRL-CAD can now store and raytrace data from commercial models without requiring preliminary conversion to another type of geometry.<br />
<br />
The last major feature needed to make import of commercial models in BRL-CAD straightforward is conversion support for ISO’s "Standard for the Exchange of Product model data" or STEP file format. STEP uses NURBS geometry in its definition, making support for NURBS geometry a necessary prelude to support for STEP import. Most commercial CAD modelers support this file format as an output option, hence STEP support in BRL-CAD would allow a direct path for moving geometric descriptions from a variety of commercial modelers to BRL-CAD. Considerable progress has already been made on STEP import support, but more work is need to bring the code and feature set to "production quality". If anyone would like to join the BRL-CAD open source development effort and has a little familiarity with C++, the step-g converter and its supporting libraries have some simple-yet-useful tasks that would be an excellent and very useful way to explore the project - join BRL-CAD's IRC channel or development email list if you are interested!<br />
<br />
==== Erik Greenwald: Bolting ADRT's libtie under the hood ====<br />
<br />
[[Image:BoTvsTie.png|right|thumb|256px|BoT vs Tie pixdiff]]<br />
<br />
Initial progress on the integration of ADRT's libtie "triangle intersection engine" with LIBRT.<br />
<br />
----<br />
<br />
== Idea Hopper ==<br />
These are ideas for interesting or useful publications. We need someone to at least write a draft.<br />
<br />
==== BRL-CAD's Evolutionary API ====<br />
<br />
Talk about BRL-CAD deprecation process.<br />
<br />
==== Introduction to new .deb and .rpm builds ====<br />
<br />
Brief article overviewing the efforts by jordisayol for Debian, Ubuntu, Fedora, and openSUSE. Included are new icons, menu items, mime type associations, and more.<br />
<br />
==== 2010 End Of Year Review ====<br />
<br />
Article giving an overview of the past year's highlight developments with hints at what 2011 may bring. Alternatively, may be the annual statistics review if we switch from fiscal to calendar year reporting.<br />
<br />
==== Erik Greenwald: ADRT/ISST Visualization ====<br />
<br />
Article introducing ADRT/ISST core capability.<br />
<br />
==== Bob Parker: Alpha Archer: Working Towards Next Generation MGED ====<br />
<br />
Article introducing Archer's core new features that will be "coming" to MGED. Undo, interactive editing, tree view, and info panels come to mind.<br />
<br />
==== Finding the Hot Spots ====<br />
<br />
Article on the rt lighting model Stephen Kennedy developed that visualizes the time spent per-pixel.<br />
<br />
==== Point Clouds ====<br />
<br />
Article introducing the new point cloud primitive.<br />
<br />
==== bn_mat_inv: singular matrix ====<br />
<br />
Article on the v4 format and binary compatibility.<br />
<br />
==== Model Showcase: Goliath ====<br />
<br />
Article talking about the making of the Goliath model.<br />
<br />
==== Model Showcase: Chumaciera ====<br />
<br />
Article on Pedro Baptista's bearing model.<br />
<br />
==== Model Showcase: Proyecto Catapulta ====<br />
<br />
Article on a model developed by André Santos, António Almeida, and Pedro Ferreira.<br />
<br />
==== Model Showcase: Union Coupling Tool ====<br />
<br />
Article on a model developed by Inês de Matos under teacher Luís Ferreira. The project focuses on a tool, union coupling, based on the book, http://purl.pt/14352 , page 122 of the original book and page 128 of the file, figures 108 and 109.<br />
<br />
==== Geometry Service FAQ ====<br />
<br />
FAQ summarization of the GS as it pertains to the wider open source community.<br />
<br />
==== BRL-CAD's 3rd Generation Build System ====<br />
<br />
Article on the new CMake build system.<br />
<br />
==== BRL-CAD's Open Source Vision ====<br />
<br />
Article introducing the Project Priorities diagram and overall project vision.<br />
<br />
==== BRL-CAD Primitives Showcase ====<br />
<br />
Article summarizing all of BRL-CAD's primitives and their current status.<br />
<br />
==== BRL-CAD Geometry Converter Showcase ====<br />
<br />
Article summarizing all of BRL-CAD's geometry converters.<br />
<br />
==== Release Schedule ====<br />
<br />
Explain our release schedule and versioning system.<br />
<br />
==== RTGL ====<br />
<br />
Article on Nick's point-based visualization mode.<br />
<br />
==== BRL-CAD Quick Reference Card ====<br />
<br />
Article on a BRL-CAD QRC similar to the existing MGED QRC.<br />
<br />
==== BRL-CAD Bibliography ====<br />
<br />
After the .bib gets published to the website, an article announcing it and soliciting additions.<br />
<br />
==== Revolve Primitive ====<br />
<br />
Article on Timothy Van Ruitenbeek's work implementing 'revolve'.<br />
<br />
==== Parametrics and Constraints ====<br />
<br />
Article on Dawn Thomas' work to integrate parametric equation and constraint evaluation support.<br />
<br />
==== Converting Implicit to Explicit: CSG to BREP NURBS ====<br />
<br />
Article on the work by Cliff Yapp, Joe Doliner, and Ben Poole converting primitives with an implicit representation into an explicit NURBS representation.<br />
<br />
==== Online Model Repository ====<br />
<br />
Article on Elena Băutu's work developing the model repository website.<br />
<br />
==== Project Statistics for 2010 ====<br />
<br />
Article on our current stats similar to previous years.<br />
<br />
==== Next Generation BRL-CAD ====<br />
<br />
Article on our super secret awesome new GUI.</div>Ksuzeehttps://brlcad.org/w/index.php?title=Community_Publication_Portal&diff=4587Community Publication Portal2012-11-15T04:34:50Z<p>Ksuzee: /* Ksenija Slivko: Reducing Code */</p>
<hr />
<div>Welcome to the BRL-CAD community publication portal. This page is dedicated to the preparation and editing of BRL-CAD announcements. Proposed and upcoming topics are listed. Anyone is '''welcome and encouraged''' to share news about any activity related to BRL-CAD. Community editing and review are encouraged.<br />
<br />
__TOC__<br />
<br />
'''Formatting & Editing Standards:'''<br />
<br />
* Quotations are italicized and placed between double quotes ('' "Like This" '').<br />
<br />
* AA (All Acronyms) need to be defined upon first use, don't abbrev. words.<br />
<br />
* Section headings uppercase the major words and are in bold ('''Like This''')<br />
<br />
* Use the serial comma: one, two, and three; not one, two and three.<br />
<br />
* Cite references, include hyperlinks.<br />
<br />
* Keep it brief.<br />
<br />
'''Distribution Channels:'''<br />
<br />
For release publications, follow [http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/HACKING HACKING]. For everything else, distribute to the following:<br />
<br />
* brlcad-news@lists.sourceforge.net<br />
* http://brlcad.org/d/node/add/story<br />
* https://sourceforge.net/news/?group_id=105292<br />
* (optional) https://brlcad.org/wiki/<br />
* (optional) http://www.tenlinks.com/NEWS/tl_daily/submit_news.htm<br />
* (optional) http://upfrontezine.com<br />
<br />
----<br />
----<br />
<br />
== Ready for Publication ==<br />
These articles are ready for publication. Release notes should be posted after tarballs, ideally the last or first week of a month. Other publications should be scheduled one or two weeks later, ideally on the second or third week of the month.<br />
<br />
Note: if you see a comment indicating that a section is FROZEN, any changes you make in that section may go unnoticed as the article is being prepared for distribution. If you find errors in a FROZEN article, go ahead and correct the article but contact Sean (brlcad on freenode [[IRC]]) who may be able to incorporate changes during final publication.<br />
<br />
==== Move from Final Review to Here When Ready====<br />
<br />
<br />
----<br />
<br />
== Final Editorial Review ==<br />
These should be "complete" articles. The author is done. All that remains is a structure, grammar, voice, punctuation, and spelling review. Images welcome.<br />
<br />
==== Kyle Bodt: Ronja ====<br />
<br />
http://brlcad.org/wiki/Ronja<br />
<br />
Ronja (Reasonable Optical Near Joint Access) is an innovative piece of equipment that utilizes reliable optical data links to create a current communication range of 1.4 km and a speed of 10Mbps full duplex that can be used as a general purpose wireless link for virtually any networking project. This is a very important project for Twibright Labs, a small group of computer science graduate students operating out of Charles University in Prague in the Czech Republic. The group specializes in the usage of Free Software and User Controlled Technology Development.<br />
<br />
The primary output for the Ronja project is a design. The lab does not intend to manufacture and sell the hardware that is being designed but wants to engage in open source development of the technology. The philosophy surrounding User Controlled Technology is the ideal that the end-user is provided with unrestricted access to the intellectual property surrounding the technology, including the tools that are being used to create it. One tool playing an integral part in the development of the Ronja designs is BRL-CAD. All of the models that Twibright labs use to display the different variants of their Ronja concept were created with the help of BRL-CAD. BRL-CAD has allowed the members of Twibright labs to create instructional diagrams so that the users and builders of their open source technology will be able to have the latest information with regard to the proper construction of a Ronja unit. The interactive geometry editor and ray-tracers in BRL-CAD are an integral part in the communication of design plans for Twibright labs and enables them to connect with the users, who are the driving force behind the User Controlled Technology ideal.<br />
<br />
----<br />
<br />
== Initial Drafts ==<br />
These are incomplete articles being worked on. Short 250 to 500-word articles (not counting tables, images, etc) are usually perfect.<br />
<br />
==== Anurag Murty: Voxelizing Geometry ====<br />
Given a set of primitives as input, the voxelize command uses the data obtained from BRL-CAD's raytracer to represent the input in the form of voxels(Volumetric Picture Elements). A uniform grid of rays is uniformly shot on the given input and an approximation of the volume filled in each voxel region is made from the raytracing data. Depending on the approximate volume of the voxel filled, a voxel is classified as IN or OUT of the voxelized output. The voxels are represented as RPPs. <br />
Such voxelized outputs have applications in Volumetric rendering and finite element analysis.<br />
<br />
SYNTAX : <br />
voxelize [-s "dx dy dz"] [-d n] [-t f] new_obj old_obj [old_obj2 old_obj3 ...]<br />
<br />
ARGUMENTS-<br />
<br />
-d - Specifies the level of detail(precision in approximation of volume) required. An input of n means that n * n rays will be shot through each row, and an approximation of volume filled is reached averaging these n * n values<br />
<br />
-s - Specifies the voxel size in each direction. <br />
<br />
-t - Specifies the threshold volume to decide if voxel is to be included in the voxelized output. <br />
<br />
new_obj - Name for resultant primitive that is a region containing the resulting voxels. <br />
<br />
old_obj - Name of source primitive or collection.<br />
<br />
<br />
NOTES- <br />
<br />
1. A greater level of detail usually implies a much better approximation of fill volumes at the cost of more computations.<br />
<br />
2. Lesser voxel sizes give a more precise representation of the input at the cost of more memory requirements.<br />
<br />
3. Threshold value (the argument of -t) should be a value between 0 and 1, and not a percentage.<br />
<br />
==== Cristina Precup: Visualizing Directed Acyclic Graphs ====<br />
'''Visualizing Constructive Solid Geometry''' is a project meant to illustrate in an intuitive and interactive manner the hierarchical structure of .g geometry databases.<br />
<br />
For the representation of the hierarchies, the '''Adaptagrams''' graph library has been used. This made possible organizing the objects contained within the database into directed acyclic graphs.<br />
<br />
Following, are the steps that have been taken in developing the graph layout API:<br />
<br />
* Integrate the Adaptagrams library into BRL-CAD.<br />
* Traverse the geometry database and distinguish different types of objects (''primitive'', ''combination'', ''non-geometry'') within it, as well as, establish the operations between them (''union'', ''difference'', ...). Add all this data to the graph structure constructed with Adaptagrams.<br />
* Display the objects using a Tk Canvas widget inside a window.<br />
* Develop a ''decorative routine'' that sets different colors for different types of objects, correspondingly.<br />
* Create a name label for each represented object.<br />
* Develop a layout algorithm that aligns the nodes of the graph in a hierarchical way.<br />
* Introduce the '''graph''' command in both '''MGED''' and '''Archer'''. It has two subcommands:<br />
** '''show''' which displays a list with the name and type of the objects along with the nodes' and edges' positions;<br />
** '''positions''' that lists the names, types and positions of the corresponding nodes within the graph;<br />
* Introduce the '''igraph''' command in both MGED and Archer. This command pops up a graph based visualization window of the currently opened .g database. Its documentation can be found in ''brlman''.<br />
<br />
As an example, here is how the graph for the ''share/db/axis.g'' database looks like now:<br />
:[[Image:Graph_editor_v2.png]]<br />
<br />
Further work that can extend the ''interactive'' trait of the graph layout API includes adding user actions upon the graph such as ''move'' (dragging a node) or ''delete'' functionalities.<br />
<br />
==== Ksenija Slivko: Reducing Code ====<br />
<br />
===== Abstract =====<br />
The main aim of this project was to decrease the number of lines of code in the project. Since the project is being developing for quite a long time there were many "copy-pastes". They were redacted. <br />
<br />
===== The process of developing =====<br />
Coding period can be divided into three parts:<br />
* reduction in the single files<br />
* reduction in different files in the single program or library<br />
* reduction in different libraries<br />
<br />
===== Improving ======<br />
Since the project is quite large the redaction can be continued<br />
<br />
==== Laijiren: NURBS Tessellation: What, Why, How? ====<br />
<br />
==== Suryajith Chillara: Benchmark Performance Database ====<br />
===== Abstract =====<br />
The main idea is to store the data both in the database and the log files stored in the archive. The storage in the database enables the content to be searched via the parameters such as machine descriptions, versions, results and could be compared. The storage as a file in the archive is to maintain a back up of the file and whenever a developer needs a specific bunch of benchmark logs, he could get them from the archive with or without the help of the database.<br />
<br />
===== Main Components =====<br />
* '''Log Parser :''' The data of the log file needs to be parsed and the relevant and important information has to be logged in the database so as to make the data access for the graphic display through the frontend could be made possible. <br />
* '''Web API :''' Implemented via the bottle framework so as to submit the logs from the brlcad installation via scripts.<br />
* '''Web backend :''' A backend has been implemented as a MVC framework from scratch using the python bottle framework. <br />
* '''Frontend :''' The website that can offer multiple mechanisms for adding new performance run data into the database and provide multiple graphical and non-graphical visualizations of aggregate performance data (i.e., graphs, charts, tables, etc). Graphs, tables and charts are generated with the help of Google Charts via wrapper which generates the javascript code to interact with the Google Charts service.<br />
[[Image:Absavgperfvsimagescomb.png]]<br />
<br />
<br />
Plumbing between these components is via the python scripts. <br />
<br />
<br />
===== Tool & Service dependancies =====<br />
* Python 2.7 and libraries<br />
* Bottle web framework<br />
* MySQL<br />
* Google Charts<br />
<br />
==== Wu Jianbang: NURBS surface-surface intersections ====<br />
I focused on the "NURBS surface-surface intersections" project after the mid-term evaluation of this year's GSoC, before which I worked on converting implicit primitives to NURBS B-rep forms.<br />
<br />
The function calculating NURBS surface-surface intersection curves is surface_surface_intersection() which is declared in include/nurbs.h and implemented in src/libnurbs/opennurbs_ext.cpp. It outputs intersection curves in 3d space and in both surfaces' UV parameter spaces.<br />
<br />
The approach of the algorithm originates from:<br />
<br />
Adarsh Krishnamurthy, Rahul Khardekar, Sara McMains, Kirk Haller, and Gershon Elber. 2008. Performing efficient NURBS modeling operations on the GPU. In Proceedings of the 2008 ACM symposium on Solid and physical modeling (SPM '08). ACM, New York, NY, USA, 257-268. DOI=10.1145/1364901.1364937 http://doi.acm.org/10.1145/1364901.1364937<br />
<br />
It can be divided into several steps:<br />
<br />
* Generate the bounding box of the two surfaces.<br />
* If their bounding boxes intersect:<br />
** Split the two surfaces, both into four parts, and calculate the sub-surfaces' bounding boxes<br />
** Calculate the intersection of sub-surfaces' bboxes, if they do intersect, go deeper with splitting surfaces and smaller bboxes, otherwise trace back.<br />
* After getting the intersecting bboxes, approximate the surface inside the bbox with two triangles, and calculate the intersection points of the triangles (both in 3d space and two surfaces' UV space)<br />
* Fit the intersection points into polyline curves, and then to NURBS curves. Points with distance less than max_dis are considered in one curve.<br />
<br />
It needs to be mentioned here that the value max_dis can be provided by the user or generated automatically.<br />
<br />
Besides, after calculating the intersection curves, the next steps towords evaluated NURBS are splitting the surfaces into sub-surfaces with the intersection curves as their boundaries, and some inside-outside tests to decide which sub-surfaces should be included in the final object. Some work on splitting has been done, generating some b-rep faces that can pass IsValid(), but still further work is needed.<br />
<br />
==== Andrei Popescu: Network Performance Testing ====<br />
<br />
The project that I have been working on during the summer, as part of the Google Summer of Code program,<br> can be broken down into three independent parts and it consisted in running various tests for the BRL-CAD<br> networking library(Libpkg) .<br />
<br />
*Speed testing and investigations to uncover any potential performance bottleneck.<br />
*Unit tests and code review to find and cover any untreated exceptions(crashes) in the Libpkg library.<br />
*Eliminate the assumption of globals in the API.<br />
<br />
For the first part, I have run two types of tests : <br><br />
<br />
Local ones, both the "sender" and the "receiver" were located on localhost.<br />
The script gathered data<br> regarding the transmission speed for each set of package sizes (Here, package refers to the package <br>created by networking library, not networking packages) respectively file sizes.<br />
<br />
Remote ones, where the "sender" and the "receiver" were on separate machines, connected using SSH.<br> The script ran and the data gathered was done in the same way as the localhost one.Using the data <br> obtained from the tests, two 3D graphs were drawn.However, the tests were inconclusive, I could not find<br> an "ideal" package size to use regardless of file size.<br />
<br />
After Mid-term I focused mostly on second part. I used test units from libbu(Utility library) as an example<br> for the unit test type and design.<br />
When the mentioned tests were run, several exceptions that caused<br> crashes were discovered. Lastly, I have written fixes for the discovered crashes.<br />
<br />
The third part of the project has not been covered yet, so more work is needed.Although, I am doing my<br> best to finish it in the following weeks.<br />
<br />
==== Chris Dueck: Calculating 2D Sketch Surface Area ====<br />
<br />
Calculating the surface area of a 2D Sketch primitive is not a trivial task. Sketches are created interactively by the user, and can contain straight line segments, circular arc segments (and full circles), as well as Bezier and NURBS curves.<br />
<br />
The method used to approximately compute the area of a 2D sketch is as follows:<br />
<br />
*1.) Approximate the sketch by a polygon<br />
*2.) Compute the area of the polygon exactly using Green's Theorem<br />
*3.) Add the areas of any circular arc segments that were created during (1)<br />
<br />
To approximate the sketch by a polygon, each possible curve type of a sketch must be considered.<br />
<br />
*If the curve is a straight line, it need not be approximated.<br />
<br />
*If the curve is a circular arc, it must be determined if it is a full circle (in which case its area can be computed easily) or if it is a circular arc segment. If it is a circular arc segment, the line segment from the beginning of the arc to the endpoint is added to the polygon, and the excess area of the circular arc segment itself can be calculated easily (https://en.wikipedia.org/wiki/Circular_segment)<br />
<br />
*If the curve is a Bezier curve, it can be approximated by a series of circular arcs. The algorithm used can be found here (http://itc.ktu.lt/itc354/Riskus354.pdf). The algorithm recursively subdivides the Bezier until it is approximated to tolerance by a biarc and uses the curvature value of the Bezier at a point to determine the depth of subdivision. Then each circular arc in the approximation of the Bezier curve is treated as above.<br />
<br />
Finally, the area of the polygon can be efficiently calculated using Green's Theorem (http://www.softsurfer.com/Archive/algorithm_0101/algorithm_0101.htm#3D%20Standard%20Formula) using cross products.<br />
<br />
==== Cliff Yapp: NURBS Ray Tracing in BRL-CAD ====<br />
<br />
Over the past year, an intense development effort by BRL-CAD's development team has successfully implemented raytracing of Non-Uniform Rational BSpline (NURBS) geometry within the BRL-CAD Computer-Aided Design (CAD) package. NURBS surfaces are very general, very complex mathematical shapes used by virtually all modern commercial CAD software packages. Because BRL-CAD did not originally support this type of geometry, commercial models could only be imported into BRL-CAD after a labor-intensive and difficult conversion process from NURBS form to triangle-base geometry (referred to in BRL-CAD as Bags-of-Triangles or BoTs). The new NURBS raytracing capability builds on work by many developers over a period of years, who in turn built on the open source library OpenNURBS. Support for this primitive type means BRL-CAD can now store and raytrace data from commercial models without requiring preliminary conversion to another type of geometry.<br />
<br />
The last major feature needed to make import of commercial models in BRL-CAD straightforward is conversion support for ISO’s "Standard for the Exchange of Product model data" or STEP file format. STEP uses NURBS geometry in its definition, making support for NURBS geometry a necessary prelude to support for STEP import. Most commercial CAD modelers support this file format as an output option, hence STEP support in BRL-CAD would allow a direct path for moving geometric descriptions from a variety of commercial modelers to BRL-CAD. Considerable progress has already been made on STEP import support, but more work is need to bring the code and feature set to "production quality". If anyone would like to join the BRL-CAD open source development effort and has a little familiarity with C++, the step-g converter and its supporting libraries have some simple-yet-useful tasks that would be an excellent and very useful way to explore the project - join BRL-CAD's IRC channel or development email list if you are interested!<br />
<br />
==== Erik Greenwald: Bolting ADRT's libtie under the hood ====<br />
<br />
[[Image:BoTvsTie.png|right|thumb|256px|BoT vs Tie pixdiff]]<br />
<br />
Initial progress on the integration of ADRT's libtie "triangle intersection engine" with LIBRT.<br />
<br />
----<br />
<br />
== Idea Hopper ==<br />
These are ideas for interesting or useful publications. We need someone to at least write a draft.<br />
<br />
==== BRL-CAD's Evolutionary API ====<br />
<br />
Talk about BRL-CAD deprecation process.<br />
<br />
==== Introduction to new .deb and .rpm builds ====<br />
<br />
Brief article overviewing the efforts by jordisayol for Debian, Ubuntu, Fedora, and openSUSE. Included are new icons, menu items, mime type associations, and more.<br />
<br />
==== 2010 End Of Year Review ====<br />
<br />
Article giving an overview of the past year's highlight developments with hints at what 2011 may bring. Alternatively, may be the annual statistics review if we switch from fiscal to calendar year reporting.<br />
<br />
==== Erik Greenwald: ADRT/ISST Visualization ====<br />
<br />
Article introducing ADRT/ISST core capability.<br />
<br />
==== Bob Parker: Alpha Archer: Working Towards Next Generation MGED ====<br />
<br />
Article introducing Archer's core new features that will be "coming" to MGED. Undo, interactive editing, tree view, and info panels come to mind.<br />
<br />
==== Finding the Hot Spots ====<br />
<br />
Article on the rt lighting model Stephen Kennedy developed that visualizes the time spent per-pixel.<br />
<br />
==== Point Clouds ====<br />
<br />
Article introducing the new point cloud primitive.<br />
<br />
==== bn_mat_inv: singular matrix ====<br />
<br />
Article on the v4 format and binary compatibility.<br />
<br />
==== Model Showcase: Goliath ====<br />
<br />
Article talking about the making of the Goliath model.<br />
<br />
==== Model Showcase: Chumaciera ====<br />
<br />
Article on Pedro Baptista's bearing model.<br />
<br />
==== Model Showcase: Proyecto Catapulta ====<br />
<br />
Article on a model developed by André Santos, António Almeida, and Pedro Ferreira.<br />
<br />
==== Model Showcase: Union Coupling Tool ====<br />
<br />
Article on a model developed by Inês de Matos under teacher Luís Ferreira. The project focuses on a tool, union coupling, based on the book, http://purl.pt/14352 , page 122 of the original book and page 128 of the file, figures 108 and 109.<br />
<br />
==== Geometry Service FAQ ====<br />
<br />
FAQ summarization of the GS as it pertains to the wider open source community.<br />
<br />
==== BRL-CAD's 3rd Generation Build System ====<br />
<br />
Article on the new CMake build system.<br />
<br />
==== BRL-CAD's Open Source Vision ====<br />
<br />
Article introducing the Project Priorities diagram and overall project vision.<br />
<br />
==== BRL-CAD Primitives Showcase ====<br />
<br />
Article summarizing all of BRL-CAD's primitives and their current status.<br />
<br />
==== BRL-CAD Geometry Converter Showcase ====<br />
<br />
Article summarizing all of BRL-CAD's geometry converters.<br />
<br />
==== Release Schedule ====<br />
<br />
Explain our release schedule and versioning system.<br />
<br />
==== RTGL ====<br />
<br />
Article on Nick's point-based visualization mode.<br />
<br />
==== BRL-CAD Quick Reference Card ====<br />
<br />
Article on a BRL-CAD QRC similar to the existing MGED QRC.<br />
<br />
==== BRL-CAD Bibliography ====<br />
<br />
After the .bib gets published to the website, an article announcing it and soliciting additions.<br />
<br />
==== Revolve Primitive ====<br />
<br />
Article on Timothy Van Ruitenbeek's work implementing 'revolve'.<br />
<br />
==== Parametrics and Constraints ====<br />
<br />
Article on Dawn Thomas' work to integrate parametric equation and constraint evaluation support.<br />
<br />
==== Converting Implicit to Explicit: CSG to BREP NURBS ====<br />
<br />
Article on the work by Cliff Yapp, Joe Doliner, and Ben Poole converting primitives with an implicit representation into an explicit NURBS representation.<br />
<br />
==== Online Model Repository ====<br />
<br />
Article on Elena Băutu's work developing the model repository website.<br />
<br />
==== Project Statistics for 2010 ====<br />
<br />
Article on our current stats similar to previous years.<br />
<br />
==== Next Generation BRL-CAD ====<br />
<br />
Article on our super secret awesome new GUI.</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4363User:Ksuzee/Reports2012-08-19T22:43:00Z<p>Ksuzee: /* 13 week */</p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**checking other patches<br />
*29/07<br />
**updated two patches for src/sig<br />
**updated two patches for src/utils<br />
**added comments for patches on patches tracker where it was necessary<br />
<br />
== 11 week ==<br />
*30/07<br />
**fixed error at patch for src/libdm<br />
**reducted patch for fb/pl-fb.c<br />
**added some screenshots for patches<br />
*31/07<br />
**continue working with clip.c.in libbn<br />
*1/08<br />
**some work on previous patches<br />
*2-3/08<br />
**clip.c.in libbn is ready. Now there're 3 functions, commmon for libdm and libged<br />
<br />
== 12 week ==<br />
*6/08<br />
**made one more reduction in libbn. Now there're files track_reg.c and track_reg.h. They have common funtions for libged/track.c and libwdb/reg.c<br />
*8/08<br />
**refactoring in libicv and util. The same as previous<br />
*9/08<br />
**refactoring in fb and libfb. Tha same as previous<br />
*10/08<br />
**some more reductions in previous situations for good patches. Almost everything I supposed to do during GSoC is ready<br />
*12/08<br />
**added 2 more prepared patches<br />
<br />
== 13 week ==<br />
<br />
*work on cleaning and reviewing the patches</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4315User:Ksuzee/Reports2012-08-13T12:55:19Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**checking other patches<br />
*29/07<br />
**updated two patches for src/sig<br />
**updated two patches for src/utils<br />
**added comments for patches on patches tracker where it was necessary<br />
<br />
== 11 week ==<br />
*30/07<br />
**fixed error at patch for src/libdm<br />
**reducted patch for fb/pl-fb.c<br />
**added some screenshots for patches<br />
*31/07<br />
**continue working with clip.c.in libbn<br />
*1/08<br />
**some work on previous patches<br />
*2-3/08<br />
**clip.c.in libbn is ready. Now there're 3 functions, commmon for libdm and libged<br />
<br />
== 12 week ==<br />
*6/08<br />
**made one more reduction in libbn. Now there're files track_reg.c and track_reg.h. They have common funtions for libged/track.c and libwdb/reg.c<br />
*8/08<br />
**refactoring in libicv and util. The same as previous<br />
*9/08<br />
**refactoring in fb and libfb. Tha same as previous<br />
*10/08<br />
**some more reductions in previous situations for good patches. Almost everything I supposed to do during GSoC is ready<br />
*12/08<br />
**added 2 more prepared patches<br />
<br />
== 13 week ==</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4307User:Ksuzee/Reports2012-08-10T18:10:23Z<p>Ksuzee: /* 12 week */</p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**checking other patches<br />
*29/07<br />
**updated two patches for src/sig<br />
**updated two patches for src/utils<br />
**added comments for patches on patches tracker where it was necessary<br />
<br />
== 11 week ==<br />
*30/07<br />
**fixed error at patch for src/libdm<br />
**reducted patch for fb/pl-fb.c<br />
**added some screenshots for patches<br />
*31/07<br />
**continue working with clip.c.in libbn<br />
*1/08<br />
**some work on previous patches<br />
*2-3/08<br />
**clip.c.in libbn is ready. Now there're 3 functions, commmon for libdm and libged<br />
<br />
== 12 week ==<br />
*6/08<br />
**made one more reduction in libbn. Now there're files track_reg.c and track_reg.h. They have common funtions for libged/track.c and libwdb/reg.c<br />
*8/08<br />
**refactoring in libicv and util. The same as previous<br />
*9/08<br />
**refactoring in fb and libfb. Tha same as previous<br />
*10/08<br />
**some more reductions in previous situations for good patches. Almost everything I supposed to do during GSoC is ready</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4283User:Ksuzee/Reports2012-08-06T20:58:30Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**checking other patches<br />
*29/07<br />
**updated two patches for src/sig<br />
**updated two patches for src/utils<br />
**added comments for patches on patches tracker where it was necessary<br />
<br />
== 11 week ==<br />
*30/07<br />
**fixed error at patch for src/libdm<br />
**reducted patch for fb/pl-fb.c<br />
**added some screenshots for patches<br />
*31/07<br />
**continue working with clip.c.in libbn<br />
*1/08<br />
**some work on previous patches<br />
*2-3/08<br />
**clip.c.in libbn is ready. Now there're 3 functions, commmon for libdm and libged<br />
<br />
== 12 week ==<br />
*6/08<br />
**made one more reduction in libbn. Now there're files track_reg.c and track_reg.h. They have common funtions for libged/track.c and libwdb/reg.c</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4263User:Ksuzee/Reports2012-08-01T12:52:53Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**checking other patches<br />
*29/07<br />
**updated two patches for src/sig<br />
**updated two patches for src/utils<br />
**added comments for patches on patches tracker where it was necessary<br />
<br />
== 11 week ==<br />
*30/07<br />
**fixed error at patch for src/libdm<br />
**reducted patch for fb/pl-fb.c<br />
**added some screenshots for patches<br />
*31/07<br />
**continue working with clip.c.in libbn</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4260User:Ksuzee/Reports2012-07-31T22:06:28Z<p>Ksuzee: /* 11 week */</p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**checking other patches<br />
*29/07<br />
**updated two patches for src/sig<br />
**updated two patches for src/utils<br />
**added comments for patches on patches tracker where it was necessary<br />
<br />
== 11 week ==<br />
*30/07<br />
**fixed error at patch for src/libdm<br />
**reducted patch for fb/pl-fb.c<br />
**added some screenshots for patches<br />
*31/07<br />
**working with clip.c.in libbn</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4256User:Ksuzee/Reports2012-07-30T21:30:50Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**checking other patches<br />
*29/07<br />
**updated two patches for src/sig<br />
**updated two patches for src/utils<br />
**added comments for patches on patches tracker where it was necessary<br />
<br />
== 11 week ==<br />
*30/07<br />
**fixed error at patch for src/libdm<br />
**reducted patch for fb/pl-fb.c<br />
**added some screenshots for patches</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4255User:Ksuzee/Reports2012-07-30T21:14:47Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**checking other patches<br />
*29/07<br />
**updated two patches for src/sig<br />
**updated two patches for src/utils<br />
**added comments for patches on patches tracker where it was necessary<br />
<br />
== 11 week ==<br />
*30/07<br />
**fixed error at patch for src/libdm</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4251User:Ksuzee/Reports2012-07-29T18:09:58Z<p>Ksuzee: /* 10 week */</p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**checking other patches<br />
*29/07<br />
**updated two patches for src/sig<br />
**updated two patches for src/utils<br />
**added comments for patches on patches tracker where it was necessary</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4250User:Ksuzee/Reports2012-07-29T07:52:04Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduct code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**cheсking other patches</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4247User:Ksuzee/Reports2012-07-28T22:37:24Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduction code in different folders<br />
*28/07<br />
**updated patch for src/fb/pl-fb.c<br />
**updated patches for src/libdm<br />
**closed unnecessary patch for src/libdm<br />
**cheking other patches</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4244User:Ksuzee/Reports2012-07-27T20:49:47Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c<br />
*27/07<br />
**found several editing methods for duplicate code in different folders<br />
**trying to reduction code in different folders</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4239User:Ksuzee/Reports2012-07-26T18:15:02Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv<br />
**added patch for src/librt/primitives/nmg/nmg_rt_segs.c</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4238User:Ksuzee/Reports2012-07-26T17:25:16Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==<br />
*26/07<br />
**updated patches for src/conv</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4224User:Ksuzee/Reports2012-07-24T14:05:47Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
**working on headers from some previous patches<br />
*18/07 <br />
**updated patches for src/util<br />
*21-22/07<br />
**updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4219User:Ksuzee/Reports2012-07-23T10:02:44Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
*working on headers from some previous patches<br />
*18/07 <br />
*updated patches for src/util<br />
*21-22/07<br />
*updated patches for other duplications in 1 directiory - different files<br />
<br />
== 10 week ==</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4182User:Ksuzee/Reports2012-07-16T11:52:49Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
<br />
During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
*working on headers from some previous patches</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4181User:Ksuzee/Reports2012-07-16T11:52:17Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files<br />
*14/07 <br />
**spent some time reading HACKING file<br />
**During the first part of GSoC program I:<br />
<br />
1. Found, reducted (where it was possible) and patched all the duplications which are contained in ONE (the same) file<br />
<br />
2. Found, reducted (where it was possible) and patched all (except one) the duplications which are contained in different files, but in one directory. Usually I added 2 new files - util.c and util.h, which contained the duplicated code. I need to add some necessary comments to the new files.<br />
<br />
3. Created some small manual pages for some programs in src/sig. Will commit them after the getting commit access.<br />
<br />
4. Found all the duplications which are contained in different directories and have a full list of necessary reductions.<br />
<br />
== 9 week ==<br />
*16/07<br />
*working on headers from some previous patches</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4152User:Ksuzee/Reports2012-07-10T21:44:42Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop<br />
<br />
== 8 week ==<br />
*09-10/07<br />
**added patch for /liboptical/sh_camo.c<br />
**submitted my Student Midterm Evaluation<br />
**checked some previous patches<br />
**work on reduction in sig/umod.c and sig/imod.c. It must be the last reduction for 1 directiory - many files</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4064User:Ksuzee/Reports2012-07-06T12:36:33Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Erik). Will patch them in a few days because of some problems with my laptop</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4063User:Ksuzee/Reports2012-07-06T12:36:09Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit<br />
*05/06<br />
**did some reduction in <br />
/liboptical/sh_camo.c and /tclcad/tclcad_obj.c (thanks to ``Eric). Will patch them in a few days because of some problems with my laptop</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4053User:Ksuzee/Reports2012-07-04T21:00:50Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through left TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4052User:Ksuzee/Reports2012-07-04T21:00:13Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.<br />
<br />
== 7 week ==<br />
*02/06<br />
**worked with libged/ps.c and png.c but unsuccessful. They couldn't be reducted<br />
*03-04/06<br />
**looked through leaved TODOs. Tomorrow will finish it and reduct.<br />
TODO: to correct existing patches a bit</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4017User:Ksuzee/Reports2012-06-30T20:33:11Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them<br />
*30/06<br />
**all the duplicaions in differesnt foldres are checked. There're about 35 such situations. Some of them are a bit disputed and needed to be discussed.</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4003User:Ksuzee/Reports2012-06-29T14:13:12Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folders. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=4002User:Ksuzee/Reports2012-06-29T14:12:36Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d<br />
*28-29/06<br />
**check duplications in different folder. Most dups've already been found. Hope to finish by tomorrow evening and make a whole report by them</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3984User:Ksuzee/Reports2012-06-27T09:08:26Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f<br />
*27/06<br />
**made man pages for src/sig: a-d, bw-d, d2-c, d-a, d-bw, d-u, f-d, u-bw, u-d</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3971User:Ksuzee/Reports2012-06-26T22:21:49Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done<br />
**made small man pages for src/sig: f-i, d-i, u-f, i-f</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3963User:Ksuzee/Reports2012-06-26T17:56:37Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23/06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==<br />
*25/06 <br />
**getting familiar with g-nff, g-obj, g-xxx_facets<br />
*26/06 <br />
**reduction in src/conv for g-nff, g-obj and g-xxx_facets is done</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3957User:Ksuzee/Reports2012-06-25T11:45:27Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished<br />
*23.06 <br />
**find a bit more in libdm, add it<br />
<br />
== 6 week ==</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3944User:Ksuzee/Reports2012-06-21T19:37:40Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish<br />
*21/06<br />
**reduction in libdm is finished</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3939User:Ksuzee/Reports2012-06-20T20:56:42Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c<br />
**reduction in libdm. There're quite enough dups, so need a bit more time to finish</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3934User:Ksuzee/Reports2012-06-20T12:30:51Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 functions're put in util.c</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3933User:Ksuzee/Reports2012-06-20T12:30:12Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added<br />
*19-20/06<br />
**reduction in libged/view_obj.c and ../vutil.c. 2 fuctions're put in util.c</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3924User:Ksuzee/Reports2012-06-18T21:06:04Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
**reduction in sig/d-i.c and ../f-i.c. Patch's added</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3923User:Ksuzee/Reports2012-06-18T21:05:40Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.<br />
<br />
== 5 week ==<br />
*18/06<br />
*reduction in sig/d-i.c and ../f-i.c. Patch's added</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3904User:Ksuzee/Reports2012-06-16T19:07:20Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
*14/06<br />
**/librt/primitives/nmg/nmg_rt_segs.c is refactored<br />
**some more checking<br />
*15/06<br />
**checking for copy-pastes in 1 dir - different files is completed! The count of such places -- 14, +2 are already patched<br />
*16/06<br />
**getting familiar with u-f.c, d-i.c etc. Understanding how they work.</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3887User:Ksuzee/Reports2012-06-13T19:08:55Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, <br />
**did some making and running of refactored functions to be sure in right result.<br />
<br />
TODO:/librt/primitives/nmg/nmg_rt_segs.c</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3886User:Ksuzee/Reports2012-06-13T19:08:13Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening<br />
*13/06 <br />
**sent all prepared patches, did some making and running of refactored functions to be sure in right result.<br />
<br />
TODO:/librt/primitives/nmg/nmg_rt_segs.c</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3875User:Ksuzee/Reports2012-06-12T08:33:52Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files<br />
*12/06<br />
**the same checking. Hope to finish it by today's evening</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3864User:Ksuzee/Reports2012-06-11T09:13:21Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful<br />
<br />
== 4 week ==<br />
*11/06<br />
**further checking for duplications in one directory, different files</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3859User:Ksuzee/Reports2012-06-09T19:58:58Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
<br />
*5/06 - cheking some more directories for duplications<br />
<br />
*6/06 - CMakeFiles and Makefile<br />
<br />
*7/06<br />
**patch for src/util - files util.c and util.h. <br />
**util_yuv is almost ready (something need to be checked)<br />
<br />
*8/06<br />
**working with util_yuv (ready)<br />
**come back to firt patch (ready *need to send patch)<br />
<br />
*9/06<br />
**/mged/cmd.c is refactored<br />
**work with /libtclcad/tclcadobj.c. Have some problems with functional type<br />
**/fb/pl-fb.c is refactored. Static inline function is added. Making and running are successful</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3854User:Ksuzee/Reports2012-06-09T11:08:33Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
***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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
***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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
*5/06 - cheking some more directories for duplications<br />
*6/06 - CMakeFiles and Makefile<br />
*7/06 - patch for src/util - files util.c and util.h. util_yuv is almost ready (something need to be checked)<br />
*8/06 - working with util_yuv and come back to firt patch (ready *need to send patch)<br />
*9/06 - /mged/cmd.c is refactored, work with /libtclcad/tclcadobj.c. Have some problems with functional type</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3834User:Ksuzee/Reports2012-06-07T22:09:30Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
***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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
***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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.<br />
<br />
== 3 week ==<br />
<br />
*4/06 - getting familiar with unit tests<br />
*5/06 - cheking some more directories for duplications<br />
*6/06 - CMakeFiles and Makefile<br />
*7/06 - patch for src/util - files util.c and util.h. util_yuv is almost ready (something need to be checked)</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3792User:Ksuzee/Reports2012-06-02T21:03:11Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
***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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
***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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.</div>Ksuzeehttps://brlcad.org/w/index.php?title=User:Ksuzee/Reports&diff=3791User:Ksuzee/Reports2012-06-02T20:59:54Z<p>Ksuzee: </p>
<hr />
<div>= GSoC 2012 = <br />
== 0 week ==<br />
*2/05/2012 - installing Ubuntu-12.04, XChat<br />
*4-5/05/2012 - downloading sources, successful building with CMake<br />
*8-9/05/2012 - making folder which contains the information about duplications in every folder of /trunk/src<br />
*12/05/2012 - csh script for finding duplications<br />
*15/05/2012 - patch r50549 for adrt/isst_tcltk.c<br />
*16-18/05/2012 - patches: <br />
**/fb/orle-fb.c<br />
**/util/picbackgnd.c<br />
**/libbu/htonf.c<br />
<br />
== 1 week ==<br />
<br />
**start fixing duplications, which are situated in different folders<br />
**patch /libbu/convert.c for check<br />
**patch /util/lowp.c for check <br />
**patch /rt/viewarea.c for check<br />
**getting familiar with Astyle<br />
<br />
Also I continue to check folders which contain duplications in one file.<br />
<br />
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<br />
<br />
== 2 week ==<br />
<br />
*28/05<br />
**correction to patches: /fb/orle-fb.c and /util/picbackgnd.c (testing)<br />
**working at duplications in /mged/points/process.c<br />
<br />
*29/05<br />
**there's a huge duplication in rt/worker.c. I'm working on it<br />
**checking some more directories (will write the result later)<br />
<br />
*30/05<br />
**checking some more directories (will write the result later)<br />
**leave worker.c for discuss (ready, but not tested yet)<br />
<br />
*31/05<br />
**correction the util/lowp.c patch<br />
**checking some more directories<br />
<br />
*1/06<br />
**all the directories are checked for duplications in one file<br />
<br />
*2/06<br />
**preparing the summary about duplications<br />
b/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.<br />
<br />
/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.<br />
<br />
/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[]<br />
<br />
/libtclcad/tclcadobj.c - <br />
***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:<br />
av[0] = "move_arb_face"; - to_mouse_move_arb_face<br />
av[0] = "move_arb_edge"; - to_mouse_move_arb_edge<br />
av[0] = "move_pipept"; - to_mouse_move_pipept<br />
<br />
and <br />
ret = ged_move_arb_edge(gedp, 5, (const char **)av);<br />
ret = ged_move_arb_face(gedp, 5, (const char **)av);<br />
ret = ged_move_pipept(gedp, 5, (const char **)av);<br />
<br />
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.<br />
***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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/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.<br />
<br />
/fbserv/server.c - void fb_server_fb_scursor and void fb_server_fb_cursor. Difference is:<br />
(void)pkg_plong(&rbuf[0], fb_cursor(fb_server_fbp, mode, x, y)); and <br />
(void)pkg_plong(&rbuf[0], fb_scursor(fb_server_fbp, mode, x, y));<br />
So common function can get just: struct pkg_conn *pcp, char *buf + functional type<br />
<br />
/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.</div>Ksuzee