Сделать домашней|Добавить в избранное
 
 
baltic_kurs » Материалы за Декабрь 2005 года
Сортировать статьи по: дате | популярности | посещаемости | комментариям | алфавиту

Emergen-C

Автор: Stevenpaw от 22-12-2005, 14:18
Emergen-C

We've decided what Haskell type to represent the C function with, what the result data will be represented by, and how its memory will be managed. We've chosen a representation for flags to the function, and worked out how to get C strings to and from code inspecting it. So let's write the complete function for compiling PCRE regular expressions from Haskell: -- file: ch17/PCRE-compile. Hs compile :: ByteString - [PCREOption] - Either String Regex compile str flags = unsafePerformIO $ useAsCString str $ pattern - do alloca $ errptr - do alloca $ erroffset - do pcre_ptr - c_pcre_compile pattern (combineOptions flags) errptr erroffset nullPtr if pcre_ptr == nullPtr then do err - peekCString = peek errptr return (Left err) else do reg - newForeignPtr finalizerFree pcre_ptr -- release with free() return (Right (Regex reg str)) That's it! Let's carefully walk ...

Clang 3.5 documentation

Автор: CharlesMab от 9-12-2005, 05:49
Clang 3.5 documentation

This document assumes a basic familiarity with C. Are a C language extension for creating anonymous functions. Users interact with and transfer block objects using, which are represented like a normal pointer. A block may capture values from local variables; when this occurs, memory must be dynamically allocated.

The initial allocation is done on the stack, but the runtime provides a function which, given a block pointer, either copies the underlying block object to the heap, setting its reference count to 1 and returning the new block pointer, or (if the block object is already on the heap) increases its reference count by 1. The paired function is, which decreases the reference count by 1 and destroys the object if the count reaches zero and is on the heap. Objective-C is a set of language extensions, significan...

Video: C-section

Автор: WilliamSn от 3-12-2005, 07:39
Video: C-section

Narrator: About 1 in 4 women delivers her baby via cesarean section, or C-section, as it's commonly known. Although vaginal delivery is the natural and preferred method for childbirth, a C-section may be performed for the safety of mother and baby. Bruce W.

Johnston, M. D. : Preoperatively, the process begins early during the prenatal care if the patient knows she's going to have an elective cesarean section. And then we talk about what she is to expect the anesthetic or analgesia she's going to receive, the fact that she'll have a Foley catheter in her bladder (to drain urine), and that once she comes into the room, there will be many people in the room, including her scrub nurse, the anesthesiologist, the pediatrician and then the core of people that will a...

C-Hud by Abelardo

Автор: Renetreaskext от 3-12-2005, 01:25
C-Hud by Abelardo </div>
			<div class=