This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software_carpentary2 [2011/06/20 05:37] madhumathi |
software_carpentary2 [2018/03/24 11:13] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
0) Create a simple project with three files: file1.c file2.c and main.c. Define func1() in file1.c and func2 in file2.c. Declare the func1() in file1.h and func2() in file2.h. Include file1.h and file2.h in main.c and call the two functions. Write a makefile for this project. Extra: Make changes in file1.h and file2.h in such a manner that including twice inside main.c will not give compilation errors. | 0) Create a simple project with three files: file1.c file2.c and main.c. Define func1() in file1.c and func2 in file2.c. Declare the func1() in file1.h and func2() in file2.h. Include file1.h and file2.h in main.c and call the two functions. Write a makefile for this project. Extra: Make changes in file1.h and file2.h in such a manner that including twice inside main.c will not give compilation errors. | ||
+ | |||
1) Download wget source code, compile and install it on the system | 1) Download wget source code, compile and install it on the system | ||
+ | |||
2) Understand what configure, automake and autoconf are for | 2) Understand what configure, automake and autoconf are for | ||
+ | |||
3) Download and compile the linux kernel | 3) Download and compile the linux kernel | ||
+ | |||
4) Understand phony targets inside a makefile | 4) Understand phony targets inside a makefile | ||
Line 11: | Line 15: | ||
- Browse for variables declarations and function declarations | - Browse for variables declarations and function declarations | ||
- Browse for variable and function usages | - Browse for variable and function usages | ||
+ | |||
6) Download, read and understand the source of a small and simple free software project as much as possible for some time (such as wget). | 6) Download, read and understand the source of a small and simple free software project as much as possible for some time (such as wget). | ||
+ | |||
7) Read the GNU coding standards document and try to analyze the importance of each guideline there. | 7) Read the GNU coding standards document and try to analyze the importance of each guideline there. | ||
Line 17: | Line 23: | ||
What does the following function do: | What does the following function do: | ||
- | int what_do_i_do(int a) | + | |
- | { | + | int what_do_i_do(int a) |
+ | { | ||
a = ((a & 0xAAAAAAAA) >> 1) + (a & 0x55555555); | a = ((a & 0xAAAAAAAA) >> 1) + (a & 0x55555555); | ||
a = ((a & 0xCCCCCCCC) >> 2) + (a & 0x33333333); | a = ((a & 0xCCCCCCCC) >> 2) + (a & 0x33333333); | ||
Line 25: | Line 32: | ||
a = ((a & 0xFFFF0000) >> 16) + (a & 0x0000FFFF); | a = ((a & 0xFFFF0000) >> 16) + (a & 0x0000FFFF); | ||
return a; | return a; | ||
- | } | + | } |