├── LICENSE ├── README.md └── book ├── AppPkg ├── AppPkg-2.4.inc ├── AppPkg.dec └── AppPkg.dsc ├── CppPkg ├── CppPkg.dec ├── Library │ ├── CppLib.cpp │ ├── CppLib.inf │ ├── CppMain.cpp │ ├── GcppCrt.cpp │ ├── UNewDelete.cpp │ ├── VcppCrt.cpp │ ├── crt0data.cpp │ └── newdelete.cpp ├── StdInclude │ ├── StdUefi.h │ ├── cpp.h │ └── stdfile.h └── test │ ├── testcpp.cpp │ └── testcpp.inf ├── Event ├── TestEvent.c └── TestEvent.inf ├── FileIo ├── FileIo.h ├── FileIo.inf └── TestFileIo.c ├── GUIPkg ├── GUIPkg.dec ├── GUIPkg.dsc ├── Include │ ├── UEvent.h │ ├── UGui.h │ ├── UGuiExt.h │ ├── bmp.h │ ├── fb.h │ └── fbext.h ├── Library │ ├── UGui.cpp │ ├── UGui.inf │ ├── UGuiExt.cpp │ ├── Util.cpp │ ├── bmp.cpp │ ├── fb.cpp │ ├── fbext.cpp │ └── shellfile.h └── test │ ├── testcpp.cpp │ ├── testcpp.inf │ ├── testgui.cpp │ └── testgui.inf ├── GUIbasics ├── String │ ├── example.c │ ├── example.inf │ └── example.uni └── font │ ├── Font │ ├── LaffStd.c │ ├── createdata.html │ ├── example.data │ ├── font.c │ ├── font.inf │ ├── main.c │ ├── make.IA32 │ └── make.x64 │ ├── SimpleFont │ ├── createdata.html │ ├── example.data │ ├── font.c │ ├── font.inf │ └── main.c │ ├── createdata.html │ ├── testFont │ ├── testfont.c │ ├── testfont.cpp │ └── testfont.inf │ └── testSimpleFont │ ├── make │ ├── testfont.c │ ├── testfont.cpp │ └── testfont.inf ├── GcppPkg ├── GcppPkg.dec ├── Include │ ├── algorithm │ ├── array │ ├── backward │ │ ├── auto_ptr.h │ │ ├── backward_warning.h │ │ ├── binders.h │ │ ├── hash_fun.h │ │ ├── hash_map │ │ ├── hash_set │ │ ├── hashtable.h │ │ └── strstream │ ├── bits │ │ ├── algorithmfwd.h │ │ ├── allocator.h │ │ ├── atomic_0.h │ │ ├── atomic_2.h │ │ ├── atomicfwd_c.h │ │ ├── atomicfwd_cxx.h │ │ ├── basic_ios.h │ │ ├── basic_ios.tcc │ │ ├── basic_string.h │ │ ├── basic_string.tcc │ │ ├── boost_concept_check.h │ │ ├── char_traits.h │ │ ├── cmath.tcc │ │ ├── codecvt.h │ │ ├── concept_check.h │ │ ├── cpp_type_traits.h │ │ ├── deque.tcc │ │ ├── forward_list.h │ │ ├── forward_list.tcc │ │ ├── fstream.tcc │ │ ├── functexcept.h │ │ ├── functional_hash.h │ │ ├── gslice.h │ │ ├── gslice_array.h │ │ ├── hashtable.h │ │ ├── indirect_array.h │ │ ├── ios_base.h │ │ ├── istream.tcc │ │ ├── list.tcc │ │ ├── locale_classes.h │ │ ├── locale_classes.tcc │ │ ├── locale_facets.h │ │ ├── locale_facets.tcc │ │ ├── locale_facets_nonio.h │ │ ├── locale_facets_nonio.tcc │ │ ├── localefwd.h │ │ ├── mask_array.h │ │ ├── move.h │ │ ├── ostream.tcc │ │ ├── ostream_insert.h │ │ ├── postypes.h │ │ ├── shared_ptr.h │ │ ├── slice_array.h │ │ ├── sstream.tcc │ │ ├── stl_algo.h │ │ ├── stl_algobase.h │ │ ├── stl_bvector.h │ │ ├── stl_construct.h │ │ ├── stl_deque.h │ │ ├── stl_function.h │ │ ├── stl_heap.h │ │ ├── stl_iterator.h │ │ ├── stl_iterator_base_funcs.h │ │ ├── stl_iterator_base_types.h │ │ ├── stl_list.h │ │ ├── stl_map.h │ │ ├── stl_multimap.h │ │ ├── stl_multiset.h │ │ ├── stl_numeric.h │ │ ├── stl_pair.h │ │ ├── stl_queue.h │ │ ├── stl_raw_storage_iter.h │ │ ├── stl_relops.h │ │ ├── stl_set.h │ │ ├── stl_stack.h │ │ ├── stl_tempbuf.h │ │ ├── stl_tree.h │ │ ├── stl_uninitialized.h │ │ ├── stl_vector.h │ │ ├── stream_iterator.h │ │ ├── streambuf.tcc │ │ ├── streambuf_iterator.h │ │ ├── stringfwd.h │ │ ├── unique_ptr.h │ │ ├── valarray_after.h │ │ ├── valarray_array.h │ │ ├── valarray_array.tcc │ │ ├── valarray_before.h │ │ └── vector.tcc │ ├── bitset │ ├── c++0x_warning.h │ ├── cassert │ ├── ccomplex │ ├── cctype │ ├── cerrno │ ├── cfenv │ ├── cfloat │ ├── chrono │ ├── cinttypes │ ├── ciso646 │ ├── climits │ ├── clocale │ ├── cmath │ ├── complex │ ├── complex.h │ ├── condition_variable │ ├── csetjmp │ ├── csignal │ ├── cstdarg │ ├── cstdatomic │ ├── cstdbool │ ├── cstddef │ ├── cstdint │ ├── cstdio │ ├── cstdlib │ ├── cstring │ ├── ctgmath │ ├── ctime │ ├── cwchar │ ├── cwctype │ ├── cxxabi-forced.h │ ├── cxxabi.h │ ├── debug │ │ ├── bitset │ │ ├── debug.h │ │ ├── deque │ │ ├── formatter.h │ │ ├── functions.h │ │ ├── list │ │ ├── macros.h │ │ ├── map │ │ ├── map.h │ │ ├── multimap.h │ │ ├── multiset.h │ │ ├── safe_base.h │ │ ├── safe_iterator.h │ │ ├── safe_iterator.tcc │ │ ├── safe_sequence.h │ │ ├── set │ │ ├── set.h │ │ ├── string │ │ ├── unordered_map │ │ ├── unordered_set │ │ └── vector │ ├── deque │ ├── exception │ ├── exception_defines.h │ ├── exception_ptr.h │ ├── ext │ │ ├── algorithm │ │ ├── array_allocator.h │ │ ├── atomicity.h │ │ ├── bitmap_allocator.h │ │ ├── cast.h │ │ ├── codecvt_specializations.h │ │ ├── concurrence.h │ │ ├── debug_allocator.h │ │ ├── enc_filebuf.h │ │ ├── extptr_allocator.h │ │ ├── functional │ │ ├── hash_map │ │ ├── hash_set │ │ ├── iterator │ │ ├── malloc_allocator.h │ │ ├── memory │ │ ├── mt_allocator.h │ │ ├── new_allocator.h │ │ ├── numeric │ │ ├── numeric_traits.h │ │ ├── pb_ds │ │ │ ├── assoc_container.hpp │ │ │ ├── detail │ │ │ │ ├── basic_tree_policy │ │ │ │ │ ├── basic_tree_policy_base.hpp │ │ │ │ │ ├── null_node_metadata.hpp │ │ │ │ │ └── traits.hpp │ │ │ │ ├── basic_types.hpp │ │ │ │ ├── bin_search_tree_ │ │ │ │ │ ├── bin_search_tree_.hpp │ │ │ │ │ ├── cond_dtor_entry_dealtor.hpp │ │ │ │ │ ├── cond_key_dtor_entry_dealtor.hpp │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── iterators_fn_imps.hpp │ │ │ │ │ ├── node_iterators.hpp │ │ │ │ │ ├── point_iterators.hpp │ │ │ │ │ ├── policy_access_fn_imps.hpp │ │ │ │ │ ├── r_erase_fn_imps.hpp │ │ │ │ │ ├── rotate_fn_imps.hpp │ │ │ │ │ ├── split_join_fn_imps.hpp │ │ │ │ │ └── traits.hpp │ │ │ │ ├── binary_heap_ │ │ │ │ │ ├── binary_heap_.hpp │ │ │ │ │ ├── const_iterator.hpp │ │ │ │ │ ├── const_point_iterator.hpp │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── entry_cmp.hpp │ │ │ │ │ ├── entry_pred.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── iterators_fn_imps.hpp │ │ │ │ │ ├── policy_access_fn_imps.hpp │ │ │ │ │ ├── resize_policy.hpp │ │ │ │ │ ├── split_join_fn_imps.hpp │ │ │ │ │ └── trace_fn_imps.hpp │ │ │ │ ├── binomial_heap_ │ │ │ │ │ ├── binomial_heap_.hpp │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ └── debug_fn_imps.hpp │ │ │ │ ├── binomial_heap_base_ │ │ │ │ │ ├── binomial_heap_base_.hpp │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ └── split_join_fn_imps.hpp │ │ │ │ ├── cc_hash_table_map_ │ │ │ │ │ ├── cc_ht_map_.hpp │ │ │ │ │ ├── cmp_fn_imps.hpp │ │ │ │ │ ├── cond_key_dtor_entry_dealtor.hpp │ │ │ │ │ ├── constructor_destructor_fn_imps.hpp │ │ │ │ │ ├── constructor_destructor_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── constructor_destructor_store_hash_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── debug_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── debug_store_hash_fn_imps.hpp │ │ │ │ │ ├── entry_list_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── erase_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── erase_store_hash_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── find_store_hash_fn_imps.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── insert_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── insert_store_hash_fn_imps.hpp │ │ │ │ │ ├── iterators_fn_imps.hpp │ │ │ │ │ ├── policy_access_fn_imps.hpp │ │ │ │ │ ├── resize_fn_imps.hpp │ │ │ │ │ ├── resize_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── resize_store_hash_fn_imps.hpp │ │ │ │ │ ├── size_fn_imps.hpp │ │ │ │ │ ├── standard_policies.hpp │ │ │ │ │ └── trace_fn_imps.hpp │ │ │ │ ├── cond_dealtor.hpp │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ ├── container_base_dispatch.hpp │ │ │ │ ├── debug_map_base.hpp │ │ │ │ ├── eq_fn │ │ │ │ │ ├── eq_by_less.hpp │ │ │ │ │ └── hash_eq_fn.hpp │ │ │ │ ├── gp_hash_table_map_ │ │ │ │ │ ├── constructor_destructor_fn_imps.hpp │ │ │ │ │ ├── constructor_destructor_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── constructor_destructor_store_hash_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── debug_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── debug_store_hash_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── erase_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── erase_store_hash_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── find_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── find_store_hash_fn_imps.hpp │ │ │ │ │ ├── gp_ht_map_.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── insert_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── insert_store_hash_fn_imps.hpp │ │ │ │ │ ├── iterator_fn_imps.hpp │ │ │ │ │ ├── policy_access_fn_imps.hpp │ │ │ │ │ ├── resize_fn_imps.hpp │ │ │ │ │ ├── resize_no_store_hash_fn_imps.hpp │ │ │ │ │ ├── resize_store_hash_fn_imps.hpp │ │ │ │ │ ├── standard_policies.hpp │ │ │ │ │ └── trace_fn_imps.hpp │ │ │ │ ├── hash_fn │ │ │ │ │ ├── direct_mask_range_hashing_imp.hpp │ │ │ │ │ ├── direct_mod_range_hashing_imp.hpp │ │ │ │ │ ├── linear_probe_fn_imp.hpp │ │ │ │ │ ├── mask_based_range_hashing.hpp │ │ │ │ │ ├── mod_based_range_hashing.hpp │ │ │ │ │ ├── probe_fn_base.hpp │ │ │ │ │ ├── quadratic_probe_fn_imp.hpp │ │ │ │ │ ├── ranged_hash_fn.hpp │ │ │ │ │ ├── ranged_probe_fn.hpp │ │ │ │ │ ├── sample_probe_fn.hpp │ │ │ │ │ ├── sample_range_hashing.hpp │ │ │ │ │ ├── sample_ranged_hash_fn.hpp │ │ │ │ │ └── sample_ranged_probe_fn.hpp │ │ │ │ ├── left_child_next_sibling_heap_ │ │ │ │ │ ├── const_iterator.hpp │ │ │ │ │ ├── const_point_iterator.hpp │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── iterators_fn_imps.hpp │ │ │ │ │ ├── left_child_next_sibling_heap_.hpp │ │ │ │ │ ├── node.hpp │ │ │ │ │ ├── null_metadata.hpp │ │ │ │ │ ├── policy_access_fn_imps.hpp │ │ │ │ │ └── trace_fn_imps.hpp │ │ │ │ ├── list_update_map_ │ │ │ │ │ ├── constructor_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── entry_metadata_base.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── iterators_fn_imps.hpp │ │ │ │ │ ├── lu_map_.hpp │ │ │ │ │ └── trace_fn_imps.hpp │ │ │ │ ├── list_update_policy │ │ │ │ │ ├── counter_lu_metadata.hpp │ │ │ │ │ ├── counter_lu_policy_imp.hpp │ │ │ │ │ ├── mtf_lu_policy_imp.hpp │ │ │ │ │ └── sample_update_policy.hpp │ │ │ │ ├── ov_tree_map_ │ │ │ │ │ ├── cond_dtor.hpp │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── iterators_fn_imps.hpp │ │ │ │ │ ├── node_iterators.hpp │ │ │ │ │ ├── ov_tree_map_.hpp │ │ │ │ │ ├── policy_access_fn_imps.hpp │ │ │ │ │ ├── split_join_fn_imps.hpp │ │ │ │ │ └── traits.hpp │ │ │ │ ├── pairing_heap_ │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── pairing_heap_.hpp │ │ │ │ │ └── split_join_fn_imps.hpp │ │ │ │ ├── pat_trie_ │ │ │ │ │ ├── child_iterator.hpp │ │ │ │ │ ├── cond_dtor_entry_dealtor.hpp │ │ │ │ │ ├── const_child_iterator.hpp │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── head.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_join_fn_imps.hpp │ │ │ │ │ ├── internal_node.hpp │ │ │ │ │ ├── iterators_fn_imps.hpp │ │ │ │ │ ├── leaf.hpp │ │ │ │ │ ├── node_base.hpp │ │ │ │ │ ├── node_iterators.hpp │ │ │ │ │ ├── node_metadata_base.hpp │ │ │ │ │ ├── pat_trie_.hpp │ │ │ │ │ ├── point_iterators.hpp │ │ │ │ │ ├── policy_access_fn_imps.hpp │ │ │ │ │ ├── r_erase_fn_imps.hpp │ │ │ │ │ ├── rotate_fn_imps.hpp │ │ │ │ │ ├── split_fn_imps.hpp │ │ │ │ │ ├── split_join_branch_bag.hpp │ │ │ │ │ ├── synth_e_access_traits.hpp │ │ │ │ │ ├── trace_fn_imps.hpp │ │ │ │ │ ├── traits.hpp │ │ │ │ │ └── update_fn_imps.hpp │ │ │ │ ├── priority_queue_base_dispatch.hpp │ │ │ │ ├── rb_tree_map_ │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── node.hpp │ │ │ │ │ ├── rb_tree_.hpp │ │ │ │ │ ├── split_join_fn_imps.hpp │ │ │ │ │ └── traits.hpp │ │ │ │ ├── rc_binomial_heap_ │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── rc.hpp │ │ │ │ │ ├── rc_binomial_heap_.hpp │ │ │ │ │ ├── split_join_fn_imps.hpp │ │ │ │ │ └── trace_fn_imps.hpp │ │ │ │ ├── resize_policy │ │ │ │ │ ├── cc_hash_max_collision_check_resize_trigger_imp.hpp │ │ │ │ │ ├── hash_exponential_size_policy_imp.hpp │ │ │ │ │ ├── hash_load_check_resize_trigger_imp.hpp │ │ │ │ │ ├── hash_load_check_resize_trigger_size_base.hpp │ │ │ │ │ ├── hash_prime_size_policy_imp.hpp │ │ │ │ │ ├── hash_standard_resize_policy_imp.hpp │ │ │ │ │ ├── sample_resize_policy.hpp │ │ │ │ │ ├── sample_resize_trigger.hpp │ │ │ │ │ └── sample_size_policy.hpp │ │ │ │ ├── splay_tree_ │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── info_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── node.hpp │ │ │ │ │ ├── splay_fn_imps.hpp │ │ │ │ │ ├── splay_tree_.hpp │ │ │ │ │ ├── split_join_fn_imps.hpp │ │ │ │ │ └── traits.hpp │ │ │ │ ├── standard_policies.hpp │ │ │ │ ├── thin_heap_ │ │ │ │ │ ├── constructors_destructor_fn_imps.hpp │ │ │ │ │ ├── debug_fn_imps.hpp │ │ │ │ │ ├── erase_fn_imps.hpp │ │ │ │ │ ├── find_fn_imps.hpp │ │ │ │ │ ├── insert_fn_imps.hpp │ │ │ │ │ ├── split_join_fn_imps.hpp │ │ │ │ │ ├── thin_heap_.hpp │ │ │ │ │ └── trace_fn_imps.hpp │ │ │ │ ├── tree_policy │ │ │ │ │ ├── node_metadata_selector.hpp │ │ │ │ │ ├── null_node_update_imp.hpp │ │ │ │ │ ├── order_statistics_imp.hpp │ │ │ │ │ └── sample_tree_node_update.hpp │ │ │ │ ├── tree_trace_base.hpp │ │ │ │ ├── trie_policy │ │ │ │ │ ├── node_metadata_selector.hpp │ │ │ │ │ ├── null_node_update_imp.hpp │ │ │ │ │ ├── order_statistics_imp.hpp │ │ │ │ │ ├── prefix_search_node_update_imp.hpp │ │ │ │ │ ├── sample_trie_e_access_traits.hpp │ │ │ │ │ ├── sample_trie_node_update.hpp │ │ │ │ │ ├── string_trie_e_access_traits_imp.hpp │ │ │ │ │ └── trie_policy_base.hpp │ │ │ │ ├── type_utils.hpp │ │ │ │ ├── types_traits.hpp │ │ │ │ └── unordered_iterator │ │ │ │ │ ├── const_iterator.hpp │ │ │ │ │ ├── const_point_iterator.hpp │ │ │ │ │ ├── iterator.hpp │ │ │ │ │ └── point_iterator.hpp │ │ │ ├── exception.hpp │ │ │ ├── hash_policy.hpp │ │ │ ├── list_update_policy.hpp │ │ │ ├── priority_queue.hpp │ │ │ ├── tag_and_trait.hpp │ │ │ ├── tree_policy.hpp │ │ │ └── trie_policy.hpp │ │ ├── pod_char_traits.h │ │ ├── pointer.h │ │ ├── pool_allocator.h │ │ ├── rb_tree │ │ ├── rc_string_base.h │ │ ├── rope │ │ ├── ropeimpl.h │ │ ├── slist │ │ ├── sso_string_base.h │ │ ├── stdio_filebuf.h │ │ ├── stdio_sync_filebuf.h │ │ ├── string_conversions.h │ │ ├── throw_allocator.h │ │ ├── type_traits.h │ │ ├── typelist.h │ │ ├── vstring.h │ │ ├── vstring.tcc │ │ ├── vstring_fwd.h │ │ └── vstring_util.h │ ├── fenv.h │ ├── forward_list │ ├── fstream │ ├── functional │ ├── i486-linux-gnu │ │ ├── 64 │ │ │ └── bits │ │ │ │ ├── atomic_word.h │ │ │ │ ├── basic_file.h │ │ │ │ ├── c++allocator.h │ │ │ │ ├── c++config.h │ │ │ │ ├── c++io.h │ │ │ │ ├── c++locale.h │ │ │ │ ├── cpu_defines.h │ │ │ │ ├── ctype_base.h │ │ │ │ ├── ctype_inline.h │ │ │ │ ├── ctype_noninline.h │ │ │ │ ├── cxxabi_tweaks.h │ │ │ │ ├── error_constants.h │ │ │ │ ├── extc++.h │ │ │ │ ├── gthr-default.h │ │ │ │ ├── gthr-posix.h │ │ │ │ ├── gthr-single.h │ │ │ │ ├── gthr-tpf.h │ │ │ │ ├── gthr.h │ │ │ │ ├── messages_members.h │ │ │ │ ├── os_defines.h │ │ │ │ ├── stdc++.h │ │ │ │ ├── stdtr1c++.h │ │ │ │ └── time_members.h │ │ └── bits │ │ │ ├── atomic_word.h │ │ │ ├── basic_file.h │ │ │ ├── c++allocator.h │ │ │ ├── c++config.h │ │ │ ├── c++io.h │ │ │ ├── c++locale.h │ │ │ ├── cpu_defines.h │ │ │ ├── ctype_base.h │ │ │ ├── ctype_inline.h │ │ │ ├── ctype_noninline.h │ │ │ ├── cxxabi_tweaks.h │ │ │ ├── error_constants.h │ │ │ ├── extc++.h │ │ │ ├── gthr-default.h │ │ │ ├── gthr-posix.h │ │ │ ├── gthr-single.h │ │ │ ├── gthr-tpf.h │ │ │ ├── gthr.h │ │ │ ├── messages_members.h │ │ │ ├── os_defines.h │ │ │ ├── stdc++.h │ │ │ ├── stdtr1c++.h │ │ │ └── time_members.h │ ├── initializer_list │ ├── iomanip │ ├── ios │ ├── iosfwd │ ├── iostream │ ├── istream │ ├── iterator │ ├── limits │ ├── list │ ├── locale │ ├── map │ ├── memory │ ├── mutex │ ├── new │ ├── numeric │ ├── ostream │ ├── parallel │ │ ├── algo.h │ │ ├── algobase.h │ │ ├── algorithm │ │ ├── algorithmfwd.h │ │ ├── balanced_quicksort.h │ │ ├── base.h │ │ ├── basic_iterator.h │ │ ├── checkers.h │ │ ├── compatibility.h │ │ ├── compiletime_settings.h │ │ ├── equally_split.h │ │ ├── features.h │ │ ├── find.h │ │ ├── find_selectors.h │ │ ├── for_each.h │ │ ├── for_each_selectors.h │ │ ├── iterator.h │ │ ├── list_partition.h │ │ ├── losertree.h │ │ ├── merge.h │ │ ├── multiseq_selection.h │ │ ├── multiway_merge.h │ │ ├── multiway_mergesort.h │ │ ├── numeric │ │ ├── numericfwd.h │ │ ├── omp_loop.h │ │ ├── omp_loop_static.h │ │ ├── par_loop.h │ │ ├── parallel.h │ │ ├── partial_sum.h │ │ ├── partition.h │ │ ├── queue.h │ │ ├── quicksort.h │ │ ├── random_number.h │ │ ├── random_shuffle.h │ │ ├── search.h │ │ ├── set_operations.h │ │ ├── settings.h │ │ ├── sort.h │ │ ├── tags.h │ │ ├── types.h │ │ ├── unique_copy.h │ │ └── workstealing.h │ ├── queue │ ├── random │ ├── ratio │ ├── regex │ ├── set │ ├── sstream │ ├── stack │ ├── stdatomic.h │ ├── stdexcept │ ├── streambuf │ ├── string │ ├── system_error │ ├── tgmath.h │ ├── thread │ ├── tr1 │ │ ├── array │ │ ├── bessel_function.tcc │ │ ├── beta_function.tcc │ │ ├── ccomplex │ │ ├── cctype │ │ ├── cfenv │ │ ├── cfloat │ │ ├── cinttypes │ │ ├── climits │ │ ├── cmath │ │ ├── complex │ │ ├── complex.h │ │ ├── cstdarg │ │ ├── cstdbool │ │ ├── cstdint │ │ ├── cstdio │ │ ├── cstdlib │ │ ├── ctgmath │ │ ├── ctime │ │ ├── ctype.h │ │ ├── cwchar │ │ ├── cwctype │ │ ├── ell_integral.tcc │ │ ├── exp_integral.tcc │ │ ├── fenv.h │ │ ├── float.h │ │ ├── functional │ │ ├── functional_hash.h │ │ ├── gamma.tcc │ │ ├── hashtable.h │ │ ├── hypergeometric.tcc │ │ ├── inttypes.h │ │ ├── legendre_function.tcc │ │ ├── limits.h │ │ ├── math.h │ │ ├── memory │ │ ├── modified_bessel_func.tcc │ │ ├── poly_hermite.tcc │ │ ├── poly_laguerre.tcc │ │ ├── random │ │ ├── regex │ │ ├── riemann_zeta.tcc │ │ ├── shared_ptr.h │ │ ├── special_function_util.h │ │ ├── stdarg.h │ │ ├── stdbool.h │ │ ├── stdint.h │ │ ├── stdio.h │ │ ├── stdlib.h │ │ ├── tgmath.h │ │ ├── tuple │ │ ├── type_traits │ │ ├── unordered_map │ │ ├── unordered_set │ │ ├── utility │ │ ├── wchar.h │ │ └── wctype.h │ ├── tr1_impl │ │ ├── array │ │ ├── boost_sp_counted_base.h │ │ ├── cctype │ │ ├── cfenv │ │ ├── cinttypes │ │ ├── cmath │ │ ├── complex │ │ ├── cstdint │ │ ├── cstdio │ │ ├── cstdlib │ │ ├── cwchar │ │ ├── cwctype │ │ ├── functional │ │ ├── functional_hash.h │ │ ├── hashtable │ │ ├── hashtable_policy.h │ │ ├── random │ │ ├── random.tcc │ │ ├── regex │ │ ├── type_traits │ │ ├── unordered_map │ │ ├── unordered_set │ │ └── utility │ ├── tuple │ ├── type_traits │ ├── typeinfo │ ├── unordered_map │ ├── unordered_set │ ├── utility │ ├── valarray │ └── vector ├── Library │ ├── GcppCrt.cpp │ ├── GcppLib.cpp │ ├── GcppLib.inf │ ├── VcppCrt.cpp │ └── book - Shortcut.lnk ├── gcc4.4-ld-script └── test │ ├── testcpp.cpp │ └── testcpp.inf ├── Hob ├── Hob.c └── Hob.inf ├── HotKey ├── HotKey.c └── HotKey.inf ├── Network ├── Main.c ├── memcpy.c ├── socket.c ├── socket.h └── tcpsocket.inf ├── Nt32Pkg ├── Nt32Pkg-2.4.inc ├── Nt32Pkg.dec ├── Nt32Pkg.dsc ├── Nt32Pkg.fdf ├── Nt32Pkg.inc └── Nt32Pkg2.4.dsc ├── Shell ├── Execute │ ├── Execute.c │ └── Execute.inf └── Execute2 │ ├── Execute.c │ └── Execute.inf ├── UefiProgramming-edk2-stable202102.dec ├── UefiProgramming-edk2-stable202102.dsc ├── Uutil ├── Include │ └── Uutil.h └── Uutil.dec ├── audio ├── ComponentName.c ├── ac97.c ├── ac97config ├── ac97reg.h ├── accdriver.c ├── audio.c ├── audio.h ├── audio.inf ├── ichreg.h ├── sample.h ├── shellfile.h ├── testac97.c ├── testac97.inf ├── wav.h └── wintype.h ├── disk ├── AtaPassThru │ ├── TestPassThru.c │ └── TestPassThru.inf ├── DevicePath │ ├── TestDevicePath.c │ └── TestDevicePath.inf ├── GPT │ ├── TestGpt.c │ ├── TestGpt.inf │ └── TestGpt.inf~ ├── devicepath.h ├── disk.cpp ├── disk.h ├── disk.inf └── test.cpp ├── ffmpeg ├── conf.sh ├── config.h ├── ffdecoder │ ├── InitShell.c │ ├── StdLib.diff │ ├── afplayer │ │ └── afplayer.inf │ ├── ffdecoder.c │ ├── ffdecoder.h │ ├── ffdecoder.inf │ ├── ffdecoder.inf2 │ ├── ffmpeg.diff │ └── math.c ├── ffmpeg.dec ├── ffplayer │ ├── drop.avi │ ├── fplayer.c │ ├── fplayer.cpp │ ├── fplayer.inf │ ├── libGui.lib │ ├── math.c │ ├── off.bmp │ ├── on.bmp │ ├── rdtsc.h │ └── readme.txt ├── fplayer │ ├── fplayer.c │ ├── fplayer.inf │ ├── fplayer.inf2 │ └── math.c ├── libavcodec │ └── libavcodec.inf ├── libavformat │ └── libavformat.inf ├── libavutil │ └── libavutil.inf ├── libswscale │ ├── libswscale.diff │ └── libswscale.inf └── zlib │ └── zlib.inf ├── infs ├── Debug │ ├── Main.c │ └── Main.inf ├── ShellAppMain │ ├── Main.c │ └── Main.inf ├── UefiMain │ ├── UefiMain.c │ └── UefiMain.inf └── main │ ├── main.c │ └── main.inf ├── mouse ├── mouse.c └── mouse.inf ├── multitask └── processor │ ├── process.c │ └── process.inf ├── readme.txt ├── sstdPkg ├── Include │ ├── sstd.h │ ├── stdio.h │ ├── stdlib.h │ └── string.h ├── Library │ ├── sstdLib.inf │ ├── sstdall.cpp │ └── test.c ├── Testsstd │ ├── Testsstd.c │ └── Testsstd.inf └── sstd.dec ├── std ├── Main.c ├── main.inf └── sstd │ ├── Testsstd.c │ └── Testsstd.inf ├── systemtable ├── BS │ ├── BS.c │ └── BS.inf ├── ST │ ├── ST.c │ └── ST.inf ├── gRT │ ├── RT.c │ └── RT.inf ├── gST │ ├── ST.c │ └── ST.inf └── memory │ ├── BSmem.c │ └── BSmem.inf └── thread ├── SimpleThread ├── SimpleThread.c ├── SimpleThread.h ├── SimpleThread.inf ├── dmthread.c └── dmthread.h ├── TestSthread ├── SimpleThread.h ├── TestSimpleThread.c └── TestSimpleThread.inf └── setjmp ├── Main.c └── Main.inf /book/AppPkg/AppPkg-2.4.inc: -------------------------------------------------------------------------------- 1 | ################################################################################################### 2 | # 3 | # UEFI principles and programming 4 | # 5 | ################################################################################################### 6 | [defines] 7 | DEFINE UEFI_BOOK_DIR = uefi\book 8 | 9 | [LibraryClasses] 10 | LibGui|$(UEFI_BOOK_DIR)/GUIPkg/Library/UGui.inf 11 | LibCpp|$(UEFI_BOOK_DIR)/CppPkg/Library/CppLib.inf 12 | 13 | CppLib|$(UEFI_BOOK_DIR)/CppPkg/Library/CppLib.inf 14 | [Components] 15 | $(UEFI_BOOK_DIR)/ffmpeg/ffplayer/fplayer.inf 16 | #$(UEFI_BOOK_DIR)/GcppPkg/test/testcpp.inf 17 | $(UEFI_BOOK_DIR)/std/main.inf 18 | $(UEFI_BOOK_DIR)/infs/main/main.inf 19 | $(UEFI_BOOK_DIR)/disk/DevicePath/TestDevicePath.inf 20 | $(UEFI_BOOK_DIR)/disk/AtaPassThru/TestPassThru.inf 21 | $(UEFI_BOOK_DIR)/audio/audio.inf 22 | $(UEFI_BOOK_DIR)/systemtable/memory/BSmem.inf 23 | $(UEFI_BOOK_DIR)/mouse/mouse.inf 24 | $(UEFI_BOOK_DIR)/HotKey/HotKey.inf 25 | $(UEFI_BOOK_DIR)/FileIo/FileIo.inf #spec 2.4 26 | $(UEFI_BOOK_DIR)/infs/ShellAppMain/Main.inf 27 | $(UEFI_BOOK_DIR)/Shell/Execute/Execute.inf 28 | $(UEFI_BOOK_DIR)/GUIPkg/test/testgui.inf 29 | 30 | [Components.X64] 31 | $(UEFI_BOOK_DIR)/audio/testac97.inf 32 | -------------------------------------------------------------------------------- /book/AppPkg/AppPkg.dec: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Declarations for the UDK Standard Libraries. 3 | # 4 | # Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available under 7 | # the terms and conditions of the BSD License which accompanies this distribution. 8 | # The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | 16 | [Defines] 17 | DEC_SPECIFICATION = 0x00010005 18 | PACKAGE_NAME = AppPkg 19 | PACKAGE_GUID = B3E3D3D5-D62B-4497-A175-264F489D127E 20 | PACKAGE_VERSION = 0.01 21 | 22 | 23 | [Guids] 24 | gAppPkgTokenSpaceGuid = { 0xe7e1efa6, 0x7607, 0x4a78, { 0xa7, 0xdd, 0x43, 0xe4, 0xbd, 0x72, 0xc0, 0x99 }} 25 | 26 | 27 | [PcdsFixedAtBuild] 28 | gAppPkgTokenSpaceGuid.DataSource_Port|1234|UINT16|0 29 | gAppPkgTokenSpaceGuid.Tftp_AckLogBase|4|UINT32|1 30 | gAppPkgTokenSpaceGuid.Tftp_AckMultiplier|4|UINT32|2 31 | gAppPkgTokenSpaceGuid.Tftp_Bandwidth|0|BOOLEAN|3 32 | gAppPkgTokenSpaceGuid.Tftp_HighSpeed|0|BOOLEAN|4 33 | gAppPkgTokenSpaceGuid.Tftp_MaxRetry|10|UINT32|5 34 | gAppPkgTokenSpaceGuid.Tftp_MaxTimeoutInSec|3|UINT32|6 35 | gAppPkgTokenSpaceGuid.WebServer_HttpPort|80|UINT16|7 36 | 37 | -------------------------------------------------------------------------------- /book/CppPkg/CppPkg.dec: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # This is the Unix Emulation Environment Platform 4 | # 5 | # Reference platform implementation using an emulator. 6 | # Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made available 9 | # under the terms and conditions of the BSD License which accompanies this distribution. 10 | # The full text of the license may be found at http://opensource.org/licenses/bsd-license.php 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES 12 | # OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | [Defines] 17 | DEC_SPECIFICATION = 0x00010005 18 | PACKAGE_NAME = EdkCppPkg 19 | PACKAGE_GUID = f2805c44-8985-11db-9e98-0040d0c0d0cc 20 | PACKAGE_VERSION = 1.0 21 | 22 | [Includes] 23 | Include 24 | StdInclude 25 | 26 | [LibraryClasses] 27 | 28 | [Guids] 29 | [Ppis] 30 | 31 | [Protocols] 32 | 33 | [PcdsFixedAtBuild] 34 | [PcdsFixedAtBuild, PcdsPatchableInModule] 35 | 36 | [PcdsDynamic, PcdsDynamicEx] 37 | -------------------------------------------------------------------------------- /book/CppPkg/Library/CppLib.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ===================================================================================== 3 | * 4 | * Filename: GcppLib.cpp 5 | * 6 | * Description: 7 | * 8 | * Version: 1.0 9 | * Created: 04/13/2013 10:35:14 AM 10 | * Revision: none 11 | * Compiler: gcc 12 | * 13 | * Author: DAI ZHENGHUA (), djx.zhenghua@gmail.com 14 | * Company: 15 | * 16 | * ===================================================================================== 17 | */ 18 | extern"C" 19 | { 20 | #include 21 | #include 22 | #include 23 | 24 | } 25 | 26 | extern "C" 27 | void _Unwind_Resume(struct _Unwind_Exception *object) 28 | { 29 | 30 | } 31 | 32 | extern "C" int __cdecl sprintf_s(char * _DstBuf, size_t _SizeInBytes, const char * _Format, ...) 33 | { 34 | int ret; 35 | VA_LIST ap; 36 | VA_START(ap, _Format); 37 | ret = (int)AsciiVSPrint(_DstBuf, _SizeInBytes, _Format, ap); 38 | return (ret); 39 | } 40 | 41 | -------------------------------------------------------------------------------- /book/CppPkg/Library/CppLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # The DXE driver produces HII protocols defined in UEFI HII 2.1 specificatin. 3 | # 4 | # Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | # 15 | ## 16 | 17 | [Defines] 18 | INF_VERSION = 0x00010005 19 | BASE_NAME = libcpp 20 | FILE_GUID = 348C4D62-BFBD-4882-9ECE-C80BB1C64336 21 | VERSION_STRING = 1.0 22 | MODULE_TYPE = BASE 23 | LIBRARY_CLASS = CppLib 24 | #MODULE_TYPE = DXE_DRIVER 25 | #ENTRY_POINT = InitializeAvCodec 26 | DEFINE UEFI_BOOK_DIR = uefi/book 27 | 28 | # 29 | # The following information is for reference only and not required by the build tools. 30 | # 31 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 32 | # 33 | 34 | [Sources] 35 | CppLib.cpp 36 | CppMain.cpp 37 | crt0data.cpp 38 | UNewDelete.cpp 39 | VcppCrt.cpp 40 | [Packages] 41 | MdePkg/MdePkg.dec 42 | MdeModulePkg/MdeModulePkg.dec 43 | StdLib/StdLib.dec 44 | $(UEFI_BOOK_DIR)/CppPkg/CppPkg.dec 45 | 46 | 47 | [LibraryClasses] 48 | UefiBootServicesTableLib 49 | UefiLib 50 | 51 | [Protocols] 52 | 53 | [FeaturePcd] 54 | 55 | [Pcd] 56 | 57 | [Guids] 58 | 59 | [Depex] 60 | TRUE 61 | 62 | [BuildOptions] 63 | MSFT:*_*_*_CC_FLAGS = /wd4804 /wd4164 64 | -------------------------------------------------------------------------------- /book/CppPkg/Library/CppMain.cpp: -------------------------------------------------------------------------------- 1 | 2 | extern"C" 3 | { 4 | #include 5 | } 6 | 7 | int cppMain ( IN int Argc, IN char **Argv ); 8 | void __do_global_dtors_aux(); 9 | void __do_global_ctors_aux(); 10 | 11 | int 12 | main ( 13 | IN int Argc, 14 | IN char **Argv 15 | ) 16 | { 17 | 18 | __do_global_ctors_aux(); 19 | 20 | cppMain(Argc, Argv); 21 | 22 | __do_global_dtors_aux(); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /book/CppPkg/Library/UNewDelete.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ===================================================================================== 3 | * 4 | * Filename: GcppLib.cpp 5 | * 6 | * Description: 7 | * 8 | * Version: 1.0 9 | * Created: 04/13/2013 10:35:14 AM 10 | * Revision: none 11 | * Compiler: gcc 12 | * 13 | * Author: DAI ZHENGHUA (), djx.zhenghua@gmail.com 14 | * Company: 15 | * 16 | * ===================================================================================== 17 | */ 18 | extern"C" 19 | { 20 | #include 21 | #include 22 | #include 23 | 24 | } 25 | 26 | typedef UINTN size_t; 27 | void * operator new( size_t Size ) 28 | { 29 | void *RetVal; 30 | EFI_STATUS Status; 31 | 32 | if( Size == 0) { 33 | return NULL; 34 | } 35 | 36 | Status = gBS->AllocatePool( EfiLoaderData, (UINTN)Size, &RetVal); 37 | if( Status != EFI_SUCCESS) { 38 | RetVal = NULL; 39 | } 40 | return RetVal; 41 | } 42 | 43 | 44 | void * operator new[]( size_t cb ) 45 | { 46 | void *res = operator new(cb); 47 | return res; 48 | } 49 | 50 | 51 | 52 | void operator delete( void * p ) 53 | { 54 | if(p != NULL) 55 | (void) gBS->FreePool (p); 56 | } 57 | 58 | void operator delete[]( void * p ) 59 | { 60 | operator delete(p); 61 | } 62 | 63 | -------------------------------------------------------------------------------- /book/CppPkg/Library/VcppCrt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ===================================================================================== 3 | * 4 | * Filename: VcppCrt.cpp 5 | * 6 | * Description: 7 | * 8 | * Version: 1.0 9 | * Created: 04/17/2013 07:54:10 PM 10 | * Revision: none 11 | * Compiler: gcc 12 | * 13 | * Author: DAI ZHENGHUA (), djx.zhenghua@gmail.com 14 | * Company: 15 | * 16 | * ===================================================================================== 17 | */ 18 | #include "cpp.h" 19 | /* 20 | #include 21 | _STD_BEGIN 22 | void _Throw(stdext::exception const &){} 23 | void _String_base::_Xran(){} 24 | void _String_base::_Xlen(){} 25 | 26 | void (__cdecl* std::_Raise_handler)(class stdext::exception const &); 27 | _STD_END 28 | */ 29 | extern "C"{ 30 | 31 | void _invalid_parameter_noinfo(){} 32 | } // extern "C"{ 33 | -------------------------------------------------------------------------------- /book/CppPkg/Library/newdelete.cpp: -------------------------------------------------------------------------------- 1 | #include "StdUefi.h" 2 | 3 | __inline__ void * operator new( size_t cb ) 4 | { 5 | void *res; 6 | res = malloc(cb); 7 | return res; 8 | } 9 | 10 | 11 | __inline__ void * operator new[]( size_t cb ) 12 | { 13 | void *res = operator new(cb); 14 | return res; 15 | } 16 | 17 | __inline__ void operator delete( void * p ) 18 | { 19 | free( p ); 20 | } 21 | 22 | __inline__ void operator delete[]( void * p ) 23 | { 24 | operator delete(p); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /book/CppPkg/StdInclude/cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __CPP_HEADER__ 2 | #define __CPP_HEADER__ 3 | 4 | #undef NULL 5 | #define NULL 0 6 | #define _SIZE_T_DEFINED 7 | #define _PTRDIFF_T_DEFINED 8 | #endif //__CPP_HEADER__ 9 | -------------------------------------------------------------------------------- /book/CppPkg/StdInclude/stdfile.h: -------------------------------------------------------------------------------- 1 | #ifndef __HEADER_STDFILE__ 2 | #define __HEADER_STDFILE__ 3 | #include 4 | #include 5 | #endif 6 | 7 | -------------------------------------------------------------------------------- /book/CppPkg/test/testcpp.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = testcpp 18 | FILE_GUID = 4ea97c46-7491-4dfd-b442-74798713ce5f 19 | VERSION_STRING = 0.1 20 | MODULE_TYPE = UEFI_APPLICATION 21 | ENTRY_POINT = ShellCEntryLib 22 | 23 | DEFINE UEFI_BOOK_DIR = uefi/book 24 | 25 | 26 | [Sources] 27 | #crtend.c 28 | testcpp.cpp | GCC 29 | 30 | [Packages] 31 | MdePkg/MdePkg.dec 32 | MdeModulePkg/MdeModulePkg.dec 33 | $(UEFI_BOOK_DIR)/CppPkg/CppPkg.dec 34 | StdLib/StdLib.dec 35 | 36 | [LibraryClasses] 37 | CppLib 38 | ShellCEntryLib 39 | PrintLib 40 | #LibC 41 | #LibStdio 42 | 43 | [Protocols] 44 | 45 | [BuildOptions] 46 | GCC:*_*_IA32_CC_FLAGS = 47 | MSFT:*_*_*_CC_FLAGS = /wd4804 /wd4068 /wd4164 48 | 49 | -------------------------------------------------------------------------------- /book/Event/TestEvent.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/Event/TestEvent.c -------------------------------------------------------------------------------- /book/Event/TestEvent.inf: -------------------------------------------------------------------------------- 1 | ## 2 | 3 | [Defines] 4 | INF_VERSION = 0x00010005 5 | BASE_NAME = testEvent 6 | FILE_GUID = 6987936E-ED34-44db-AE97-1FA5E4ED2117 7 | MODULE_TYPE = UEFI_APPLICATION 8 | VERSION_STRING = 1.0 9 | ENTRY_POINT = UefiMain 10 | 11 | # 12 | # The following information is for reference only and not required by the build tools. 13 | # 14 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 15 | # 16 | 17 | [Sources] 18 | TestEvent.c 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | 23 | 24 | [LibraryClasses] 25 | UefiApplicationEntryPoint 26 | UefiLib 27 | PcdLib 28 | DebugLib 29 | UefiBootServicesTableLib 30 | UefiRuntimeServicesTableLib 31 | BaseMemoryLib 32 | 33 | [Protocols] 34 | gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED 35 | gEfiDevicePathProtocolGuid # ALWAYS_CONSUMED 36 | gEfiLoadedImageProtocolGuid # ALWAYS_CONSUMED 37 | gEfiSimpleFileSystemProtocolGuid # ALWAYS_CONSUMED 38 | gEfiDevicePathToTextProtocolGuid # ALWAYS_CONSUMED 39 | gEfiHiiConfigAccessProtocolGuid 40 | gEfiPlatformDriverOverrideProtocolGuid 41 | gEfiBlockIoProtocolGuid ## TO_START 42 | gEfiDriverBindingProtocolGuid 43 | gEfiComponentNameProtocolGuid 44 | gEfiDiskIoProtocolGuid 45 | gEfiPciIoProtocolGuid 46 | gEfiSimplePointerProtocolGuid 47 | gEfiSimpleTextInputExProtocolGuid 48 | 49 | [FeaturePcd] 50 | 51 | [Pcd.common] 52 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang 53 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes 54 | 55 | [Guids] 56 | gEfiFileSystemInfoGuid 57 | gEfiFileInfoGuid 58 | 59 | [BuildOptions] 60 | -------------------------------------------------------------------------------- /book/FileIo/FileIo.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | **/ 3 | extern "C"{ 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | } 15 | 16 | 17 | class UFile 18 | { 19 | public: 20 | typedef EFI_STATUS Ustatus; 21 | UFile(CHAR16* FileName, UINT64 attr = 0); 22 | UFile(UFile& root, CHAR16* FileName, UINT64 attr = 0); 23 | ~UFile(); 24 | public: 25 | //interface 26 | 27 | Ustatus Open(CHAR16* FileName, UINT64 mode, UINT64 attr); 28 | private: 29 | EFI_FILE_PROTOCOL* m_file; 30 | static EFI_FILE_PROTOCOL* m_root; 31 | }; 32 | -------------------------------------------------------------------------------- /book/FileIo/FileIo.inf: -------------------------------------------------------------------------------- 1 | ## 2 | 3 | [Defines] 4 | INF_VERSION = 0x00010005 5 | BASE_NAME = TestFileIo 6 | FILE_GUID = 6987936E-ED34-44db-AE97-1FA5E4ED2117 7 | MODULE_TYPE = UEFI_APPLICATION 8 | VERSION_STRING = 1.0 9 | ENTRY_POINT = UefiMain 10 | 11 | # 12 | # The following information is for reference only and not required by the build tools. 13 | # 14 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 15 | # 16 | 17 | [Sources] 18 | TestFileIo.c 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | uefi/book/Uutil/Uutil.dec 23 | ShellPkg/ShellPkg.dec 24 | 25 | 26 | [LibraryClasses] 27 | UefiApplicationEntryPoint 28 | UefiLib 29 | PcdLib 30 | DebugLib 31 | UefiBootServicesTableLib 32 | UefiRuntimeServicesTableLib 33 | BaseMemoryLib 34 | 35 | [Protocols] 36 | gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED 37 | gEfiDevicePathProtocolGuid # ALWAYS_CONSUMED 38 | gEfiLoadedImageProtocolGuid # ALWAYS_CONSUMED 39 | gEfiSimpleFileSystemProtocolGuid # ALWAYS_CONSUMED 40 | gEfiDevicePathToTextProtocolGuid # ALWAYS_CONSUMED 41 | gEfiPlatformDriverOverrideProtocolGuid 42 | gEfiBlockIoProtocolGuid ## TO_START 43 | gEfiDriverBindingProtocolGuid 44 | gEfiComponentNameProtocolGuid 45 | gEfiDiskIoProtocolGuid 46 | gEfiPciIoProtocolGuid 47 | gEfiSimplePointerProtocolGuid 48 | gEfiSimpleTextInputExProtocolGuid 49 | gEfiShellProtocolGuid 50 | 51 | [FeaturePcd] 52 | 53 | [Pcd.common] 54 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang 55 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes 56 | 57 | [Guids] 58 | gEfiFileSystemInfoGuid 59 | gEfiFileInfoGuid 60 | 61 | [BuildOptions] 62 | -------------------------------------------------------------------------------- /book/FileIo/TestFileIo.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/FileIo/TestFileIo.c -------------------------------------------------------------------------------- /book/GUIPkg/GUIPkg.dec: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # This is the Unix Emulation Environment Platform 4 | # 5 | # Reference platform implementation using an emulator. 6 | # Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made available 9 | # under the terms and conditions of the BSD License which accompanies this distribution. 10 | # The full text of the license may be found at http://opensource.org/licenses/bsd-license.php 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES 12 | # OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | [Defines] 17 | DEC_SPECIFICATION = 0x00010005 18 | PACKAGE_NAME = EdkGUIPkg 19 | PACKAGE_GUID = f4805c44-8985-11db-9e98-0040d0c0d0cc 20 | PACKAGE_VERSION = 1.0 21 | 22 | [Includes] 23 | Include 24 | 25 | [LibraryClasses] 26 | 27 | [Guids] 28 | [Ppis] 29 | 30 | [Protocols] 31 | 32 | [PcdsFixedAtBuild] 33 | [PcdsFixedAtBuild, PcdsPatchableInModule] 34 | 35 | [PcdsDynamic, PcdsDynamicEx] 36 | -------------------------------------------------------------------------------- /book/GUIPkg/Include/fbext.h: -------------------------------------------------------------------------------- 1 | #ifndef _FRAMEBUFFER_EXT_HEADER 2 | #define _FRAMEBUFFER_EXT_HEADER 3 | #ifdef __cplusplus 4 | extern "C"{ 5 | #endif 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef __cplusplus 15 | }//! extern C 16 | #endif 17 | #include 18 | namespace UGUI{ 19 | 20 | 21 | class ManuelFrameBuffer: public UFrameBuffer 22 | { 23 | public: 24 | ManuelFrameBuffer():UFrameBuffer(), 25 | m_framebuffer_base(0), 26 | m_pixel_bits(0), 27 | m_VideoPciIo(0), 28 | m_Frambuffer(0) 29 | { 30 | AutoInit(); 31 | } 32 | virtual ~ManuelFrameBuffer(); 33 | private: 34 | BOOLEAN UseFrameBuffer(){ return (m_framebuffer_base != 0); } 35 | EFI_STATUS AutoInit(); 36 | public: 37 | virtual EFI_STATUS UpdateScreen(EFI_GRAPHICS_OUTPUT_BLT_PIXEL* bitmap, RECT aRect = Brick::ClientRect); 38 | virtual EFI_STATUS Blt( 39 | IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 40 | IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL 41 | IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, 42 | IN UINTN SourceX, 43 | IN UINTN SourceY, 44 | IN UINTN DestinationX, 45 | IN UINTN DestinationY, 46 | IN UINTN Width, 47 | IN UINTN Height, 48 | IN UINTN Delta OPTIONAL 49 | ); 50 | private: 51 | UINT64 m_framebuffer_base; 52 | UINT32 m_pixel_bits; 53 | UINT32 m_line_pixels; 54 | EFI_PCI_IO_PROTOCOL *m_VideoPciIo; 55 | UINT8 *m_Frambuffer; 56 | }; 57 | 58 | } 59 | #endif 60 | -------------------------------------------------------------------------------- /book/GUIPkg/Library/UGui.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/GUIPkg/Library/UGui.cpp -------------------------------------------------------------------------------- /book/GUIPkg/Library/UGui.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # The DXE driver produces HII protocols defined in UEFI HII 2.1 specificatin. 3 | # 4 | # Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | # 15 | ## 16 | 17 | [Defines] 18 | INF_VERSION = 0x00010005 19 | BASE_NAME = libGui 20 | FILE_GUID = 348C4D62-BFBD-4882-9ECE-C80BB1C64336 21 | VERSION_STRING = 1.0 22 | MODULE_TYPE = BASE 23 | LIBRARY_CLASS = GUILib 24 | 25 | DEFINE UEFI_BOOK_DIR = uefi/book 26 | 27 | # 28 | # The following information is for reference only and not required by the build tools. 29 | # 30 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 31 | # 32 | 33 | [Sources] 34 | UGui.cpp 35 | fb.cpp 36 | bmp.cpp 37 | Util.cpp 38 | [Packages] 39 | StdLib/StdLib.dec 40 | MdePkg/MdePkg.dec 41 | MdeModulePkg/MdeModulePkg.dec 42 | ShellPkg/ShellPkg.dec 43 | $(UEFI_BOOK_DIR)/CppPkg/CppPkg.dec 44 | $(UEFI_BOOK_DIR)/GUIPkg/GUIPkg.dec 45 | 46 | [LibraryClasses] 47 | UefiBootServicesTableLib 48 | UefiLib 49 | 50 | [Protocols] 51 | gEfiSimpleTextInputExProtocolGuid 52 | 53 | [FeaturePcd] 54 | 55 | [Pcd] 56 | 57 | [Guids] 58 | 59 | [Depex] 60 | TRUE 61 | 62 | [BuildOptions] 63 | MSFT:*_*_*_CC_FLAGS = /wd4804 /wd4201 /wd4164 64 | -------------------------------------------------------------------------------- /book/GUIPkg/Library/Util.cpp: -------------------------------------------------------------------------------- 1 | #include < UGui.h> 2 | extern "C"{ 3 | #include < Protocol/HiiFont.h> 4 | #include < Library/HiiLib.h> 5 | #include < Library/UefiRuntimeServicesTableLib.h> 6 | #include < Protocol/BlockIo.h> 7 | #include < Library/MemoryAllocationLib.h> 8 | } 9 | 10 | 11 | namespace UGUI{ 12 | 13 | 14 | 15 | }//namespace UGUI{ 16 | -------------------------------------------------------------------------------- /book/GUIPkg/test/testcpp.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = testgcpp 18 | FILE_GUID = 4ea97c46-7491-4dfd-b442-74798713ce5f 19 | VERSION_STRING = 0.1 20 | MODULE_TYPE = UEFI_APPLICATION 21 | ENTRY_POINT = ShellCEntryLib 22 | 23 | [Sources] 24 | #crtend.c 25 | testcpp.cpp 26 | 27 | [Packages] 28 | MdePkg/MdePkg.dec 29 | MdeModulePkg/MdeModulePkg.dec 30 | uefi/CppPkg/CppPkg.dec 31 | StdLib/StdLib.dec 32 | 33 | [LibraryClasses] 34 | CppLib 35 | ShellCEntryLib 36 | PrintLib 37 | LibC 38 | LibStdio 39 | 40 | [Protocols] 41 | 42 | [BuildOptions] 43 | GCC:*_*_IA32_CC_FLAGS = 44 | MSFT:*_*_*_CC_FLAGS = /wd4804 /wd4068 45 | 46 | -------------------------------------------------------------------------------- /book/GUIbasics/String/example.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/GUIbasics/String/example.c -------------------------------------------------------------------------------- /book/GUIbasics/String/example.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = example 4 | FILE_GUID = 4ba97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = ShellCEntryLib 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | example.c 13 | example.uni 14 | 15 | [Packages] 16 | MdePkg/MdePkg.dec 17 | MdeModulePkg/MdeModulePkg.dec 18 | ShellPkg/ShellPkg.dec 19 | 20 | [LibraryClasses] 21 | ShellCEntryLib 22 | UefiLib 23 | HiiLib 24 | ShellLib 25 | UefiHiiServicesLib 26 | MemoryAllocationLib 27 | 28 | [protocols] 29 | gEfiHiiStringProtocolGuid 30 | gEfiShellProtocolGuid 31 | gEfiShellParametersProtocolGuid 32 | 33 | [BuildOptions] 34 | 35 | -------------------------------------------------------------------------------- /book/GUIbasics/String/example.uni: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/GUIbasics/String/example.uni -------------------------------------------------------------------------------- /book/GUIbasics/font/Font/font.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ===================================================================================== 3 | * 4 | * Filename: font.c 5 | * 6 | * Description: 7 | * 8 | * Version: 1.0 9 | * Created: 02/20/2013 08:41:46 PM 10 | * Revision: none 11 | * Compiler: gcc 12 | * 13 | * Author: DAI ZHENGHUA (), djx.zhenghua@gmail.com 14 | * Company: 15 | * 16 | * ===================================================================================== 17 | */ 18 | #include 19 | #include "../example.data" 20 | #include "LaffStd.c" 21 | -------------------------------------------------------------------------------- /book/GUIbasics/font/Font/font.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = dfont 18 | FILE_GUID = 4ea97c46-7491-4dfd-b442-74798713ce5f 19 | VERSION_STRING = 0.1 20 | #MODULE_TYPE = UEFI_DRIVER 21 | MODULE_TYPE = UEFI_APPLICATION 22 | ENTRY_POINT = LoadFont 23 | # 24 | # VALID_ARCHITECTURES = IA32 X64 IPF 25 | # 26 | 27 | [Sources] 28 | font.c 29 | main.c 30 | 31 | [Packages] 32 | MdePkg/MdePkg.dec 33 | MdeModulePkg/MdeModulePkg.dec 34 | 35 | [LibraryClasses] 36 | # UefiDriverEntryPoint 37 | UefiApplicationEntryPoint 38 | UefiLib 39 | HiiLib 40 | BaseMemoryLib 41 | UefiHiiServicesLib 42 | 43 | [Protocols] 44 | gEfiPciIoProtocolGuid 45 | gEfiGraphicsOutputProtocolGuid 46 | gEfiHiiDatabaseProtocolGuid 47 | gEfiHiiImageProtocolGuid 48 | gEfiHiiConfigRoutingProtocolGuid 49 | gEfiHiiStringProtocolGuid 50 | gEfiSimplePointerProtocolGuid 51 | 52 | [BuildOptions] 53 | GCC:*_*_IA32_CC_FLAGS = -O2 54 | MSFT:*_*_*_CC_FLAGS = -DNEFI_SHELL_FILE_PROTOCOL -DUSE_SIMPLE_STDIO /GL- /wd4804 /wd4201 /Oi- /FAs 55 | 56 | -------------------------------------------------------------------------------- /book/GUIbasics/font/SimpleFont/font.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ===================================================================================== 3 | * 4 | * Filename: font.c 5 | * 6 | * Description: 7 | * 8 | * Version: 1.0 9 | * Created: 02/20/2013 08:41:46 PM 10 | * Revision: none 11 | * Compiler: gcc 12 | * 13 | * Author: DAI ZHENGHUA (), djx.zhenghua@gmail.com 14 | * Company: 15 | * 16 | * ===================================================================================== 17 | */ 18 | #include 19 | #include "example.data" 20 | -------------------------------------------------------------------------------- /book/GUIbasics/font/SimpleFont/font.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = font 18 | FILE_GUID = 4ea97c46-7491-4dfd-b442-74798713ce5f 19 | VERSION_STRING = 0.1 20 | #MODULE_TYPE = UEFI_DRIVER 21 | MODULE_TYPE = UEFI_APPLICATION 22 | ENTRY_POINT = LoadFont 23 | # 24 | # VALID_ARCHITECTURES = IA32 X64 IPF 25 | # 26 | 27 | [Sources] 28 | font.c 29 | main.c 30 | 31 | [Packages] 32 | MdePkg/MdePkg.dec 33 | MdeModulePkg/MdeModulePkg.dec 34 | 35 | [LibraryClasses] 36 | # UefiDriverEntryPoint 37 | UefiApplicationEntryPoint 38 | UefiLib 39 | HiiLib 40 | BaseMemoryLib 41 | UefiHiiServicesLib 42 | 43 | [Protocols] 44 | gEfiPciIoProtocolGuid 45 | gEfiGraphicsOutputProtocolGuid 46 | gEfiHiiDatabaseProtocolGuid 47 | gEfiHiiImageProtocolGuid 48 | gEfiHiiConfigRoutingProtocolGuid 49 | gEfiHiiStringProtocolGuid 50 | gEfiSimplePointerProtocolGuid 51 | 52 | [BuildOptions] 53 | GCC:*_*_IA32_CC_FLAGS = -O2 54 | MSFT:*_*_*_CC_FLAGS = -DNEFI_SHELL_FILE_PROTOCOL -DUSE_SIMPLE_STDIO /GL- /wd4804 /wd4201 /Oi- /FAs 55 | 56 | -------------------------------------------------------------------------------- /book/GUIbasics/font/testFont/testfont.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = testdfont 18 | FILE_GUID = 4ea97c46-7491-4dfd-b442-74798713ce5f 19 | VERSION_STRING = 0.1 20 | #MODULE_TYPE = UEFI_DRIVER 21 | MODULE_TYPE = UEFI_APPLICATION 22 | ENTRY_POINT = UefiMain 23 | # 24 | # VALID_ARCHITECTURES = IA32 X64 IPF 25 | # 26 | 27 | [Sources] 28 | testfont.cpp 29 | 30 | [Packages] 31 | MdePkg/MdePkg.dec 32 | MdeModulePkg/MdeModulePkg.dec 33 | 34 | [LibraryClasses] 35 | UefiApplicationEntryPoint 36 | PrintLib 37 | UefiLib 38 | HiiLib 39 | BaseMemoryLib 40 | 41 | [Protocols] 42 | gEfiPciIoProtocolGuid 43 | gEfiGraphicsOutputProtocolGuid 44 | gEfiHiiDatabaseProtocolGuid 45 | gEfiHiiImageProtocolGuid 46 | gEfiHiiConfigRoutingProtocolGuid 47 | gEfiHiiStringProtocolGuid 48 | gEfiSimplePointerProtocolGuid 49 | gEfiGraphicsOutputProtocolGuid 50 | gEfiHiiFontProtocolGuid 51 | [BuildOptions] 52 | GCC:*_*_IA32_CC_FLAGS = -O2 53 | MSFT:*_*_*_CC_FLAGS = -DNEFI_SHELL_FILE_PROTOCOL -DUSE_SIMPLE_STDIO /GL- /wd4804 /wd4201 /Oi- /FAs 54 | 55 | -------------------------------------------------------------------------------- /book/GUIbasics/font/testSimpleFont/testfont.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ===================================================================================== 3 | * 4 | * Filename: main.c 5 | * 6 | * Description: 7 | * 8 | * Version: 1.0 9 | * Created: 02/19/2013 08:22:52 PM 10 | * Revision: none 11 | * Compiler: gcc 12 | * 13 | * Author: DAI ZHENGHUA (), djx.zhenghua@gmail.com 14 | * Company: 15 | * 16 | * ===================================================================================== 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | 27 | EFI_STATUS 28 | EFIAPI 29 | UefiMain( 30 | IN EFI_HANDLE ImageHandle, 31 | IN EFI_SYSTEM_TABLE *SystemTable 32 | ) 33 | { 34 | EFI_STATUS Status = 0; 35 | Print((const CHAR16*)L" 您好UEFI Font"); 36 | return Status; 37 | } 38 | -------------------------------------------------------------------------------- /book/GUIbasics/font/testSimpleFont/testfont.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ===================================================================================== 3 | * 4 | * Filename: main.c 5 | * 6 | * Description: 7 | * 8 | * Version: 1.0 9 | * Created: 02/19/2013 08:22:52 PM 10 | * Revision: none 11 | * Compiler: gcc 12 | * 13 | * Author: DAI ZHENGHUA (), djx.zhenghua@gmail.com 14 | * Company: 15 | * 16 | * ===================================================================================== 17 | */ 18 | 19 | extern "C" 20 | { 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | } 29 | 30 | EFI_STATUS 31 | EFIAPI 32 | UefiMain( 33 | IN EFI_HANDLE ImageHandle, 34 | IN EFI_SYSTEM_TABLE *SystemTable 35 | ) 36 | { 37 | EFI_STATUS Status = 0; 38 | Print((const CHAR16*)L" 您好UEFI Font"); 39 | Print((const CHAR16*)L" offset %x\n", ((EFI_HII_FONT_PACKAGE_HDR*)0)->FontFamily); 40 | return Status; 41 | } 42 | -------------------------------------------------------------------------------- /book/GUIbasics/font/testSimpleFont/testfont.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = testfont 18 | FILE_GUID = 4ea97c46-7491-4dfd-b442-74798713ce5f 19 | VERSION_STRING = 0.1 20 | #MODULE_TYPE = UEFI_DRIVER 21 | MODULE_TYPE = UEFI_APPLICATION 22 | ENTRY_POINT = UefiMain 23 | # 24 | # VALID_ARCHITECTURES = IA32 X64 IPF 25 | # 26 | 27 | [Sources] 28 | testfont.cpp 29 | 30 | [Packages] 31 | MdePkg/MdePkg.dec 32 | MdeModulePkg/MdeModulePkg.dec 33 | 34 | [LibraryClasses] 35 | UefiApplicationEntryPoint 36 | PrintLib 37 | UefiLib 38 | HiiLib 39 | BaseMemoryLib 40 | UefiHiiServicesLib 41 | 42 | [Protocols] 43 | gEfiPciIoProtocolGuid 44 | gEfiGraphicsOutputProtocolGuid 45 | gEfiHiiDatabaseProtocolGuid 46 | gEfiHiiImageProtocolGuid 47 | gEfiHiiConfigRoutingProtocolGuid 48 | gEfiHiiStringProtocolGuid 49 | gEfiSimplePointerProtocolGuid 50 | 51 | [BuildOptions] 52 | GCC:*_*_IA32_CC_FLAGS = -O2 53 | MSFT:*_*_*_CC_FLAGS = -DNEFI_SHELL_FILE_PROTOCOL -DUSE_SIMPLE_STDIO /GL- /wd4804 /wd4201 /Oi- /FAs 54 | 55 | -------------------------------------------------------------------------------- /book/GcppPkg/GcppPkg.dec: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # This is the Unix Emulation Environment Platform 4 | # 5 | # Reference platform implementation using an emulator. 6 | # Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made available 9 | # under the terms and conditions of the BSD License which accompanies this distribution. 10 | # The full text of the license may be found at http://opensource.org/licenses/bsd-license.php 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES 12 | # OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | [Defines] 17 | DEC_SPECIFICATION = 0x00010005 18 | PACKAGE_NAME = EdkGCppPkg 19 | PACKAGE_GUID = e2805c44-8985-11db-9e98-0040d0c0d0cc 20 | PACKAGE_VERSION = 1.0 21 | 22 | [Includes] 23 | Include 24 | Include/parallel 25 | 26 | [Includes.IA32] 27 | Include/i486-linux-gnu 28 | [LibraryClasses] 29 | 30 | [Guids] 31 | [Ppis] 32 | 33 | [Protocols] 34 | 35 | [PcdsFixedAtBuild] 36 | [PcdsFixedAtBuild, PcdsPatchableInModule] 37 | 38 | [PcdsDynamic, PcdsDynamicEx] 39 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/bits/cmath.tcc: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- C math library. 2 | 3 | // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | // This file was written by Gabriel Dos Reis 27 | 28 | /** @file cmath.tcc 29 | * This is a Standard C++ Library file. 30 | */ 31 | 32 | #ifndef _GLIBCXX_CMATH_TCC 33 | #define _GLIBCXX_CMATH_TCC 1 34 | 35 | _GLIBCXX_BEGIN_NAMESPACE(std) 36 | 37 | template 38 | inline _Tp 39 | __cmath_power(_Tp __x, unsigned int __n) 40 | { 41 | _Tp __y = __n % 2 ? __x : _Tp(1); 42 | 43 | while (__n >>= 1) 44 | { 45 | __x = __x * __x; 46 | if (__n % 2) 47 | __y = __y * __x; 48 | } 49 | 50 | return __y; 51 | } 52 | 53 | _GLIBCXX_END_NAMESPACE 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/c++0x_warning.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 2 | // 3 | // This file is part of the GNU ISO C++ Library. This library is free 4 | // software; you can redistribute it and/or modify it under the 5 | // terms of the GNU General Public License as published by the 6 | // Free Software Foundation; either version 3, or (at your option) 7 | // any later version. 8 | 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | 14 | // Under Section 7 of GPL version 3, you are granted additional 15 | // permissions described in the GCC Runtime Library Exception, version 16 | // 3.1, as published by the Free Software Foundation. 17 | 18 | // You should have received a copy of the GNU General Public License and 19 | // a copy of the GCC Runtime Library Exception along with this program; 20 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 21 | // . 22 | 23 | /** @file include/c++0x_warning.h 24 | * This is a Standard C++ Library header. 25 | */ 26 | 27 | #ifndef _CXX0X_WARNING_H 28 | #define _CXX0X_WARNING_H 1 29 | 30 | #ifndef __GXX_EXPERIMENTAL_CXX0X__ 31 | #error This file requires compiler and library support for the upcoming \ 32 | ISO C++ standard, C++0x. This support is currently experimental, and must be \ 33 | enabled with the -std=c++0x or -std=gnu++0x compiler options. 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/cassert: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 4 | // 2006, 2007, 2008, 2009 5 | // Free Software Foundation, Inc. 6 | // 7 | // This file is part of the GNU ISO C++ Library. This library is free 8 | // software; you can redistribute it and/or modify it under the 9 | // terms of the GNU General Public License as published by the 10 | // Free Software Foundation; either version 3, or (at your option) 11 | // any later version. 12 | 13 | // This library is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | 18 | // Under Section 7 of GPL version 3, you are granted additional 19 | // permissions described in the GCC Runtime Library Exception, version 20 | // 3.1, as published by the Free Software Foundation. 21 | 22 | // You should have received a copy of the GNU General Public License and 23 | // a copy of the GCC Runtime Library Exception along with this program; 24 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 25 | // . 26 | 27 | /** @file cassert 28 | * This is a Standard C++ Library file. You should @c #include this file 29 | * in your programs, rather than any of the "*.h" implementation files. 30 | * 31 | * This is the C++ version of the Standard C Library header @c assert.h, 32 | * and its contents are (mostly) the same as that header, but are all 33 | * contained in the namespace @c std (except for names which are defined 34 | * as macros in C). 35 | */ 36 | 37 | // 38 | // ISO C++ 14882: 19.2 Assertions 39 | // 40 | 41 | // No include guards on this header... 42 | 43 | #pragma GCC system_header 44 | 45 | #include 46 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/ccomplex: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file include/ccomplex 26 | * This is a Standard C++ Library header. 27 | */ 28 | 29 | #pragma GCC system_header 30 | 31 | #ifndef _GLIBCXX_CCOMPLEX 32 | #define _GLIBCXX_CCOMPLEX 1 33 | 34 | #ifndef __GXX_EXPERIMENTAL_CXX0X__ 35 | # include 36 | #endif 37 | 38 | #if defined(_GLIBCXX_INCLUDE_AS_TR1) 39 | # error C++0x header cannot be included from TR1 header 40 | #endif 41 | 42 | #include 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/cerrno: -------------------------------------------------------------------------------- 1 | // The -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 4 | // 2006, 2007, 2008, 2009 5 | // Free Software Foundation, Inc. 6 | // 7 | // This file is part of the GNU ISO C++ Library. This library is free 8 | // software; you can redistribute it and/or modify it under the 9 | // terms of the GNU General Public License as published by the 10 | // Free Software Foundation; either version 3, or (at your option) 11 | // any later version. 12 | 13 | // This library is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | 18 | // Under Section 7 of GPL version 3, you are granted additional 19 | // permissions described in the GCC Runtime Library Exception, version 20 | // 3.1, as published by the Free Software Foundation. 21 | 22 | // You should have received a copy of the GNU General Public License and 23 | // a copy of the GCC Runtime Library Exception along with this program; 24 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 25 | // . 26 | 27 | /** @file cerrno 28 | * This is a Standard C++ Library file. You should @c #include this file 29 | * in your programs, rather than any of the "*.h" implementation files. 30 | * 31 | * This is the C++ version of the Standard C Library header @c errno.h, 32 | * and its contents are (mostly) the same as that header, but are all 33 | * contained in the namespace @c std (except for names which are defined 34 | * as macros in C). 35 | */ 36 | 37 | // 38 | // ISO C++ 14882: 19.3 Error numbers 39 | // 40 | 41 | #pragma GCC system_header 42 | 43 | #include 44 | 45 | #ifndef _GLIBCXX_CERRNO 46 | #define _GLIBCXX_CERRNO 1 47 | 48 | // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 49 | #ifndef errno 50 | #define errno errno 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/ciso646: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file ciso646 26 | * This is a Standard C++ Library file. You should @c #include this file 27 | * in your programs, rather than any of the "*.h" implementation files. 28 | * 29 | * This is the C++ version of the Standard C Library header @c iso646.h, 30 | * and its contents are (mostly) the same as that header, but are all 31 | * contained in the namespace @c std (except for names which are defined 32 | * as macros in C). 33 | */ 34 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/complex.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- compatibility header. 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file complex.h 26 | * This is a Standard C++ Library header. 27 | */ 28 | 29 | #include 30 | 31 | #ifdef __GXX_EXPERIMENTAL_CXX0X__ 32 | # include 33 | #else 34 | # if _GLIBCXX_HAVE_COMPLEX_H 35 | # include_next 36 | # endif 37 | #endif 38 | 39 | #ifndef _GLIBCXX_COMPLEX_H 40 | #define _GLIBCXX_COMPLEX_H 1 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/cstdbool: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file include/cstdbool 26 | * This is a Standard C++ Library header. 27 | */ 28 | 29 | #pragma GCC system_header 30 | 31 | #ifndef _GLIBCXX_CSTDBOOL 32 | #define _GLIBCXX_CSTDBOOL 1 33 | 34 | #ifndef __GXX_EXPERIMENTAL_CXX0X__ 35 | # include 36 | #else 37 | # include 38 | # if _GLIBCXX_HAVE_STDBOOL_H 39 | # include 40 | # endif 41 | #endif 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/ctgmath: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file include/ctgmath 26 | * This is a Standard C++ Library header. 27 | */ 28 | 29 | #pragma GCC system_header 30 | 31 | #ifndef _GLIBCXX_CTGMATH 32 | #define _GLIBCXX_CTGMATH 1 33 | 34 | #ifndef __GXX_EXPERIMENTAL_CXX0X__ 35 | # include 36 | #else 37 | # include 38 | #endif 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/cxxabi-forced.h: -------------------------------------------------------------------------------- 1 | // cxxabi.h subset for inclusion by other library headers -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of GCC. 6 | // 7 | // GCC is free software; you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | // 12 | // GCC is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | #ifndef _CXXABI_FORCED_H 27 | #define _CXXABI_FORCED_H 1 28 | 29 | #pragma GCC visibility push(default) 30 | 31 | #ifdef __cplusplus 32 | namespace __cxxabiv1 33 | { 34 | /** 35 | * @brief Thrown as part of forced unwinding. 36 | * @ingroup exceptions 37 | * 38 | * A magic placeholder class that can be caught by reference to 39 | * recognize forced unwinding. 40 | */ 41 | class __forced_unwind 42 | { 43 | virtual ~__forced_unwind() throw(); 44 | virtual void __pure_dummy() = 0; // prevent catch by value 45 | }; 46 | } 47 | #endif // __cplusplus 48 | 49 | #pragma GCC visibility pop 50 | 51 | #endif // __CXXABI_FORCED_H 52 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/debug/map: -------------------------------------------------------------------------------- 1 | // Debugging map/multimap implementation -*- C++ -*- 2 | 3 | // Copyright (C) 2003, 2006, 2009 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | /** @file debug/map 27 | * This file is a GNU debug extension to the Standard C++ Library. 28 | */ 29 | 30 | #ifndef _GLIBCXX_DEBUG_MAP 31 | #define _GLIBCXX_DEBUG_MAP 1 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/debug/set: -------------------------------------------------------------------------------- 1 | // Debugging set/multiset implementation -*- C++ -*- 2 | 3 | // Copyright (C) 2003, 2009 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | /** @file debug/set 27 | * This file is a GNU debug extension to the Standard C++ Library. 28 | */ 29 | 30 | #ifndef _GLIBCXX_DEBUG_SET 31 | #define _GLIBCXX_DEBUG_SET 1 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/exception_defines.h: -------------------------------------------------------------------------------- 1 | // -fno-exceptions Support -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2006, 2007, 2008, 2009 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | // 27 | // ISO C++ 14882: 19.1 Exception classes 28 | // 29 | 30 | /** @file exception_defines.h 31 | * This is a Standard C++ Library header. 32 | */ 33 | 34 | #ifndef _EXCEPTION_DEFINES_H 35 | #define _EXCEPTION_DEFINES_H 1 36 | 37 | #ifndef __EXCEPTIONS 38 | // Iff -fno-exceptions, transform error handling code to work without it. 39 | # define __try if (true) 40 | # define __catch(X) if (false) 41 | # define __throw_exception_again 42 | #else 43 | // Else proceed normally. 44 | # define __try try 45 | # define __catch(X) catch(X) 46 | # define __throw_exception_again throw 47 | #endif 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the terms 7 | // of the GNU General Public License as published by the Free Software 8 | // Foundation; either version 3, or (at your option) any later 9 | // version. 10 | 11 | // This library is distributed in the hope that it will be useful, but 12 | // WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. 26 | 27 | // Permission to use, copy, modify, sell, and distribute this software 28 | // is hereby granted without fee, provided that the above copyright 29 | // notice appears in all copies, and that both that copyright notice 30 | // and this permission notice appear in supporting documentation. None 31 | // of the above authors, nor IBM Haifa Research Laboratories, make any 32 | // representation about the suitability of this software for any 33 | // purpose. It is provided "as is" without express or implied 34 | // warranty. 35 | 36 | /** 37 | * @file find_store_hash_fn_imps.hpp 38 | * Contains implementations of cc_ht_map_'s find related functions, 39 | * when the hash value is stored. 40 | */ 41 | 42 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the terms 7 | // of the GNU General Public License as published by the Free Software 8 | // Foundation; either version 3, or (at your option) any later 9 | // version. 10 | 11 | // This library is distributed in the hope that it will be useful, but 12 | // WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. 26 | 27 | // Permission to use, copy, modify, sell, and distribute this software 28 | // is hereby granted without fee, provided that the above copyright 29 | // notice appears in all copies, and that both that copyright notice 30 | // and this permission notice appear in supporting documentation. None 31 | // of the above authors, nor IBM Haifa Research Laboratories, make any 32 | // representation about the suitability of this software for any 33 | // purpose. It is provided "as is" without express or implied 34 | // warranty. 35 | 36 | /** 37 | * @file find_store_hash_fn_imps.hpp 38 | * Contains implementations of gp_ht_map_'s insert related functions, 39 | * when the hash value is stored. 40 | */ 41 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the terms 7 | // of the GNU General Public License as published by the Free Software 8 | // Foundation; either version 3, or (at your option) any later 9 | // version. 10 | 11 | // This library is distributed in the hope that it will be useful, but 12 | // WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. 26 | 27 | // Permission to use, copy, modify, sell, and distribute this software 28 | // is hereby granted without fee, provided that the above copyright 29 | // notice appears in all copies, and that both that copyright notice 30 | // and this permission notice appear in supporting documentation. None 31 | // of the above authors, nor IBM Haifa Research Laboratories, make any 32 | // representation about the suitability of this software for any 33 | // purpose. It is provided "as is" without express or implied 34 | // warranty. 35 | 36 | /** 37 | * @file find_fn_imps.hpp 38 | * Contains an implementation for rb_tree_. 39 | */ 40 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the terms 7 | // of the GNU General Public License as published by the Free Software 8 | // Foundation; either version 3, or (at your option) any later 9 | // version. 10 | 11 | // This library is distributed in the hope that it will be useful, but 12 | // WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. 26 | 27 | // Permission to use, copy, modify, sell, and distribute this software 28 | // is hereby granted without fee, provided that the above copyright 29 | // notice appears in all copies, and that both that copyright notice 30 | // and this permission notice appear in supporting documentation. None 31 | // of the above authors, nor IBM Haifa Research Laboratories, make any 32 | // representation about the suitability of this software for any 33 | // purpose. It is provided "as is" without express or implied 34 | // warranty. 35 | 36 | /** 37 | * @file info_fn_imps.hpp 38 | * Contains an implementation for rb_tree_. 39 | */ 40 | 41 | PB_DS_CLASS_T_DEC 42 | inline bool 43 | PB_DS_CLASS_C_DEC:: 44 | is_effectively_black(const node_pointer p_nd) 45 | { return (p_nd == NULL || !p_nd->m_red); } 46 | 47 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the terms 7 | // of the GNU General Public License as published by the Free Software 8 | // Foundation; either version 3, or (at your option) any later 9 | // version. 10 | 11 | // This library is distributed in the hope that it will be useful, but 12 | // WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. 26 | 27 | // Permission to use, copy, modify, sell, and distribute this software 28 | // is hereby granted without fee, provided that the above copyright 29 | // notice appears in all copies, and that both that copyright notice 30 | // and this permission notice appear in supporting documentation. None 31 | // of the above authors, nor IBM Haifa Research Laboratories, make any 32 | // representation about the suitability of this software for any 33 | // purpose. It is provided "as is" without express or implied 34 | // warranty. 35 | 36 | /** 37 | * @file info_fn_imps.hpp 38 | * Contains an implementation. 39 | */ 40 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/forward_list: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2008, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file forward_list 26 | * This is a Standard C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_FORWARD_LIST 30 | #define _GLIBCXX_FORWARD_LIST 1 31 | 32 | #pragma GCC system_header 33 | 34 | #ifndef __GXX_EXPERIMENTAL_CXX0X__ 35 | # include 36 | #else 37 | 38 | #include 39 | 40 | #ifndef _GLIBCXX_EXPORT_TEMPLATE 41 | # include 42 | #endif 43 | 44 | #endif // __GXX_EXPERIMENTAL_CXX0X__ 45 | 46 | #endif // _GLIBCXX_FORWARD_LIST 47 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/64/bits/c++allocator.h: -------------------------------------------------------------------------------- 1 | // Base to std::allocator -*- C++ -*- 2 | 3 | // Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file c++allocator.h 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #ifndef _GLIBCXX_CXX_ALLOCATOR_H 31 | #define _GLIBCXX_CXX_ALLOCATOR_H 1 32 | 33 | // Define new_allocator as the base class to std::allocator. 34 | #include 35 | #define __glibcxx_base_allocator __gnu_cxx::new_allocator 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/64/bits/c++io.h: -------------------------------------------------------------------------------- 1 | // Underlying io library details -*- C++ -*- 2 | 3 | // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | /** @file c++io.h 27 | * This is an internal header file, included by other library headers. 28 | * You should not attempt to use it directly. 29 | */ 30 | 31 | // c_io_stdio.h - Defines for using "C" stdio.h 32 | 33 | #ifndef _GLIBCXX_CXX_IO_H 34 | #define _GLIBCXX_CXX_IO_H 1 35 | 36 | #include 37 | #include 38 | #include 39 | 40 | _GLIBCXX_BEGIN_NAMESPACE(std) 41 | 42 | typedef __gthread_mutex_t __c_lock; 43 | 44 | // for basic_file.h 45 | typedef FILE __c_file; 46 | 47 | _GLIBCXX_END_NAMESPACE 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/64/bits/cpu_defines.h: -------------------------------------------------------------------------------- 1 | // Specific definitions for generic platforms -*- C++ -*- 2 | 3 | // Copyright (C) 2005, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file cpu_defines.h 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #ifndef _GLIBCXX_CPU_DEFINES 31 | #define _GLIBCXX_CPU_DEFINES 1 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/64/bits/os_defines.h: -------------------------------------------------------------------------------- 1 | // Specific definitions for GNU/Linux -*- C++ -*- 2 | 3 | // Copyright (C) 2000, 2001, 2002, 2003, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file os_defines.h 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #ifndef _GLIBCXX_OS_DEFINES 31 | #define _GLIBCXX_OS_DEFINES 1 32 | 33 | // System-specific #define, typedefs, corrections, etc, go here. This 34 | // file will come before all others. 35 | 36 | // This keeps isanum, et al from being propagated as macros. 37 | #define __NO_CTYPE 1 38 | 39 | #include 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/64/bits/stdtr1c++.h: -------------------------------------------------------------------------------- 1 | // C++ includes used for precompiling TR1 -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file stdtr1c++.h 26 | * This is an implementation file for a precompiled header. 27 | */ 28 | 29 | #include 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/bits/c++allocator.h: -------------------------------------------------------------------------------- 1 | // Base to std::allocator -*- C++ -*- 2 | 3 | // Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file c++allocator.h 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #ifndef _GLIBCXX_CXX_ALLOCATOR_H 31 | #define _GLIBCXX_CXX_ALLOCATOR_H 1 32 | 33 | // Define new_allocator as the base class to std::allocator. 34 | #include 35 | #define __glibcxx_base_allocator __gnu_cxx::new_allocator 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/bits/c++io.h: -------------------------------------------------------------------------------- 1 | // Underlying io library details -*- C++ -*- 2 | 3 | // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | /** @file c++io.h 27 | * This is an internal header file, included by other library headers. 28 | * You should not attempt to use it directly. 29 | */ 30 | 31 | // c_io_stdio.h - Defines for using "C" stdio.h 32 | 33 | #ifndef _GLIBCXX_CXX_IO_H 34 | #define _GLIBCXX_CXX_IO_H 1 35 | 36 | #include 37 | #include 38 | #include 39 | 40 | _GLIBCXX_BEGIN_NAMESPACE(std) 41 | 42 | typedef __gthread_mutex_t __c_lock; 43 | 44 | // for basic_file.h 45 | typedef FILE __c_file; 46 | 47 | _GLIBCXX_END_NAMESPACE 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/bits/cpu_defines.h: -------------------------------------------------------------------------------- 1 | // Specific definitions for generic platforms -*- C++ -*- 2 | 3 | // Copyright (C) 2005, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file cpu_defines.h 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #ifndef _GLIBCXX_CPU_DEFINES 31 | #define _GLIBCXX_CPU_DEFINES 1 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/bits/os_defines.h: -------------------------------------------------------------------------------- 1 | // Specific definitions for GNU/Linux -*- C++ -*- 2 | 3 | // Copyright (C) 2000, 2001, 2002, 2003, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file os_defines.h 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #ifndef _GLIBCXX_OS_DEFINES 31 | #define _GLIBCXX_OS_DEFINES 1 32 | 33 | // System-specific #define, typedefs, corrections, etc, go here. This 34 | // file will come before all others. 35 | 36 | // This keeps isanum, et al from being propagated as macros. 37 | #define __NO_CTYPE 1 38 | 39 | #include 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/i486-linux-gnu/bits/stdtr1c++.h: -------------------------------------------------------------------------------- 1 | // C++ includes used for precompiling TR1 -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file stdtr1c++.h 26 | * This is an implementation file for a precompiled header. 27 | */ 28 | 29 | #include 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/ios: -------------------------------------------------------------------------------- 1 | // Iostreams base classes -*- C++ -*- 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 | // 2005, 2006, 2007, 2009 Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | /** @file ios 27 | * This is a Standard C++ Library header. 28 | */ 29 | 30 | // 31 | // ISO C++ 14882: 27.4 Iostreams base classes 32 | // 33 | 34 | #ifndef _GLIBCXX_IOS 35 | #define _GLIBCXX_IOS 1 36 | 37 | #pragma GCC system_header 38 | 39 | #include 40 | #include // For ios_base::failure 41 | #include // For char_traits, streamoff, streamsize, fpos 42 | #include // For class locale 43 | #include // For ios_base declarations. 44 | #include 45 | #include 46 | 47 | #endif /* _GLIBCXX_IOS */ 48 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/locale: -------------------------------------------------------------------------------- 1 | // Locale support -*- C++ -*- 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // 2006, 2007, 2009 5 | // Free Software Foundation, Inc. 6 | // 7 | // This file is part of the GNU ISO C++ Library. This library is free 8 | // software; you can redistribute it and/or modify it under the 9 | // terms of the GNU General Public License as published by the 10 | // Free Software Foundation; either version 3, or (at your option) 11 | // any later version. 12 | 13 | // This library is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | 18 | // Under Section 7 of GPL version 3, you are granted additional 19 | // permissions described in the GCC Runtime Library Exception, version 20 | // 3.1, as published by the Free Software Foundation. 21 | 22 | // You should have received a copy of the GNU General Public License and 23 | // a copy of the GCC Runtime Library Exception along with this program; 24 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 25 | // . 26 | 27 | // 28 | // ISO C++ 14882: 22.1 Locales 29 | // 30 | 31 | /** @file locale 32 | * This is a Standard C++ Library header. 33 | */ 34 | 35 | #ifndef _GLIBCXX_LOCALE 36 | #define _GLIBCXX_LOCALE 1 37 | 38 | #pragma GCC system_header 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #endif /* _GLIBCXX_LOCALE */ 46 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/parallel/algorithm: -------------------------------------------------------------------------------- 1 | // Algorithm extensions -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | /** @file parallel/algorithm 27 | * This file is a GNU extension to the Standard C++ Library. 28 | */ 29 | 30 | #ifndef _PARALLEL_ALGORITHM 31 | #define _PARALLEL_ALGORITHM 1 32 | 33 | #pragma GCC system_header 34 | 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/parallel/basic_iterator.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the terms 7 | // of the GNU General Public License as published by the Free Software 8 | // Foundation; either version 3, or (at your option) any later 9 | // version. 10 | 11 | // This library is distributed in the hope that it will be useful, but 12 | // WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file parallel/basic_iterator.h 26 | * @brief Includes the original header files concerned with iterators 27 | * except for stream iterators. 28 | * This file is a GNU parallel extension to the Standard C++ Library. 29 | */ 30 | 31 | // Written by Johannes Singler. 32 | 33 | #ifndef _GLIBCXX_PARALLEL_BASIC_ITERATOR_H 34 | #define _GLIBCXX_PARALLEL_BASIC_ITERATOR_H 1 35 | 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | #endif /* _GLIBCXX_PARALLEL_BASIC_ITERATOR_H */ 43 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/parallel/parallel.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the terms 7 | // of the GNU General Public License as published by the Free Software 8 | // Foundation; either version 3, or (at your option) any later 9 | // version. 10 | 11 | // This library is distributed in the hope that it will be useful, but 12 | // WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file parallel/parallel.h 26 | * @brief End-user include file. Provides advanced settings and 27 | * tuning options. 28 | * This file is a GNU parallel extension to the Standard C++ Library. 29 | */ 30 | 31 | // Written by Felix Putze and Johannes Singler. 32 | 33 | #ifndef _GLIBCXX_PARALLEL_PARALLEL_H 34 | #define _GLIBCXX_PARALLEL_PARALLEL_H 1 35 | 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | #endif /* _GLIBCXX_PARALLEL_PARALLEL_H */ 43 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tgmath.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- compatibility header. 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tgmath.h 26 | * This is a Standard C++ Library header. 27 | */ 28 | 29 | #include 30 | 31 | #ifdef __GXX_EXPERIMENTAL_CXX0X__ 32 | # include 33 | #else 34 | # if _GLIBCXX_HAVE_TGMATH_H 35 | # include_next 36 | # endif 37 | #endif 38 | 39 | #ifndef _GLIBCXX_TGMATH_H 40 | #define _GLIBCXX_TGMATH_H 1 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/array: -------------------------------------------------------------------------------- 1 | // class template array -*- C++ -*- 2 | 3 | // Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/array 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_ARRAY 30 | #define _GLIBCXX_TR1_ARRAY 1 31 | 32 | #pragma GCC system_header 33 | 34 | #if defined(_GLIBCXX_INCLUDE_AS_CXX0X) 35 | # error TR1 header cannot be included from C++0x header 36 | #endif 37 | 38 | #include 39 | 40 | #if defined(_GLIBCXX_INCLUDE_AS_TR1) 41 | # include 42 | #else 43 | # define _GLIBCXX_INCLUDE_AS_TR1 44 | # define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 { 45 | # define _GLIBCXX_END_NAMESPACE_TR1 } 46 | # define _GLIBCXX_TR1 tr1:: 47 | # include 48 | # undef _GLIBCXX_TR1 49 | # undef _GLIBCXX_END_NAMESPACE_TR1 50 | # undef _GLIBCXX_BEGIN_NAMESPACE_TR1 51 | # undef _GLIBCXX_INCLUDE_AS_TR1 52 | #endif 53 | 54 | #endif // _GLIBCXX_TR1_ARRAY 55 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/ccomplex: -------------------------------------------------------------------------------- 1 | // TR1 ccomplex -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/ccomplex 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CCOMPLEX 30 | #define _GLIBCXX_TR1_CCOMPLEX 1 31 | 32 | #include 33 | 34 | #endif // _GLIBCXX_TR1_CCOMPLEX 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/cctype: -------------------------------------------------------------------------------- 1 | // TR1 cctype -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/cctype 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CCTYPE 30 | #define _GLIBCXX_TR1_CCTYPE 1 31 | 32 | #include 33 | #include 34 | 35 | #if defined(_GLIBCXX_INCLUDE_AS_TR1) 36 | # include 37 | #else 38 | # define _GLIBCXX_INCLUDE_AS_TR1 39 | # define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 { 40 | # define _GLIBCXX_END_NAMESPACE_TR1 } 41 | # define _GLIBCXX_TR1 tr1:: 42 | # include 43 | # undef _GLIBCXX_TR1 44 | # undef _GLIBCXX_END_NAMESPACE_TR1 45 | # undef _GLIBCXX_BEGIN_NAMESPACE_TR1 46 | # undef _GLIBCXX_INCLUDE_AS_TR1 47 | #endif 48 | 49 | #endif // _GLIBCXX_TR1_CCTYPE 50 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/cfenv: -------------------------------------------------------------------------------- 1 | // TR1 cfenv -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/cfenv 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CFENV 30 | #define _GLIBCXX_TR1_CFENV 1 31 | 32 | #pragma GCC system_header 33 | 34 | #include 35 | #if _GLIBCXX_HAVE_FENV_H 36 | # include 37 | #endif 38 | 39 | #if defined(_GLIBCXX_INCLUDE_AS_TR1) 40 | # include 41 | #else 42 | # define _GLIBCXX_INCLUDE_AS_TR1 43 | # define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 { 44 | # define _GLIBCXX_END_NAMESPACE_TR1 } 45 | # define _GLIBCXX_TR1 tr1:: 46 | # include 47 | # undef _GLIBCXX_TR1 48 | # undef _GLIBCXX_END_NAMESPACE_TR1 49 | # undef _GLIBCXX_BEGIN_NAMESPACE_TR1 50 | # undef _GLIBCXX_INCLUDE_AS_TR1 51 | #endif 52 | 53 | #endif // _GLIBCXX_TR1_CFENV 54 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/cfloat: -------------------------------------------------------------------------------- 1 | // TR1 cfloat -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/cfloat 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CFLOAT 30 | #define _GLIBCXX_TR1_CFLOAT 1 31 | 32 | #include 33 | 34 | #ifndef DECIMAL_DIG 35 | #define DECIMAL_DIG __DECIMAL_DIG__ 36 | #endif 37 | 38 | #ifndef FLT_EVAL_METHOD 39 | #define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ 40 | #endif 41 | 42 | #endif //_GLIBCXX_TR1_CFLOAT 43 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/climits: -------------------------------------------------------------------------------- 1 | // TR1 climits -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/climits 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CLIMITS 30 | #define _GLIBCXX_TR1_CLIMITS 1 31 | 32 | #include 33 | 34 | #ifndef LLONG_MIN 35 | #define LLONG_MIN (-__LONG_LONG_MAX__ - 1) 36 | #endif 37 | 38 | #ifndef LLONG_MAX 39 | #define LLONG_MAX __LONG_LONG_MAX__ 40 | #endif 41 | 42 | #ifndef ULLONG_MAX 43 | #define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1) 44 | #endif 45 | 46 | #endif // _GLIBCXX_TR1_CLIMITS 47 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/complex.h: -------------------------------------------------------------------------------- 1 | // TR1 complex.h -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/complex.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_COMPLEX_H 30 | #define _GLIBCXX_TR1_COMPLEX_H 1 31 | 32 | #include 33 | 34 | #endif // _GLIBCXX_TR1_COMPLEX_H 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/cstdarg: -------------------------------------------------------------------------------- 1 | // TR1 cstdarg -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/cstdarg 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CSTDARG 30 | #define _GLIBCXX_TR1_CSTDARG 1 31 | 32 | #include 33 | 34 | #endif // _GLIBCXX_TR1_CSTDARG 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/cstdbool: -------------------------------------------------------------------------------- 1 | // TR1 cstdbool -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/cstdbool 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CSTDBOOL 30 | #define _GLIBCXX_TR1_CSTDBOOL 1 31 | 32 | #pragma GCC system_header 33 | 34 | #include 35 | 36 | #if _GLIBCXX_HAVE_STDBOOL_H 37 | #include 38 | #endif 39 | 40 | #endif // _GLIBCXX_TR1_CSTDBOOL 41 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/cstdio: -------------------------------------------------------------------------------- 1 | // TR1 cstdio -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/cstdio 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CSTDIO 30 | #define _GLIBCXX_TR1_CSTDIO 1 31 | 32 | #pragma GCC system_header 33 | 34 | #if defined(_GLIBCXX_INCLUDE_AS_CXX0X) 35 | # error TR1 header cannot be included from C++0x header 36 | #endif 37 | 38 | #include 39 | 40 | #if defined(_GLIBCXX_INCLUDE_AS_TR1) 41 | # include 42 | #else 43 | # define _GLIBCXX_INCLUDE_AS_TR1 44 | # define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 { 45 | # define _GLIBCXX_END_NAMESPACE_TR1 } 46 | # define _GLIBCXX_TR1 tr1:: 47 | # include 48 | # undef _GLIBCXX_TR1 49 | # undef _GLIBCXX_END_NAMESPACE_TR1 50 | # undef _GLIBCXX_BEGIN_NAMESPACE_TR1 51 | # undef _GLIBCXX_INCLUDE_AS_TR1 52 | #endif 53 | 54 | #endif // _GLIBCXX_TR1_CSTDIO 55 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/cstdlib: -------------------------------------------------------------------------------- 1 | // TR1 cstdlib -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/cstdlib 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CSTDLIB 30 | #define _GLIBCXX_TR1_CSTDLIB 1 31 | 32 | #pragma GCC system_header 33 | 34 | #if defined(_GLIBCXX_INCLUDE_AS_CXX0X) 35 | # error TR1 header cannot be included from C++0x header 36 | #endif 37 | 38 | #include 39 | 40 | #if defined(_GLIBCXX_INCLUDE_AS_TR1) 41 | # include 42 | #else 43 | # define _GLIBCXX_INCLUDE_AS_TR1 44 | # define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 { 45 | # define _GLIBCXX_END_NAMESPACE_TR1 } 46 | # define _GLIBCXX_TR1 tr1:: 47 | # include 48 | # undef _GLIBCXX_TR1 49 | # undef _GLIBCXX_END_NAMESPACE_TR1 50 | # undef _GLIBCXX_BEGIN_NAMESPACE_TR1 51 | # undef _GLIBCXX_INCLUDE_AS_TR1 52 | #endif 53 | 54 | #endif // _GLIBCXX_TR1_CSTDLIB 55 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/ctgmath: -------------------------------------------------------------------------------- 1 | // TR1 ctgmath -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/ctgmath 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CTGMATH 30 | #define _GLIBCXX_TR1_CTGMATH 1 31 | 32 | #include 33 | 34 | #endif // _GLIBCXX_TR1_CTGMATH 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/ctime: -------------------------------------------------------------------------------- 1 | // TR1 ctime -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/ctime 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CTIME 30 | #define _GLIBCXX_TR1_CTIME 1 31 | 32 | #include 33 | 34 | #endif // _GLIBCXX_TR1_CTIME 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/ctype.h: -------------------------------------------------------------------------------- 1 | // TR1 ctype.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/ctype.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _TR1_CTYPE_H 30 | #define _TR1_CTYPE_H 1 31 | 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/cwchar: -------------------------------------------------------------------------------- 1 | // TR1 cwchar -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/cwchar 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CWCHAR 30 | #define _GLIBCXX_TR1_CWCHAR 1 31 | 32 | #pragma GCC system_header 33 | 34 | #if defined(_GLIBCXX_INCLUDE_AS_CXX0X) 35 | # error TR1 header cannot be included from C++0x header 36 | #endif 37 | 38 | #include 39 | 40 | #if defined(_GLIBCXX_INCLUDE_AS_TR1) 41 | # include 42 | #else 43 | # define _GLIBCXX_INCLUDE_AS_TR1 44 | # define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 { 45 | # define _GLIBCXX_END_NAMESPACE_TR1 } 46 | # define _GLIBCXX_TR1 tr1:: 47 | # include 48 | # undef _GLIBCXX_TR1 49 | # undef _GLIBCXX_END_NAMESPACE_TR1 50 | # undef _GLIBCXX_BEGIN_NAMESPACE_TR1 51 | # undef _GLIBCXX_INCLUDE_AS_TR1 52 | #endif 53 | 54 | #endif // _GLIBCXX_TR1_CWCHAR 55 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/cwctype: -------------------------------------------------------------------------------- 1 | // TR1 cwctype -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/cwctype 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_CWCTYPE 30 | #define _GLIBCXX_TR1_CWCTYPE 1 31 | 32 | #pragma GCC system_header 33 | 34 | #if defined(_GLIBCXX_INCLUDE_AS_CXX0X) 35 | # error TR1 header cannot be included from C++0x header 36 | #endif 37 | 38 | #include 39 | 40 | #if defined(_GLIBCXX_INCLUDE_AS_TR1) 41 | # include 42 | #else 43 | # define _GLIBCXX_INCLUDE_AS_TR1 44 | # define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 { 45 | # define _GLIBCXX_END_NAMESPACE_TR1 } 46 | # define _GLIBCXX_TR1 tr1:: 47 | # include 48 | # undef _GLIBCXX_TR1 49 | # undef _GLIBCXX_END_NAMESPACE_TR1 50 | # undef _GLIBCXX_BEGIN_NAMESPACE_TR1 51 | # undef _GLIBCXX_INCLUDE_AS_TR1 52 | #endif 53 | 54 | #endif // _GLIBCXX_TR1_CWCTYPE 55 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/fenv.h: -------------------------------------------------------------------------------- 1 | // TR1 fenv.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/fenv.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _TR1_FENV_H 30 | #define _TR1_FENV_H 1 31 | 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/float.h: -------------------------------------------------------------------------------- 1 | // TR1 float.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/float.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _TR1_FLOAT_H 30 | #define _TR1_FLOAT_H 1 31 | 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/inttypes.h: -------------------------------------------------------------------------------- 1 | // TR1 inttypes.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/inttypes.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_INTTYPES_H 30 | #define _GLIBCXX_TR1_INTTYPES_H 1 31 | 32 | #include 33 | 34 | #endif // _GLIBCXX_TR1_INTTYPES_H 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/limits.h: -------------------------------------------------------------------------------- 1 | // TR1 limits.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/limits.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _TR1_LIMITS_H 30 | #define _TR1_LIMITS_H 1 31 | 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/stdarg.h: -------------------------------------------------------------------------------- 1 | // TR1 stdarg.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/stdarg.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _TR1_STDARG_H 30 | #define _TR1_STDARG_H 1 31 | 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/stdbool.h: -------------------------------------------------------------------------------- 1 | // TR1 stdbool.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/stdbool.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _TR1_STDBOOL_H 30 | #define _TR1_STDBOOL_H 1 31 | 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/stdint.h: -------------------------------------------------------------------------------- 1 | // TR1 stdint.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/stdint.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _TR1_STDINT_H 30 | #define _TR1_STDINT_H 1 31 | 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/stdio.h: -------------------------------------------------------------------------------- 1 | // TR1 stdio.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/stdio.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _TR1_STDIO_H 30 | #define _TR1_STDIO_H 1 31 | 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/stdlib.h: -------------------------------------------------------------------------------- 1 | // TR1 stdlib.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/stdlib.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_STDLIB_H 30 | #define _GLIBCXX_TR1_STDLIB_H 1 31 | 32 | #include 33 | 34 | #if _GLIBCXX_HOSTED 35 | 36 | #if _GLIBCXX_USE_C99 37 | 38 | using std::tr1::atoll; 39 | using std::tr1::strtoll; 40 | using std::tr1::strtoull; 41 | 42 | using std::tr1::abs; 43 | #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC 44 | using std::tr1::div; 45 | #endif 46 | 47 | #endif 48 | 49 | #endif 50 | 51 | #endif // _GLIBCXX_TR1_STDLIB_H 52 | 53 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/tgmath.h: -------------------------------------------------------------------------------- 1 | // TR1 tgmath.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/tgmath.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_TGMATH_H 30 | #define _GLIBCXX_TR1_TGMATH_H 1 31 | 32 | #include 33 | 34 | #endif // _GLIBCXX_TR1_TGMATH_H 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/wchar.h: -------------------------------------------------------------------------------- 1 | // TR1 wchar.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/wchar.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_WCHAR_H 30 | #define _GLIBCXX_TR1_WCHAR_H 1 31 | 32 | #include 33 | 34 | #endif // _GLIBCXX_TR1_WCHAR_H 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1/wctype.h: -------------------------------------------------------------------------------- 1 | // TR1 wctype.h -*- C++ -*- 2 | 3 | // Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1/wctype.h 26 | * This is a TR1 C++ Library header. 27 | */ 28 | 29 | #ifndef _GLIBCXX_TR1_WCTYPE_H 30 | #define _GLIBCXX_TR1_WCTYPE_H 1 31 | 32 | #include 33 | 34 | #endif // _GLIBCXX_TR1_WCTYPE_H 35 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1_impl/cctype: -------------------------------------------------------------------------------- 1 | // TR1 cctype -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1_impl/cctype 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #if _GLIBCXX_USE_C99_CTYPE_TR1 31 | 32 | #undef isblank 33 | 34 | namespace std 35 | { 36 | _GLIBCXX_BEGIN_NAMESPACE_TR1 37 | 38 | using ::isblank; 39 | 40 | _GLIBCXX_END_NAMESPACE_TR1 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1_impl/cstdio: -------------------------------------------------------------------------------- 1 | // TR1 cstdio -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1_impl/cstdio 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | namespace std 31 | { 32 | _GLIBCXX_BEGIN_NAMESPACE_TR1 33 | 34 | #if _GLIBCXX_USE_C99 35 | using std::snprintf; 36 | using std::vsnprintf; 37 | 38 | using std::vfscanf; 39 | using std::vscanf; 40 | using std::vsscanf; 41 | #endif 42 | 43 | _GLIBCXX_END_NAMESPACE_TR1 44 | } 45 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1_impl/cstdlib: -------------------------------------------------------------------------------- 1 | // TR1 cstdlib -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1_impl/cstdlib 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #if _GLIBCXX_HOSTED 31 | 32 | namespace std 33 | { 34 | _GLIBCXX_BEGIN_NAMESPACE_TR1 35 | 36 | #if _GLIBCXX_USE_C99 37 | 38 | #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC 39 | // types 40 | using std::lldiv_t; 41 | 42 | // functions 43 | using std::llabs; 44 | using std::lldiv; 45 | #endif 46 | 47 | using std::atoll; 48 | using std::strtoll; 49 | using std::strtoull; 50 | 51 | using std::strtof; 52 | using std::strtold; 53 | 54 | // overloads 55 | using std::abs; 56 | #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC 57 | using std::div; 58 | #endif 59 | 60 | #endif 61 | 62 | _GLIBCXX_END_NAMESPACE_TR1 63 | } 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1_impl/cwchar: -------------------------------------------------------------------------------- 1 | // TR1 cwchar -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1_impl/cwchar 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #if _GLIBCXX_USE_WCHAR_T 31 | 32 | namespace std 33 | { 34 | _GLIBCXX_BEGIN_NAMESPACE_TR1 35 | 36 | #if _GLIBCXX_HAVE_WCSTOF 37 | using std::wcstof; 38 | #endif 39 | #if _GLIBCXX_HAVE_VFWSCANF 40 | using std::vfwscanf; 41 | #endif 42 | #if _GLIBCXX_HAVE_VSWSCANF 43 | using std::vswscanf; 44 | #endif 45 | #if _GLIBCXX_HAVE_VWSCANF 46 | using std::vwscanf; 47 | #endif 48 | 49 | #if _GLIBCXX_USE_C99 50 | using std::wcstold; 51 | using std::wcstoll; 52 | using std::wcstoull; 53 | #endif 54 | 55 | _GLIBCXX_END_NAMESPACE_TR1 56 | } 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /book/GcppPkg/Include/tr1_impl/cwctype: -------------------------------------------------------------------------------- 1 | // TR1 cwctype -*- C++ -*- 2 | 3 | // Copyright (C) 2007, 2009 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 3, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // Under Section 7 of GPL version 3, you are granted additional 17 | // permissions described in the GCC Runtime Library Exception, version 18 | // 3.1, as published by the Free Software Foundation. 19 | 20 | // You should have received a copy of the GNU General Public License and 21 | // a copy of the GCC Runtime Library Exception along with this program; 22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 | // . 24 | 25 | /** @file tr1_impl/cwctype 26 | * This is an internal header file, included by other library headers. 27 | * You should not attempt to use it directly. 28 | */ 29 | 30 | #if _GLIBCXX_USE_WCHAR_T 31 | 32 | namespace std 33 | { 34 | _GLIBCXX_BEGIN_NAMESPACE_TR1 35 | 36 | #if _GLIBCXX_HAVE_ISWBLANK 37 | using std::iswblank; 38 | #endif 39 | 40 | _GLIBCXX_END_NAMESPACE_TR1 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /book/GcppPkg/Library/GcppLib.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ===================================================================================== 3 | * 4 | * Filename: GcppLib.cpp 5 | * 6 | * Description: 7 | * 8 | * Version: 1.0 9 | * Created: 04/13/2013 10:35:14 AM 10 | * Revision: none 11 | * Compiler: gcc 12 | * 13 | * Author: DAI ZHENGHUA (), djx.zhenghua@gmail.com 14 | * Company: 15 | * 16 | * ===================================================================================== 17 | */ 18 | extern"C" 19 | { 20 | #include 21 | #include 22 | } 23 | 24 | typedef UINTN size_t; 25 | void * operator new( size_t Size ) 26 | { 27 | void *RetVal; 28 | EFI_STATUS Status; 29 | 30 | if( Size == 0) { 31 | return NULL; 32 | } 33 | 34 | Status = gBS->AllocatePool( EfiLoaderData, (UINTN)Size, &RetVal); 35 | if( Status != EFI_SUCCESS) { 36 | RetVal = NULL; 37 | } 38 | return RetVal; 39 | } 40 | 41 | 42 | void * operator new[]( size_t cb ) 43 | { 44 | void *res = operator new(cb); 45 | return res; 46 | } 47 | 48 | 49 | 50 | void operator delete( void * p ) 51 | { 52 | if(p != NULL) 53 | (void) gBS->FreePool (p); 54 | } 55 | 56 | void operator delete[]( void * p ) 57 | { 58 | operator delete(p); 59 | } 60 | 61 | extern "C" 62 | void _Unwind_Resume(struct _Unwind_Exception *object) 63 | { 64 | 65 | } 66 | 67 | #if defined(__GNUC__) 68 | #include "GcppCrt.cpp" 69 | #elif defined(_MSC_VER) 70 | #include "VcppCrt.cpp" 71 | #endif 72 | -------------------------------------------------------------------------------- /book/GcppPkg/Library/GcppLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # The DXE driver produces HII protocols defined in UEFI HII 2.1 specificatin. 3 | # 4 | # Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | # 15 | ## 16 | 17 | [Defines] 18 | INF_VERSION = 0x00010005 19 | BASE_NAME = libgcpp 20 | FILE_GUID = 348C4D62-BFBD-4882-9ECE-C80BB1C64336 21 | VERSION_STRING = 1.0 22 | MODULE_TYPE = BASE 23 | LIBRARY_CLASS = GcppLib 24 | 25 | # 26 | # The following information is for reference only and not required by the build tools. 27 | # 28 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 29 | # 30 | 31 | [Sources] 32 | GcppLib.cpp 33 | [Packages] 34 | MdePkg/MdePkg.dec 35 | MdeModulePkg/MdeModulePkg.dec 36 | StdLib/StdLib.dec 37 | 38 | 39 | [LibraryClasses] 40 | UefiBootServicesTableLib 41 | UefiLib 42 | 43 | [Protocols] 44 | 45 | [FeaturePcd] 46 | 47 | [Pcd] 48 | 49 | [Guids] 50 | 51 | [Depex] 52 | TRUE 53 | 54 | [BuildOptions] 55 | -------------------------------------------------------------------------------- /book/GcppPkg/Library/VcppCrt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ===================================================================================== 3 | * 4 | * Filename: VcppCrt.cpp 5 | * 6 | * Description: 7 | * 8 | * Version: 1.0 9 | * Created: 04/17/2013 07:54:10 PM 10 | * Revision: none 11 | * Compiler: gcc 12 | * 13 | * Author: DAI ZHENGHUA (), djx.zhenghua@gmail.com 14 | * Company: 15 | * 16 | * ===================================================================================== 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /book/GcppPkg/Library/book - Shortcut.lnk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/GcppPkg/Library/book - Shortcut.lnk -------------------------------------------------------------------------------- /book/GcppPkg/gcc4.4-ld-script: -------------------------------------------------------------------------------- 1 | /* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ 2 | SECTIONS 3 | { 4 | /* . = 0 + SIZEOF_HEADERS; */ 5 | . = 0x280; 6 | .text ALIGN(0x20) : 7 | { 8 | *(.text .stub .text.* .gnu.linkonce.t.*) 9 | . = ALIGN(0x20); 10 | } =0x90909090 11 | .data ALIGN(0x20) : 12 | { 13 | *( 14 | .rodata .rodata.* .gnu.linkonce.r.* 15 | .data .data.* .gnu.linkonce.d.* 16 | .bss .bss.* 17 | *COM* 18 | ) 19 | . = ALIGN(0x20); 20 | } 21 | .got ALIGN(0x20) : 22 | { 23 | *(.got .got.*) 24 | . = ALIGN(0x20); 25 | } 26 | .rela ALIGN(0x20) : 27 | { 28 | *(.rela .rela.*) 29 | } 30 | /DISCARD/ : { 31 | *(.note.GNU-stack) *(.gnu_debuglink) 32 | *(.interp) 33 | *(.dynsym) 34 | *(.dynstr) 35 | *(.dynamic) 36 | *(.hash) 37 | *(.comment) 38 | } 39 | .ctors : 40 | { 41 | __CTOR_LIST__ = .; 42 | /*LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */ 43 | KEEP (*(SORT(.ctors.*))) 44 | KEEP (*(.ctors)) 45 | __CTOR_END__ = .; 46 | } 47 | .dtors : 48 | { 49 | __DTOR_LIST__ = .; 50 | /*LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)*/ 51 | KEEP (*(SORT(.dtors.*))) 52 | KEEP (*(.dtors)) 53 | __DTOR_END__ = .; 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /book/GcppPkg/test/testcpp.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = testgcpp 18 | FILE_GUID = 4ea97c46-7491-4dfd-b442-74798713ce5f 19 | VERSION_STRING = 0.1 20 | MODULE_TYPE = UEFI_APPLICATION 21 | ENTRY_POINT = ShellCEntryLib 22 | 23 | [Sources] 24 | #crtend.c 25 | testcpp.cpp 26 | 27 | [Packages] 28 | MdePkg/MdePkg.dec 29 | MdeModulePkg/MdeModulePkg.dec 30 | $(UEFI_BOOK_DIR)/GcppPkg/GcppPkg.dec 31 | StdLib/StdLib.dec 32 | 33 | [LibraryClasses] 34 | GcppLib 35 | ShellCEntryLib 36 | PrintLib 37 | LibC 38 | LibStdio 39 | 40 | [Protocols] 41 | 42 | [BuildOptions] 43 | GCC:*_*_IA32_CC_FLAGS = 44 | MSFT:*_*_*_CC_FLAGS = 45 | 46 | -------------------------------------------------------------------------------- /book/Hob/Hob.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | **/ 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | EFI_STATUS 18 | testHotKey() 19 | { 20 | EFI_STATUS Status = 0; 21 | EFI_HOB_GENERIC_HEADER *Hob; 22 | UINT16 HobType; 23 | UINT16 HobLength; 24 | for(Hob = GetHobList();!END_OF_HOB_LIST(Hob);Hob = GET_NEXT_HOB(Hob)) { 25 | HobType = GET_HOB_TYPE (Hob); 26 | HobLength = GET_HOB_LENGTH (Hob); 27 | Print((CONST CHAR16*)L"Hob %x %x\n", HobType, HobLength); 28 | } 29 | 30 | return Status; 31 | } 32 | 33 | EFI_STATUS 34 | EFIAPI 35 | UefiMain( 36 | IN EFI_HANDLE ImageHandle, 37 | IN EFI_SYSTEM_TABLE *SystemTable 38 | ) 39 | { 40 | return testHotKey(); 41 | } 42 | -------------------------------------------------------------------------------- /book/Hob/Hob.inf: -------------------------------------------------------------------------------- 1 | ## 2 | 3 | [Defines] 4 | INF_VERSION = 0x00010005 5 | BASE_NAME = hob 6 | FILE_GUID = 6987936E-ED34-44db-AE97-1FA5E4ED2117 7 | MODULE_TYPE = UEFI_APPLICATION 8 | VERSION_STRING = 1.0 9 | ENTRY_POINT = UefiMain 10 | 11 | # 12 | # The following information is for reference only and not required by the build tools. 13 | # 14 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 15 | # 16 | 17 | [Sources] 18 | Hob.c 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | 23 | 24 | [LibraryClasses] 25 | UefiApplicationEntryPoint 26 | UefiLib 27 | PcdLib 28 | DebugLib 29 | UefiBootServicesTableLib 30 | UefiRuntimeServicesTableLib 31 | BaseMemoryLib 32 | 33 | [Protocols] 34 | gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED 35 | gEfiDevicePathProtocolGuid # ALWAYS_CONSUMED 36 | gEfiLoadedImageProtocolGuid # ALWAYS_CONSUMED 37 | gEfiSimpleFileSystemProtocolGuid # ALWAYS_CONSUMED 38 | gEfiDevicePathToTextProtocolGuid # ALWAYS_CONSUMED 39 | gEfiHiiConfigAccessProtocolGuid 40 | gEfiPlatformDriverOverrideProtocolGuid 41 | gEfiBlockIoProtocolGuid ## TO_START 42 | gEfiDriverBindingProtocolGuid 43 | gEfiComponentNameProtocolGuid 44 | gEfiDiskIoProtocolGuid 45 | gEfiPciIoProtocolGuid 46 | gEfiSimplePointerProtocolGuid 47 | gEfiSimpleTextInputExProtocolGuid 48 | 49 | [FeaturePcd] 50 | 51 | [Pcd.common] 52 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang 53 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes 54 | 55 | [Guids] 56 | gEfiFileSystemInfoGuid 57 | gEfiFileInfoGuid 58 | 59 | [BuildOptions] 60 | -------------------------------------------------------------------------------- /book/HotKey/HotKey.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | **/ 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | EFI_HANDLE notifyHandle; 15 | 16 | EFI_STATUS myNotify(EFI_KEY_DATA *key) 17 | { 18 | Print((CONST CHAR16*)L"Hot Key\n"); 19 | return 0; 20 | } 21 | EFI_STATUS 22 | testHotKey() 23 | { 24 | EFI_STATUS Status; 25 | EFI_KEY_DATA hotkey={0}; 26 | EFI_KEY_DATA key = {0}; 27 | EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL* InputEx = NULL; 28 | Status = gBS->LocateProtocol( 29 | &gEfiSimpleTextInputExProtocolGuid, 30 | NULL, 31 | (VOID**)&InputEx 32 | ); 33 | Print(L"%r\n", Status); 34 | hotkey.Key.ScanCode = 0; 35 | hotkey.Key.UnicodeChar = 'c'; 36 | hotkey.KeyState.KeyShiftState = EFI_LEFT_CONTROL_PRESSED | EFI_SHIFT_STATE_VALID; 37 | hotkey.KeyState.KeyToggleState = EFI_TOGGLE_STATE_VALID; 38 | 39 | 40 | Status = InputEx->RegisterKeyNotify(InputEx, 41 | &hotkey, 42 | myNotify, 43 | (VOID**)¬ifyHandle); 44 | Print(L"%r\n", Status); 45 | while( key.Key.UnicodeChar != 'q') 46 | { 47 | UINTN Index; 48 | gBS->WaitForEvent(1, &(InputEx->WaitForKeyEx), &Index); 49 | Status = InputEx->ReadKeyStrokeEx(InputEx, 50 | &key); 51 | Print(L"(Scan %x Unicode%x)%x %x %r\n", key.Key.ScanCode, key.Key.UnicodeChar, key.KeyState.KeyShiftState, key.KeyState.KeyToggleState, Status); 52 | if(key.Key.UnicodeChar == 'q') 53 | break; 54 | } 55 | Status = InputEx->UnregisterKeyNotify(InputEx, notifyHandle); 56 | return Status; 57 | 58 | } 59 | 60 | EFI_STATUS UefiMain( 61 | IN EFI_HANDLE ImageHandle, 62 | IN EFI_SYSTEM_TABLE *SystemTable 63 | ) 64 | { 65 | return testHotKey(); 66 | } 67 | -------------------------------------------------------------------------------- /book/HotKey/HotKey.inf: -------------------------------------------------------------------------------- 1 | ## 2 | 3 | [Defines] 4 | INF_VERSION = 0x00010005 5 | BASE_NAME = hotkey 6 | FILE_GUID = 6987936E-ED34-44db-AE97-1FA5E4ED2117 7 | MODULE_TYPE = UEFI_APPLICATION 8 | VERSION_STRING = 1.0 9 | ENTRY_POINT = UefiMain 10 | 11 | # 12 | # The following information is for reference only and not required by the build tools. 13 | # 14 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 15 | # 16 | 17 | [Sources] 18 | HotKey.c 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | 23 | 24 | [LibraryClasses] 25 | UefiApplicationEntryPoint 26 | UefiLib 27 | PcdLib 28 | DebugLib 29 | UefiBootServicesTableLib 30 | UefiRuntimeServicesTableLib 31 | BaseMemoryLib 32 | 33 | [Protocols] 34 | gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED 35 | gEfiDevicePathProtocolGuid # ALWAYS_CONSUMED 36 | gEfiLoadedImageProtocolGuid # ALWAYS_CONSUMED 37 | gEfiSimpleFileSystemProtocolGuid # ALWAYS_CONSUMED 38 | gEfiDevicePathToTextProtocolGuid # ALWAYS_CONSUMED 39 | gEfiHiiConfigAccessProtocolGuid 40 | gEfiPlatformDriverOverrideProtocolGuid 41 | gEfiBlockIoProtocolGuid ## TO_START 42 | gEfiDriverBindingProtocolGuid 43 | gEfiComponentNameProtocolGuid 44 | gEfiDiskIoProtocolGuid 45 | gEfiPciIoProtocolGuid 46 | gEfiSimplePointerProtocolGuid 47 | gEfiSimpleTextInputExProtocolGuid 48 | 49 | [FeaturePcd] 50 | 51 | [Pcd.common] 52 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang 53 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes 54 | 55 | [Guids] 56 | gEfiFileSystemInfoGuid 57 | gEfiFileInfoGuid 58 | 59 | [BuildOptions] 60 | -------------------------------------------------------------------------------- /book/Network/Main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | EFI_STATUS TestNetwork (IN EFI_HANDLE ImageHandle); 5 | EFIAPI 6 | EFI_STATUS 7 | UefiMain ( 8 | IN EFI_HANDLE ImageHandle, 9 | IN EFI_SYSTEM_TABLE *SystemTable 10 | ) 11 | { 12 | return TestNetwork(gImageHandle); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /book/Network/memcpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #ifndef _SIZE_T 6 | typedef UINTN size_t; 7 | #define _SIZE_T 8 | #endif 9 | 10 | #ifndef __GNUC__ 11 | #pragma function(memcpy) 12 | #endif 13 | void * memcpy ( void * dest, const void * source, size_t count) 14 | { 15 | return CopyMem(dest,source,(UINTN)(count)); 16 | } 17 | -------------------------------------------------------------------------------- /book/Network/socket.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/Network/socket.c -------------------------------------------------------------------------------- /book/Network/socket.h: -------------------------------------------------------------------------------- 1 | #ifndef __NETWORK_HEADER__ 2 | #define __NETWORK_HEADER__ 3 | #ifdef __cplusplus 4 | extern "C"{ 5 | #endif 6 | #include 7 | 8 | #define IPV4(a,b,c,d) (a | b<<8 | c << 16 | d <<24) 9 | typedef EFI_STATUS SOCKET_STATUS; 10 | 11 | int Socket(); 12 | SOCKET_STATUS Connect(int fd, UINT32 Ip32, UINT16 Port); 13 | SOCKET_STATUS Send(int fd, CHAR8* Data, UINTN Lenth); 14 | SOCKET_STATUS Recv(int fd, CHAR8* Buffer, UINTN Lenth); 15 | SOCKET_STATUS Close(int fd); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /book/Network/tcpsocket.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = TestSocket 4 | FILE_GUID = 4ea97c46-749a-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources.X64] 12 | memcpy.c 13 | [Sources] 14 | Main.c 15 | socket.c 16 | 17 | [Packages] 18 | MdePkg/MdePkg.dec 19 | uefi/book/sstdPkg/sstd.dec 20 | 21 | [LibraryClasses] 22 | UefiApplicationEntryPoint 23 | UefiLib 24 | 25 | [Protocols] 26 | gEfiTcp4ServiceBindingProtocolGuid 27 | gEfiTcp4ProtocolGuid 28 | [BuildOptions] 29 | MSFT:*_*_X64_CC_FLAGS =/GL- 30 | -------------------------------------------------------------------------------- /book/Shell/Execute/Execute.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | INTN 7 | EFIAPI 8 | ShellAppMain ( 9 | IN UINTN Argc, 10 | IN CHAR16 **Argv 11 | ) 12 | { 13 | EFI_STATUS Status = 0; 14 | EFI_STATUS RStatus = 0; 15 | EFI_SHELL_PROTOCOL *mEfiShellProtocol; 16 | CHAR16* Environment[] = { L"Var1=1", L"Var2=2", 0}; 17 | Status = gBS -> LocateProtocol( &gEfiShellProtocolGuid, NULL, (VOID**)&mEfiShellProtocol); 18 | Status = mEfiShellProtocol -> Execute(&gImageHandle, L"-nomap ls fs0:", NULL, &RStatus); 19 | Print(L"Execute return %r with Status %d\n", Status, RStatus); 20 | Status = mEfiShellProtocol -> Execute(&gImageHandle, L"-nomap -noversion -nostartup exit 1", NULL, &RStatus); 21 | Print(L"Execute return %r with Status %d\n", Status, RStatus); 22 | Status = mEfiShellProtocol -> Execute(&gImageHandle, L"-nomap -noversion echo Var = %Var1%", Environment, &RStatus); 23 | Print(L"Execute return %r with Status %d\n", Status, RStatus); 24 | return Status; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /book/Shell/Execute/Execute.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = ShellExecute 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5a 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = ShellCEntryLib 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | Execute.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | ShellPkg/ShellPkg.dec 17 | 18 | [LibraryClasses] 19 | ShellCEntryLib 20 | UefiLib 21 | ShellLib 22 | 23 | [Protocols] 24 | gEfiShellProtocolGuid 25 | [BuildOptions] 26 | 27 | -------------------------------------------------------------------------------- /book/Shell/Execute2/Execute.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | INTN 7 | EFIAPI 8 | ShellAppMain ( 9 | IN UINTN Argc, 10 | IN CHAR16 **Argv 11 | ) 12 | { 13 | EFI_STATUS Status = 0; 14 | EFI_STATUS RStatus = 0; 15 | CHAR16* Environment[] = { L"Var1=1", L"Var2=2", 0}; 16 | if(gEfiShellProtocol == NULL){ 17 | Status = gBS -> LocateProtocol( &gEfiShellProtocolGuid, NULL, (VOID**)&gEfiShellProtocol); 18 | } 19 | Status = ShellExecute(&gImageHandle, L"-nomap ls fs0:", FALSE, NULL, &RStatus); 20 | Print(L"Execute return %r with Status %d\n", Status, RStatus); 21 | Status = ShellExecute(&gImageHandle, L"-nomap -noversion -nostartup exit 1", FALSE, NULL, &RStatus); 22 | Print(L"Execute return %r with Status %d\n", Status, RStatus); 23 | Status = ShellExecute(&gImageHandle, L"-nomap -noversion echo Var = %Var1%", FALSE, Environment, &RStatus); 24 | Print(L"Execute return %r with Status %d\n", Status, RStatus); 25 | return Status; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /book/Shell/Execute2/Execute.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = ShellExecute2 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5a 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = ShellCEntryLib 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | Execute.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | ShellPkg/ShellPkg.dec 17 | 18 | [LibraryClasses] 19 | ShellCEntryLib 20 | UefiLib 21 | ShellLib 22 | 23 | [Protocols] 24 | gEfiShellProtocolGuid 25 | [BuildOptions] 26 | 27 | -------------------------------------------------------------------------------- /book/UefiProgramming-edk2-stable202102.dec: -------------------------------------------------------------------------------- 1 | 2 | [Defines] 3 | DEC_SPECIFICATION = 0x00010005 4 | PACKAGE_NAME = UefiProgrammingPkg 5 | PACKAGE_GUID = E3E3D3D5-D62B-4497-A175-264F489D127E 6 | PACKAGE_VERSION = 0.02 7 | 8 | 9 | [Guids] 10 | 11 | 12 | [PcdsFixedAtBuild] 13 | -------------------------------------------------------------------------------- /book/Uutil/Include/Uutil.h: -------------------------------------------------------------------------------- 1 | #define SAFECALL(x) if(EFI_SUCCESS != (x)){return Status;} 2 | #define HANDLE_ERR(x) if(EFI_SUCCESS !=(x)) 3 | #define IF_ERR(x) if(EFI_SUCCESS != (x)) 4 | #define CheckStatus(x) if(EFI_SUCCESS != (Status)){if(((VOID*)(x)) != NULL){Print(L"%s %r", x, Status);} return Status;} 5 | 6 | #define RETURN_ERR(x) SAFECALL(x) 7 | #define BREAK_ERR(x) if(EFI_SUCCESS != (x)){break;} 8 | 9 | #ifdef _cplusplus 10 | #undef NULL 11 | #define NULL 0 12 | #endif 13 | 14 | 15 | // File op 16 | 17 | #define FOpen(FileHandle, NewHandle, FileName, OpenMode, Attr) (FileHandle) -> Open(FileHandle, NewHandle, FileName, OpenMode, Attr) 18 | #define FRead(FileHandle, BufferSize, Buffer) (FileHandle) -> Read(FileHandle, BufferSize, Buffer) 19 | 20 | 21 | // end File op 22 | -------------------------------------------------------------------------------- /book/Uutil/Uutil.dec: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # This is the Unix Emulation Environment Platform 4 | # 5 | # Reference platform implementation using an emulator. 6 | # Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made available 9 | # under the terms and conditions of the BSD License which accompanies this distribution. 10 | # The full text of the license may be found at http://opensource.org/licenses/bsd-license.php 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES 12 | # OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | [Defines] 17 | DEC_SPECIFICATION = 0x00010005 18 | PACKAGE_NAME = EdkUtilPkg 19 | PACKAGE_GUID = e2805c44-8985-11db-9e98-0040d0c0d0cd 20 | PACKAGE_VERSION = 1.0 21 | 22 | [Includes] 23 | Include 24 | 25 | [Includes.IA32] 26 | [LibraryClasses] 27 | 28 | [Guids] 29 | [Ppis] 30 | 31 | [Protocols] 32 | 33 | [PcdsFixedAtBuild] 34 | [PcdsFixedAtBuild, PcdsPatchableInModule] 35 | 36 | [PcdsDynamic, PcdsDynamicEx] 37 | -------------------------------------------------------------------------------- /book/audio/ac97config: -------------------------------------------------------------------------------- 1 | PciRoot(0x0)/Pci(0x4,0x0) 2 | UINT16 VendorId :8086 3 | UINT16 DeviceId :2415 4 | UINT16 Command :7 5 | UINT16 Status :280 6 | UINT8 RevisionID : 1 7 | UINT8 ClassCode[2] : 4 8 | UINT8 ClassCode[1] : 1 9 | UINT8 ClassCode[0] : 0 10 | UINT8 CacheLineSize :0 11 | UINT8 LatencyTimer : 0 12 | UINT8 HeaderType : 0 13 | UINT8 BIST : 0 14 | Bar[0] : C001 15 | Bar[1] : C401 16 | Bar[2] : 0 17 | Bar[3] : 0 18 | Bar[4] : 0 19 | Bar[5] : 0 20 | -------------------------------------------------------------------------------- /book/audio/audio.inf: -------------------------------------------------------------------------------- 1 | ## 2 | 3 | [Defines] 4 | INF_VERSION = 0x00010005 5 | BASE_NAME = ac97 6 | FILE_GUID = 6987936E-ED34-44db-AE97-1FA5E4ED2117 7 | MODULE_TYPE = UEFI_DRIVER 8 | VERSION_STRING = 1.0 9 | ENTRY_POINT = InitializeACC 10 | # ENTRY_POINT = UefiMain 11 | 12 | # 13 | # The following information is for reference only and not required by the build tools. 14 | # 15 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 16 | # 17 | 18 | [Sources] 19 | accdriver.c 20 | ac97.c 21 | ComponentName.c 22 | 23 | [Packages] 24 | MdePkg/MdePkg.dec 25 | MdeModulePkg/MdeModulePkg.dec 26 | 27 | [LibraryClasses] 28 | UefiDriverEntryPoint 29 | UefiLib 30 | UefiBootServicesTableLib 31 | 32 | [Protocols] 33 | gEfiDriverBindingProtocolGuid 34 | gEfiComponentNameProtocolGuid 35 | gEfiPciIoProtocolGuid 36 | 37 | 38 | [BuildOptions] 39 | MSFT:DEBUG_*_*_CC_FLAGS = /wd4201 /wd4305 40 | MSFT:RELEASE_*_*_CC_FLAGS = /wd4201 41 | -------------------------------------------------------------------------------- /book/audio/wintype.h: -------------------------------------------------------------------------------- 1 | #ifndef WIN_TYPE_HEADER__ 2 | #define WIN_TYPE_HEADER__ 3 | 4 | typedef UINT16 WORD; 5 | typedef UINT16* PWORD; 6 | typedef UINT8* PCHAR; 7 | typedef UINT8 UCHAR; 8 | typedef UINT32 ULONG; 9 | typedef UINT32 DWORD; 10 | typedef UINT16 USHORT; 11 | #define u8 unsigned char 12 | #define u16 unsigned short int 13 | #define u32 unsigned int 14 | #define u64 unsigned long long 15 | typedef union{ 16 | struct{ 17 | UINT32 low; 18 | UINT32 high; 19 | }; 20 | UINT64 QuadPart; 21 | } LARGE_INTEGER ; 22 | typedef EFI_STATUS NTSTATUS; 23 | 24 | 25 | typedef struct { 26 | UINT32 addr; 27 | UINT16 len; 28 | unsigned short reserved:14; 29 | unsigned short BUP:1; 30 | unsigned short IOC:1; 31 | } BufferDescriptor; 32 | 33 | NTSTATUS InitAC97 (void); 34 | #define WriteBMControlRegister(addr,data) WriteMaster(addr,data) 35 | 36 | #define AC_CONST static const 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /book/disk/AtaPassThru/TestPassThru.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = TestGpt 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | [Sources] 9 | TestPassThru.c 10 | 11 | [Packages] 12 | MdePkg/MdePkg.dec 13 | 14 | [LibraryClasses] 15 | UefiApplicationEntryPoint 16 | UefiLib 17 | [Protocols] 18 | gEfiDiskIoProtocolGuid 19 | [BuildOptions] 20 | MSFT:DEBUG_*_IA32_CC_FLAGS = /Od 21 | -------------------------------------------------------------------------------- /book/disk/DevicePath/TestDevicePath.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = TestDevicePath 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | [Sources] 9 | TestDevicePath.c 10 | 11 | [Packages] 12 | MdePkg/MdePkg.dec 13 | 14 | [LibraryClasses] 15 | UefiApplicationEntryPoint 16 | UefiLib 17 | [Protocols] 18 | gEfiDiskIoProtocolGuid 19 | gEfiDevicePathToTextProtocolGuid 20 | [BuildOptions] 21 | MSFT:DEBUG_*_IA32_CC_FLAGS = /Od 22 | -------------------------------------------------------------------------------- /book/disk/GPT/TestGpt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/disk/GPT/TestGpt.c -------------------------------------------------------------------------------- /book/disk/GPT/TestGpt.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = TestGpt 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | [Sources] 9 | TestGpt.c 10 | 11 | [Packages] 12 | MdePkg/MdePkg.dec 13 | 14 | [LibraryClasses] 15 | UefiApplicationEntryPoint 16 | UefiLib 17 | [Protocols] 18 | gEfiDiskIoProtocolGuid 19 | gEfiDevicePathToTextProtocolGuid 20 | [BuildOptions] 21 | MSFT:DEBUG_*_IA32_CC_FLAGS = /Od 22 | -------------------------------------------------------------------------------- /book/disk/GPT/TestGpt.inf~: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = TestGpt 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | [Sources] 9 | TestGpt.c 10 | 11 | [Packages] 12 | MdePkg/MdePkg.dec 13 | 14 | [LibraryClasses] 15 | UefiApplicationEntryPoint 16 | UefiLib 17 | [Protocols] 18 | gEfiDiskIoProtocolGuid 19 | [BuildOptions] 20 | MSFT:DEBUG_*_IA32_CC_FLAGS = /Od 21 | -------------------------------------------------------------------------------- /book/disk/devicepath.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/disk/devicepath.h -------------------------------------------------------------------------------- /book/disk/disk.cpp: -------------------------------------------------------------------------------- 1 | /** @file 2 | **/ 3 | #include "disk.h" 4 | #include 5 | 6 | void DiskDevice::listInfo() 7 | { 8 | if(BlockIo->Media == 0) 9 | return; 10 | Print(L"MediaId:%0x\nRemovableMedia:%0x\nMediaPresent:%0x\nLogicalPartition:%0x\nReadOnly:%0x\nWriteCaching:%0x\nBlockSize:%0x\nIoAlign:%0x\nLastBlock:%0x\nLowestAlignedLba:%0x\nLogicalBlocksPerPhysicalBlock:%0x\nOptimalTransferLengthGranularity:%0x\n", 11 | BlockIo->Media->MediaId, 12 | BlockIo->Media->RemovableMedia, 13 | BlockIo->Media->MediaPresent, 14 | BlockIo->Media->LogicalPartition, 15 | BlockIo->Media->ReadOnly, 16 | BlockIo->Media->WriteCaching, 17 | BlockIo->Media->BlockSize, 18 | BlockIo->Media->IoAlign, 19 | BlockIo->Media->LastBlock, 20 | BlockIo->Media->LowestAlignedLba, 21 | BlockIo->Media->LogicalBlocksPerPhysicalBlock, 22 | BlockIo->Media->OptimalTransferLengthGranularity 23 | ); 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /book/disk/test.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/disk/test.cpp -------------------------------------------------------------------------------- /book/ffmpeg/conf.sh: -------------------------------------------------------------------------------- 1 | ./configure --disable-network --disable-pthreads --disable-w32threads --disable-os2threads --disable-yasm 2 | -------------------------------------------------------------------------------- /book/ffmpeg/ffdecoder/ffdecoder.inf2: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = ffdecoder 18 | FILE_GUID = 33a97c46-7491-4dfd-b442-74798713ce5f 19 | MODULE_TYPE = UEFI_DRIVER 20 | VERSION_STRING = 0.1 21 | ENTRY_POINT = InitFFdecoder 22 | 23 | # 24 | # VALID_ARCHITECTURES = IA32 X64 IPF 25 | # 26 | 27 | [Sources] 28 | ffdecoder.c 29 | math.c 30 | [Packages] 31 | StdLib/StdLib.dec 32 | MdePkg/MdePkg.dec 33 | ShellPkg/ShellPkg.dec 34 | ffmpeg/ffmpeg.dec 35 | 36 | [LibraryClasses] 37 | UefiDriverEntryPoint 38 | #LibC 39 | #LibStdio 40 | LibMath 41 | #BsdSocketLib 42 | #EfiSocketLib 43 | #UseSocketDxe 44 | #DevShell 45 | #zlib 46 | #libavcodec 47 | #libavutil 48 | #libswscale 49 | #libavformat 50 | 51 | 52 | [BuildOptions] 53 | GCC:*_*_IA32_CC_FLAGS = -D__UEFI__ -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99 -fomit-frame-pointer -Wno-cast-qual -Wno-traditional-conversion -Wno-sign-conversion -Wno-pointer-sign -w 54 | -------------------------------------------------------------------------------- /book/ffmpeg/ffmpeg.dec: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # This is the Unix Emulation Environment Platform 4 | # 5 | # Reference platform implementation using an emulator. 6 | # Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made available 9 | # under the terms and conditions of the BSD License which accompanies this distribution. 10 | # The full text of the license may be found at http://opensource.org/licenses/bsd-license.php 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES 12 | # OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | [Defines] 17 | DEC_SPECIFICATION = 0x00010005 18 | PACKAGE_NAME = EdkffmpegPkg 19 | PACKAGE_GUID = f2805c44-8985-11db-9e98-0040d0111111 20 | PACKAGE_VERSION = 0.1 21 | 22 | [Includes] 23 | ./ 24 | zlib-1.2.6/ 25 | 26 | [LibraryClasses] 27 | 28 | [Guids] 29 | [Ppis] 30 | 31 | [Protocols] 32 | 33 | [PcdsFixedAtBuild] 34 | [PcdsFixedAtBuild, PcdsPatchableInModule] 35 | 36 | [PcdsDynamic, PcdsDynamicEx] 37 | -------------------------------------------------------------------------------- /book/ffmpeg/ffplayer/drop.avi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/ffmpeg/ffplayer/drop.avi -------------------------------------------------------------------------------- /book/ffmpeg/ffplayer/fplayer.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = ffplayer 18 | FILE_GUID = 4ea97c46-7491-4dfd-b442-74798713ce5f 19 | MODULE_TYPE = UEFI_APPLICATION 20 | VERSION_STRING = 0.1 21 | ENTRY_POINT = ShellCEntryLib 22 | 23 | DEFINE UEFI_BOOK_DIR = uefi/book 24 | 25 | # 26 | # VALID_ARCHITECTURES = IA32 X64 IPF 27 | # 28 | 29 | [Sources] 30 | fplayer.cpp 31 | 32 | [Packages] 33 | StdLib/StdLib.dec 34 | MdePkg/MdePkg.dec 35 | MdeModulePkg/MdeModulePkg.dec 36 | ShellPkg/ShellPkg.dec 37 | $(UEFI_BOOK_DIR)/CppPkg/CppPkg.dec 38 | $(UEFI_BOOK_DIR)/GUIPkg/GUIPkg.dec 39 | 40 | [LibraryClasses] 41 | ShellCEntryLib 42 | LibC 43 | LibGui 44 | LibCpp 45 | 46 | [Protocols] 47 | gEfiGraphicsOutputProtocolGuid 48 | gEfiSimplePointerProtocolGuid 49 | gEfiSimpleTextInputExProtocolGuid 50 | [BuildOptions] 51 | MSFT:*_*_*_CC_FLAGS = /wd4804 /wd4201 /wd4164 52 | 53 | -------------------------------------------------------------------------------- /book/ffmpeg/ffplayer/libGui.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/ffmpeg/ffplayer/libGui.lib -------------------------------------------------------------------------------- /book/ffmpeg/ffplayer/off.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/ffmpeg/ffplayer/off.bmp -------------------------------------------------------------------------------- /book/ffmpeg/ffplayer/on.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/ffmpeg/ffplayer/on.bmp -------------------------------------------------------------------------------- /book/ffmpeg/ffplayer/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/ffmpeg/ffplayer/readme.txt -------------------------------------------------------------------------------- /book/infs/Debug/Main.c: -------------------------------------------------------------------------------- 1 | #include 2 | EFI_STATUS 3 | EFIAPI 4 | UefiMain ( 5 | IN EFI_HANDLE ImageHandle, 6 | IN EFI_SYSTEM_TABLE *SystemTable 7 | ) 8 | { 9 | #ifdef _MSC_VER 10 | _asm int 3; 11 | #else 12 | asm("int $0x03"); 13 | #endif 14 | SystemTable -> ConOut-> OutputString(SystemTable->ConOut, L"HelloWorld\n"); 15 | return EFI_SUCCESS; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /book/infs/Debug/Main.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = DebugMain 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | Main.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | 17 | [LibraryClasses] 18 | UefiApplicationEntryPoint 19 | UefiLib 20 | 21 | [BuildOptions] 22 | MSFT:DEBUG_*_IA32_CC_FLAGS = /Od 23 | -------------------------------------------------------------------------------- /book/infs/ShellAppMain/Main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | INTN 5 | EFIAPI 6 | ShellAppMain ( 7 | IN UINTN Argc, 8 | IN CHAR16 **Argv 9 | ) 10 | { 11 | gST -> ConOut-> OutputString(gST -> ConOut, L"HelloWorld\n"); 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /book/infs/ShellAppMain/Main.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = ShellAppMain 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = ShellCEntryLib 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | Main.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | ShellPkg/ShellPkg.dec 17 | 18 | [LibraryClasses] 19 | ShellCEntryLib 20 | UefiLib 21 | 22 | [BuildOptions] 23 | 24 | -------------------------------------------------------------------------------- /book/infs/UefiMain/UefiMain.c: -------------------------------------------------------------------------------- 1 | #include 2 | EFI_STATUS 3 | EFIAPI 4 | UefiMain ( 5 | IN EFI_HANDLE ImageHandle, 6 | IN EFI_SYSTEM_TABLE *SystemTable 7 | ) 8 | { 9 | SystemTable -> ConOut-> OutputString(SystemTable->ConOut, L"HelloWorld\n"); 10 | return EFI_SUCCESS; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /book/infs/UefiMain/UefiMain.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = UefiMain 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | [Sources] 9 | UefiMain.c 10 | 11 | [Packages] 12 | MdePkg/MdePkg.dec 13 | 14 | [LibraryClasses] 15 | UefiApplicationEntryPoint 16 | UefiLib 17 | [FixedPcd] 18 | gEfiMdePkgTokenSpaceGuid.PcdFSBClock|600000000 19 | gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength 20 | [FeaturePcd] 21 | gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE 22 | gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable 23 | [PatchPcd] 24 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangCodes 25 | [BuildOptions] 26 | MSFT:DEBUG_*_IA32_CC_FLAGS = /Od 27 | -------------------------------------------------------------------------------- /book/infs/main/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main (int argc, char **argv ) 3 | { 4 | printf("HelloWorld\n"); 5 | return 0; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /book/infs/main/main.inf: -------------------------------------------------------------------------------- 1 | ## @file main.inf 2 | [Defines] 3 | INF_VERSION = 0x00010006 4 | BASE_NAME = Main 5 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 6 | MODULE_TYPE = UEFI_APPLICATION 7 | VERSION_STRING = 0.1 8 | ENTRY_POINT = ShellCEntryLib 9 | [Sources] 10 | main.c 11 | [Packages] 12 | MdePkg/MdePkg.dec 13 | ShellPkg/ShellPkg.dec 14 | StdLib/StdLib.dec 15 | [LibraryClasses] 16 | LibC 17 | LibStdio 18 | ShellCEntryLib 19 | -------------------------------------------------------------------------------- /book/mouse/mouse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/mouse/mouse.c -------------------------------------------------------------------------------- /book/multitask/processor/process.inf: -------------------------------------------------------------------------------- 1 | ## 2 | 3 | [Defines] 4 | INF_VERSION = 0x00010005 5 | BASE_NAME = process 6 | FILE_GUID = 6987936E-ED34-44db-AE97-1FA5E4ED2119 7 | MODULE_TYPE = UEFI_APPLICATION 8 | VERSION_STRING = 1.0 9 | ENTRY_POINT = UefiMain 10 | 11 | # 12 | # The following information is for reference only and not required by the build tools. 13 | # 14 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 15 | # 16 | 17 | [Sources] 18 | process.c 19 | 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | MdeModulePkg/MdeModulePkg.dec 24 | 25 | [LibraryClasses] 26 | UefiApplicationEntryPoint 27 | UefiLib 28 | PcdLib 29 | DebugLib 30 | UefiBootServicesTableLib 31 | UefiRuntimeServicesTableLib 32 | BaseMemoryLib 33 | 34 | [Protocols] 35 | gEfiUnicodeCollation2ProtocolGuid # ALWAYS_CONSUMED 36 | gEfiLoadedImageProtocolGuid # ALWAYS_CONSUMED 37 | gEfiMpServiceProtocolGuid 38 | 39 | [FeaturePcd] 40 | 41 | [Pcd.common] 42 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang 43 | gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes 44 | 45 | [Guids] 46 | 47 | [BuildOptions] 48 | -------------------------------------------------------------------------------- /book/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/readme.txt -------------------------------------------------------------------------------- /book/sstdPkg/Include/sstd.h: -------------------------------------------------------------------------------- 1 | #ifndef __UEFI_MACRO_STD__ 2 | #define __UEFI_MACRO_STD__ 3 | #ifdef __cplusplus 4 | extern "C"{ 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #define malloc(size) AllocatePool ((UINTN) size) 12 | #define free(ptr) FreePool(ptr) 13 | #define memcpy(dest,source,count) CopyMem(dest,source,(UINTN)(count)) 14 | #define memset(dest,ch,count) gBS->SetMem(dest,(UINTN)(count),(UINT8)(ch)) 15 | #define memchr(buf,ch,count) ScanMem8(buf,(UINTN)(count),(UINT8)ch) 16 | #define memcmp(buf1,buf2,count) (int)(CompareMem(buf1,buf2,(UINTN)(count))) 17 | #define memmove(dest,source,count) CopyMem(dest,source,(UINTN)(count)) 18 | 19 | #define strcmp AsciiStrCmp 20 | #define strncmp(string1,string2,count) (int)(AsciiStrnCmp(string1,string2,(UINTN)(count))) 21 | #define strcpy(strDest,strSource) AsciiStrCpy(strDest,strSource) 22 | #define strncpy(strDest,strSource,count) AsciiStrnCpy(strDest,strSource,(UINTN)count) 23 | #define strlen(str) (size_t)(AsciiStrLen(str)) 24 | #define strcat(strDest,strSource) AsciiStrCat(strDest,strSource) 25 | #define strchr(str,ch) ScanMem8((VOID *)(str),AsciiStrSize(str),(UINT8)ch) 26 | #define strstr(text, pattern) AsciiStrStr(text, pattern) 27 | 28 | #define wcscmp(s1, s2) StrCmp( (CONST CHAR16 *)s1, (CONST CHAR16 *)s2) 29 | #define wcsstr(text, pattern) StrStr(text, pattern) 30 | 31 | #define abort() ASSERT (FALSE) 32 | #define assert(expression) 33 | #define localtime(timer) NULL 34 | #define gmtime_r(timer,result) (result = NULL) 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /book/sstdPkg/Include/stdio.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /book/sstdPkg/Include/stdlib.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /book/sstdPkg/Include/string.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /book/sstdPkg/Library/sstdLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # The DXE driver produces HII protocols defined in UEFI HII 2.1 specificatin. 3 | # 4 | # Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | # 15 | ## 16 | 17 | [Defines] 18 | INF_VERSION = 0x00010005 19 | BASE_NAME = libsstd 20 | FILE_GUID = 348C4D62-BFBD-4882-9ECE-C80BB1C64336 21 | VERSION_STRING = 1.0 22 | MODULE_TYPE = BASE 23 | LIBRARY_CLASS = GcppLib 24 | #MODULE_TYPE = DXE_DRIVER 25 | #ENTRY_POINT = InitializeAvCodec 26 | 27 | # 28 | # The following information is for reference only and not required by the build tools. 29 | # 30 | # VALID_ARCHITECTURES = IA32 X64 IPF EBC 31 | # 32 | 33 | [Sources] 34 | sstdall.cpp 35 | [Packages] 36 | MdePkg/MdePkg.dec 37 | MdeModulePkg/MdeModulePkg.dec 38 | 39 | [LibraryClasses] 40 | UefiBootServicesTableLib 41 | UefiLib 42 | BaseLib 43 | 44 | [Protocols] 45 | 46 | [FeaturePcd] 47 | 48 | [Pcd] 49 | 50 | [Guids] 51 | 52 | [Depex] 53 | TRUE 54 | 55 | [BuildOptions] 56 | MSFT:*_*_*_CC_FLAGS =/wd4804 /wd4164 57 | -------------------------------------------------------------------------------- /book/sstdPkg/Library/sstdall.cpp: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | #include 3 | #include 4 | #undef NULL 5 | #define NULL 0 6 | typedef void (EFIAPI *_PVFV)(void); 7 | typedef int (EFIAPI *_PIFV)(void); 8 | typedef void (EFIAPI *_PVFI)(int); 9 | _PVFV *atexits = (_PVFV*)NULL; 10 | int num_atexit = 0; 11 | int max_atexit =-1; 12 | /** The atexit function registers the function pointed to by func, to be 13 | called without arguments at normal program termination. 14 | 15 | @return The atexit function returns zero if the registration succeeds, 16 | nonzero if it fails. 17 | **/ 18 | int 19 | atexit(_PVFV handler) 20 | { 21 | if(handler == NULL) 22 | return 0; 23 | if(num_atexit >= max_atexit){ 24 | max_atexit += 32; 25 | _PVFV* old_handler = atexits; 26 | atexits = new _PVFV[max_atexit]; 27 | if(atexits == NULL) { 28 | atexits = old_handler; 29 | return -1; 30 | } 31 | for(int i=0;i 3 | #include 4 | -------------------------------------------------------------------------------- /book/sstdPkg/Testsstd/Testsstd.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | **/ 3 | #include 4 | #include 5 | 6 | VOID Test() 7 | { 8 | CHAR16* pStr; 9 | pStr = malloc(1024); 10 | free(pStr); 11 | } 12 | 13 | EFI_STATUS UefiMain( 14 | IN EFI_HANDLE ImageHandle, 15 | IN EFI_SYSTEM_TABLE *SystemTable 16 | ) 17 | { 18 | EFI_STATUS Status = 0; 19 | Test(); 20 | return Status; 21 | } 22 | -------------------------------------------------------------------------------- /book/sstdPkg/Testsstd/Testsstd.inf: -------------------------------------------------------------------------------- 1 | ## 2 | 3 | [Defines] 4 | INF_VERSION = 0x00010005 5 | BASE_NAME = testsstd 6 | FILE_GUID = 6987936E-ED34-54db-AE97-1FA5E4ED2127 7 | MODULE_TYPE = UEFI_APPLICATION 8 | VERSION_STRING = 1.0 9 | ENTRY_POINT = UefiMain 10 | 11 | [Sources] 12 | Testsstd.c 13 | [Packages] 14 | MdePkg/MdePkg.dec 15 | MdeModulePkg/MdeModulePkg.dec 16 | uefi/book/sstdPkg/sstd.dec 17 | [LibraryClasses] 18 | UefiApplicationEntryPoint 19 | UefiBootServicesTableLib 20 | BaseMemoryLib 21 | BaseLib 22 | MemoryAllocationLib 23 | sstdLib 24 | 25 | [Protocols] 26 | 27 | [FeaturePcd] 28 | 29 | [Pcd.common] 30 | 31 | [Guids] 32 | 33 | [BuildOptions] 34 | -------------------------------------------------------------------------------- /book/sstdPkg/sstd.dec: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # This is the Unix Emulation Environment Platform 4 | # 5 | # Reference platform implementation using an emulator. 6 | # Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made available 9 | # under the terms and conditions of the BSD License which accompanies this distribution. 10 | # The full text of the license may be found at http://opensource.org/licenses/bsd-license.php 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES 12 | # OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | [Defines] 17 | DEC_SPECIFICATION = 0x00010005 18 | PACKAGE_NAME = EdksstdPkg 19 | PACKAGE_GUID = e2805c44-8985-11db-9e98-0040d0c0d0cd 20 | PACKAGE_VERSION = 1.0 21 | 22 | [Includes] 23 | Include 24 | 25 | [Includes.IA32] 26 | [LibraryClasses] 27 | 28 | [Guids] 29 | [Ppis] 30 | 31 | [Protocols] 32 | 33 | [PcdsFixedAtBuild] 34 | [PcdsFixedAtBuild, PcdsPatchableInModule] 35 | 36 | [PcdsDynamic, PcdsDynamicEx] 37 | -------------------------------------------------------------------------------- /book/std/Main.c: -------------------------------------------------------------------------------- 1 | /*Main.c */ 2 | #include 3 | #include 4 | int main (int argc, char **argv ) 5 | { 6 | printf("HelloWorld\n"); 7 | return 0; 8 | } 9 | 10 | EFI_STATUS 11 | EFIAPI 12 | TestConstrucotor( 13 | IN EFI_HANDLE ImageHandle, 14 | IN EFI_SYSTEM_TABLE *SystemTable 15 | ) 16 | { 17 | EFI_STATUS Status = 0; 18 | return Status ; 19 | } 20 | 21 | EFI_STATUS 22 | EFIAPI 23 | Testdestrucotor( 24 | IN EFI_HANDLE ImageHandle, 25 | IN EFI_SYSTEM_TABLE *SystemTable 26 | ) 27 | { 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /book/std/main.inf: -------------------------------------------------------------------------------- 1 | ## @file main.inf 2 | [Defines] 3 | INF_VERSION = 0x00010006 4 | BASE_NAME = Main 5 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 6 | MODULE_TYPE = UEFI_APPLICATION 7 | VERSION_STRING = 0.1 8 | ENTRY_POINT = ShellCEntryLib 9 | CONSTRUCTOR =TestConstrucotor 10 | DESTRUCTOR =TestDestrucotor 11 | [Sources] 12 | Main.c 13 | [Packages] 14 | MdePkg/MdePkg.dec 15 | ShellPkg/ShellPkg.dec 16 | StdLib/StdLib.dec 17 | [LibraryClasses] 18 | LibC 19 | LibStdio 20 | ShellCEntryLib 21 | UefiLib 22 | 23 | [BuildOptions] 24 | MSFT:*_*_IA32_CC_FLAGS = /Oi- 25 | 26 | -------------------------------------------------------------------------------- /book/std/sstd/Testsstd.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | **/ 3 | #include 4 | #include 5 | 6 | VOID Test() 7 | { 8 | CHAR16* pStr; 9 | pStr = malloc(1024); 10 | free(pStr); 11 | } 12 | 13 | EFI_STATUS 14 | EFIAPI 15 | UefiMain( 16 | IN EFI_HANDLE ImageHandle, 17 | IN EFI_SYSTEM_TABLE *SystemTable 18 | ) 19 | { 20 | EFI_STATUS Status = 0; 21 | Test(); 22 | return Status; 23 | } 24 | -------------------------------------------------------------------------------- /book/std/sstd/Testsstd.inf: -------------------------------------------------------------------------------- 1 | ## 2 | 3 | [Defines] 4 | INF_VERSION = 0x00010005 5 | BASE_NAME = testsstd 6 | FILE_GUID = 6987936E-ED34-54db-AE97-1FA5E4ED2127 7 | MODULE_TYPE = UEFI_APPLICATION 8 | VERSION_STRING = 1.0 9 | ENTRY_POINT = UefiMain 10 | 11 | [Sources] 12 | Testsstd.c 13 | [Packages] 14 | MdePkg/MdePkg.dec 15 | MdeModulePkg/MdeModulePkg.dec 16 | uefi/book/sstdPkg/sstd.dec 17 | [LibraryClasses] 18 | UefiApplicationEntryPoint 19 | UefiBootServicesTableLib 20 | BaseMemoryLib 21 | BaseLib 22 | MemoryAllocationLib 23 | sstdLib 24 | 25 | [Protocols] 26 | 27 | [FeaturePcd] 28 | 29 | [Pcd.common] 30 | 31 | [Guids] 32 | 33 | [BuildOptions] 34 | -------------------------------------------------------------------------------- /book/systemtable/BS/BS.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/systemtable/BS/BS.c -------------------------------------------------------------------------------- /book/systemtable/BS/BS.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = BS 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | BS.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | 17 | [LibraryClasses] 18 | UefiApplicationEntryPoint 19 | UefiLib 20 | DebugLib 21 | 22 | [BuildOptions] 23 | 24 | -------------------------------------------------------------------------------- /book/systemtable/ST/ST.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/systemtable/ST/ST.c -------------------------------------------------------------------------------- /book/systemtable/ST/ST.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = ST 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | ST.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | 17 | [LibraryClasses] 18 | UefiApplicationEntryPoint 19 | 20 | [BuildOptions] 21 | 22 | -------------------------------------------------------------------------------- /book/systemtable/gRT/RT.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/systemtable/gRT/RT.c -------------------------------------------------------------------------------- /book/systemtable/gRT/RT.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = gRT 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | RT.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | 17 | [LibraryClasses] 18 | UefiApplicationEntryPoint 19 | UefiBootServicesTableLib 20 | UefiRuntimeServicesTableLib 21 | UefiLib 22 | MemoryAllocationLib 23 | 24 | [BuildOptions] 25 | 26 | -------------------------------------------------------------------------------- /book/systemtable/gST/ST.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhenghuadai/uefi-programming/5db3df15577a90ee32ed063a41ab742f5411f9c4/book/systemtable/gST/ST.c -------------------------------------------------------------------------------- /book/systemtable/gST/ST.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = gST 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | ST.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | 17 | [LibraryClasses] 18 | UefiApplicationEntryPoint 19 | UefiBootServicesTableLib 20 | 21 | [BuildOptions] 22 | 23 | -------------------------------------------------------------------------------- /book/systemtable/memory/BSmem.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = BSmem 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | BSmem.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | 17 | [LibraryClasses] 18 | UefiApplicationEntryPoint 19 | UefiLib 20 | DebugLib 21 | 22 | [BuildOptions] 23 | MSFT:*_*_IA32_CC_FLAGS = /wd4305 24 | -------------------------------------------------------------------------------- /book/thread/SimpleThread/SimpleThread.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = SimpleThread 18 | FILE_GUID = 4ea97c46-7491-4dfd-b442-74798713ce5e 19 | VERSION_STRING = 0.1 20 | MODULE_TYPE = UEFI_DRIVER 21 | ENTRY_POINT = UefiMain 22 | # 23 | # VALID_ARCHITECTURES = IA32 X64 IPF 24 | # 25 | 26 | [Sources] 27 | SimpleThread.c 28 | dmthread.c 29 | 30 | [Packages] 31 | MdePkg/MdePkg.dec 32 | MdeModulePkg/MdeModulePkg.dec 33 | 34 | [LibraryClasses] 35 | UefiDriverEntryPoint 36 | UefiLib 37 | PrintLib 38 | BaseMemoryLib 39 | UefiHiiServicesLib 40 | 41 | [Protocols] 42 | gEfiPciIoProtocolGuid 43 | gEfiGraphicsOutputProtocolGuid 44 | gEfiHiiDatabaseProtocolGuid 45 | gEfiHiiImageProtocolGuid 46 | gEfiHiiConfigRoutingProtocolGuid 47 | gEfiHiiStringProtocolGuid 48 | gEfiSimplePointerProtocolGuid 49 | gEfiCpuArchProtocolGuid 50 | gEfiSmmBase2ProtocolGuid 51 | 52 | [BuildOptions] 53 | GCC:*_*_IA32_CC_FLAGS = -O0 54 | MSFT:*_*_*_CC_FLAGS = -DNEFI_SHELL_FILE_PROTOCOL -DUSE_SIMPLE_STDIO /GL- /wd4804 /wd4201 /Oi- /FAs 55 | 56 | -------------------------------------------------------------------------------- /book/thread/TestSthread/SimpleThread.h: -------------------------------------------------------------------------------- 1 | link ../SimpleThread/SimpleThread.h -------------------------------------------------------------------------------- /book/thread/TestSthread/TestSimpleThread.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # A simple, basic, application showing how the Hello application could be 3 | # built using the "Standard C Libraries" from StdLib. 4 | # 5 | # Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
6 | # This program and the accompanying materials 7 | # are licensed and made available under the terms and conditions of the BSD License 8 | # which accompanies this distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license. 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | ## 14 | 15 | [Defines] 16 | INF_VERSION = 0x00010006 17 | BASE_NAME = TestSimpleThread 18 | FILE_GUID = 5ea97c46-7491-4dfd-b442-74798713ce5f 19 | VERSION_STRING = 0.1 20 | MODULE_TYPE = UEFI_APPLICATION 21 | ENTRY_POINT = UefiMain 22 | # 23 | # VALID_ARCHITECTURES = IA32 X64 IPF 24 | # 25 | 26 | [Sources] 27 | TestSimpleThread.c 28 | 29 | [Packages] 30 | MdePkg/MdePkg.dec 31 | MdeModulePkg/MdeModulePkg.dec 32 | 33 | [LibraryClasses] 34 | UefiApplicationEntryPoint 35 | UefiLib 36 | PrintLib 37 | 38 | [Protocols] 39 | 40 | [BuildOptions] 41 | GCC:*_*_IA32_CC_FLAGS = -O0 42 | 43 | -------------------------------------------------------------------------------- /book/thread/setjmp/Main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | EFI_STATUS 5 | EFIAPI 6 | UefiMain ( 7 | IN EFI_HANDLE ImageHandle, 8 | IN EFI_SYSTEM_TABLE *SystemTable 9 | ) 10 | { 11 | BASE_LIBRARY_JUMP_BUFFER* jmpBuf; 12 | BASE_LIBRARY_JUMP_BUFFER* JumpBuffer; 13 | UINTN SetJumpFlag; 14 | SystemTable -> ConOut-> OutputString(SystemTable->ConOut, L"test SetJump\n"); 15 | jmpBuf = AllocatePool (sizeof (BASE_LIBRARY_JUMP_BUFFER) + BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT); 16 | JumpBuffer = ALIGN_POINTER (jmpBuf, BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT); 17 | 18 | SetJumpFlag = SetJump (JumpBuffer); 19 | if(SetJumpFlag == 0){ 20 | SystemTable -> ConOut-> OutputString(SystemTable->ConOut, L"SetJump return 0\n"); 21 | LongJump(JumpBuffer, 1); 22 | }else if(SetJumpFlag == 1) { 23 | SystemTable -> ConOut-> OutputString(SystemTable->ConOut, L"SetJump return 1\n"); 24 | LongJump(JumpBuffer, 2); 25 | } 26 | SystemTable -> ConOut-> OutputString(SystemTable->ConOut, L"SetJump return 2\n"); 27 | FreePool(jmpBuf); 28 | return EFI_SUCCESS; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /book/thread/setjmp/Main.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010006 3 | BASE_NAME = TestJmp 4 | FILE_GUID = 4ea97c46-7491-4dfd-b442-747010f3ce5f 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 0.1 7 | ENTRY_POINT = UefiMain 8 | # 9 | # VALID_ARCHITECTURES = IA32 X64 IPF 10 | # 11 | [Sources] 12 | Main.c 13 | 14 | [Packages] 15 | MdePkg/MdePkg.dec 16 | 17 | [LibraryClasses] 18 | UefiApplicationEntryPoint 19 | UefiLib 20 | BaseLib 21 | MemoryAllocationLib 22 | 23 | [BuildOptions] 24 | MSFT:Debug_*_IA32_CC_FLAGS = /FAs 25 | MSFT:Debug_*_X64_CC_FLAGS = /FAs 26 | 27 | --------------------------------------------------------------------------------