home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / toolkt21 / c / samples / tp / ipep.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-12  |  1.3 KB  |  46 lines

  1. #ifndef lint
  2. static char *sccsid = "@(#)ipep.c 1.3 1/22/92 16:10:26 [1/26/92] (c)IBM Corp. 1992";
  3. #endif
  4.  
  5. /*
  6.  * This class is adapted from the book
  7.  *   Class Construction in C and C++, Object Oriented Fundamentals
  8.  *   by Roger Sessions, Copyright (c) 1992 Prentice Hall.
  9.  * Reprinted with permission.
  10.  */
  11.  
  12. #define indentedParagraphs_Class_Source
  13. #include "ipep.ih"
  14.  
  15. #define PARAGRAPH_INDENTATION 3
  16. #define LINE_INDENTATION 0
  17.  
  18.  
  19. /* ************************************************************ */
  20. SOM_Scope int SOMLINK epGetParagraphIndentation(indentedParagraphs * somSelf)
  21. {
  22. /* indentedParagraphsData *somThis = indentedParagraphsGetData(somSelf); */
  23.      indentedParagraphsMethodDebug("indentedParagraphs",
  24.                     "epGetParagraphIndentation");
  25.  
  26.     somSelf;
  27.     return PARAGRAPH_INDENTATION;
  28.  
  29. }
  30.  
  31. /* ************************************************************ */
  32. SOM_Scope int SOMLINK epGetLineIndentation(indentedParagraphs * somSelf)
  33. {
  34. /* indentedParagraphsData *somThis = indentedParagraphsGetData(somSelf); */
  35.     envProcessor *lastEnv;
  36.     indentedParagraphsMethodDebug("indentedParagraphs",
  37.                   "epGetLineIndentation");
  38.     lastEnv = _epGetPreviousEnv(somSelf);
  39.     if (lastEnv)
  40.     return _epGetLineIndentation(lastEnv) +
  41.         LINE_INDENTATION;
  42.     else
  43.     return LINE_INDENTATION;
  44.  
  45. }
  46.