Форум

Data.BG Форуми: *** TOP SECRET MICROSOFT CODE *** - Data.BG Форуми

Прехвърляне към съдържание

  • (3 Страници) +
  • 1
  • 2
  • 3
  • Вие не можете да започнете нова тема
  • Вие не може да отговаряте на тази тема

*** TOP SECRET MICROSOFT CODE ***

#1
Потребителят е неактивен   vex 

  • Група: Потребители
  • Мнения: 50
  • Регистриран: 12-May 03
  • Репутация: 0
Project: Version - Windows Longhorn

Microsoft marketing strategy (MARKET.EXE):

#include <nonsense.h>

#include <lies.h>

#include <spyware.h> /* Microsoft Network Connectivity library */

#include <process.h> /* For the court of law */



#define say(x) lie(x)

#define computeruser ALL_WANT_TO_BUY_OUR_BUGWARE

#define next_year soon

#define the_product_is_ready_to_ship   another_beta_version



void main()

{

 if (latest_window_version>one_month_old)

 {

   if (there_are_still_bugs)

	 market(bugfix);

   if (sales_drop_below_certain_point)

	 raise(RUMOURS_ABOUT_A_NEW_BUGLESS_VERSION);

 }

 while(everyone_chats_about_new_version)

 {

   make_false_promise(it_will_be_multitasking); /* Standard Call, in

												   lie.h */

   if (rumours_grow_wilder)

	 make_false_promise(it_will_be_plug_n_play);

   if (rumours_grow_even_wilder)

   {

	 market_time=ripe;

	 say("It will be ready in one month);

	 order(programmers, stop_fixing_bugs_in_old_version);

	 order(programmers, start_brainstorm_about_new_version);

	 order(marketingstaff, permission_to_spread_nonsense);

	 vapourware=TRUE;

	 break;

	}

 }

 switch (nasty_questions_of_the_worldpress)

 {

	case WHEN_WILL_IT_BE_READY:

	  say("It will be ready in", today+30_days," we're just testing");

	  break;

   case WILL_THIS_PLUG_AND_PLAY_THING_WORK:

	  say("Yes it will work");

	  ask(programmers, why_does_it_not_work);

	  pretend(there_is_no_problem);

	  break;

	case WHAT_ARE_MINIMAL_HARDWARE_REQUIREMENTS:

	  say("It will run on a 8086 with lightning speed due to"

		  " the 32 bits architecture");

	  inform(INTEL, "Pentium sales will rise skyhigh");

	  inform(SAMSUNG, "Start a new memorychip plant"

			 "'cos all those customers will need at least 32 megs");

	  inform(QUANTUM, "Thanks to our fatware your sales will triple");

	  get_big_bonus(INTEL, SAMSUNG, QUANTUM);

	  break;

	case DOES_MICROSOFT_GET_TOO_MUCH_INFLUENCE:

	  say("Oh no, we are just here to make a better world for

		   everyone");

	  register(journalist, Big_Bill_Book);

	  when(time_is_ripe)

	  {

		arrest(journalist);

		brainwash(journalist);

		when(journalist_says_windows95_is_bugfree)

		{

		  order(journalist, "write a nice objective article");

		  release (journalist);

		}

	  }

	  break;

  }

  while (vapourware)

  {

	introduction_date++; /* Delay */

	if (no_one_believes_anymore_there_will_be_a_release)

	  break;

	say("It will be ready in",today+ONE_MONTH);

 }

 release(beta_version)

 while (everyone_is_dumb_enough_to_buy_our_bugware)

 {

   bills_bank_account += 150*megabucks;

   release(new_and_even_better_beta_version);

   introduce(more_memory_requirements);

   if (customers_report_installation_problems)

   {

	 say("that is a hardware problem, not a software problem");

	 if   (smart_customer_says_but_you_promised_plug_and_pla



y)

	 {

	   ignore(customer);

	   order(microsoft_intelligence_agency, "Keep an eye on this

											 bastard");

	 }

   }

   if ( bills_bank_account>skyhigh && marriage>two_years )

   {

	   divorce(woman_that_was_beatifull_when_I_married_he



r);

	 wave(dollars, at_lusty_chicks);

	 marry(young_blond_virgin_with_big_boobies);

	 devirginize(young_blond_virgin_with_big_boobies);

	 if (boobies_start_to_hang)



	   dump(young_blond_virgin_with_big_boobies);

   }

   if (there_is_another_company)

   {

	 steal(their_ideas);

	 accuse(compagny, stealing_our_ideas);

	 hire(a_lot_of_lawyers); /* in process.h */

	   wait(until_other_company_cannot_afford_another_law



suit);

	 buy_out(other_company);

   }

 }

 /* Now everyone realizes that we sell bugware and they are all angry at

	us */

 order(plastic_surgeon, make_bill_look_like_poor_bastard);

 buy(nice_little_island); hire(harem);

 laugh_at(everyone,

 for_having_the_patience_year_after_year_for_anothe



r_unfinished_version);

}





void bugfix(void)

{

 charge (a_lot_of_money)

 if   (customer_says_he_does_not_want_to_pay_for_bugfix)





   say("It is not a bugfix but a new version");

 if (still_complaints)

 {

   ignore(customer);

   register(customer, big_Bill_book);

   /* We'll get him when everyone uses Billware!!*/

 }

}


##################
# Source Code Windows 2000
#

#include "win31.h"

#include "win95.h"

#include "win98.h"

#include "workst~1.h"

#include "evenmore.h"

#include "oldstuff.h"

#include "billrulz.h"

#include "monopoly.h"

#include "backdoor.h"

#define INSTALL = HARD



char make_prog_look_big(16000000);

void main()

{

 while(!CRASHED)

 {

   display_copyright_message();

   display_bill_rules_message();

   do_nothing_loop();



   if (first_time_installation)

	 {

	 make_100_megabyte_swapfile();

	 do_nothing_loop();

	 totally_screw_up_HPFS_file_system();

	 search_and_destroy_the_rest_of-OS2();

	 make_futile_attempt_to_damage_Linux();

	 disable_Netscape();

	 disable_RealPlayer();

	 disable_Lotus_Products();

	 hang_system();

	 } //if

   write_something(anything);

   display_copyright_message();

   do_nothing_loop();

   do_some_stuff();



   if (still_not_crashed)

   {

   display_copyright_message();

   do_nothing_loop();

   basically_run_windows_31();

   do_nothing_loop();

   } // if

 } //while



 if (detect_cache())

   disable_cache();



 if (fast_cpu())

   {

   set_wait_states(lots);

   set_mouse(speed,very_slow);

   set_mouse(action,jumpy);

   set_mouse(reaction,sometimes);

   } //if



 /* printf("Welcome to Windows 3.1");	*/

 /* printf("Welcome to Windows 3.11");   */

 /* printf("Welcome to Windows 95");	 */

 /* printf("Welcome to Windows NT 3.0"); */

 /* printf("Welcome to Windows 98");	 */

 /* printf("Welcome to Windows NT 4.0"); */

 printf("Welcome to Windows 2000");



 if (system_ok())

   crash(to_dos_prompt)

 else

   system_memory = open("a:swp0001.swp",O_CREATE);



 while(something)

   {

   sleep(5);

   get_user_input();

   sleep(5);

   act_on_user_input();

   sleep(5);

   } // while

 create_general_protection_fault();



} // main


source
0

#2
Потребителят е неактивен   funshits 

  • Група: Потребители
  • Мнения: 643
  • Регистриран: 24-September 04
  • Репутация: 0
  • Град:In The Middle of no where !!!
По дяволите защо ми е притрябвал Сорс кода на Windows ? :)
0

#3
Потребителят е неактивен   vex 

  • Група: Потребители
  • Мнения: 50
  • Регистриран: 12-May 03
  • Репутация: 0

Funshits каза:

По дяволите защо ми е притрябвал Сорс кода на Windows ? :)


ако си беше направил труда да го прочетеш вместо да пишеш на сляпо, щеше да разбереш :)
0

#4
Потребителят е неактивен   nrpg 

  • Група: Потребители
  • Мнения: 40
  • Регистриран: 15-June 05
  • Репутация: 0
  • Пол:Мъж
  • Град:София
  • Интереси:Програмиране
понякога сорсовете могат да бъдат и смешни :)
0

#5
Потребителят е неактивен   archivator 

  • Група: Потребители
  • Мнения: 1447
  • Регистриран: 28-July 04
  • Репутация: 0
Не е честно!!1!1!11!
Първият сорс код ми дава грешка при компилация.
Expected } after some_character_goes_here
Какво да правя ?!?!? :)
Иначе е доста добро. Но, съвсем сериозно, има грешки в синтаксиса :)
0

#6
Потребителят е неактивен   funshits 

  • Група: Потребители
  • Мнения: 643
  • Регистриран: 24-September 04
  • Репутация: 0
  • Град:In The Middle of no where !!!

vex каза:

Funshits каза:

По дяволите защо ми е притрябвал Сорс кода на Windows ? :)


ако си беше направил труда да го прочетеш вместо да пишеш на сляпо, щеше да разбереш :)



извинявай наистина моя грешка :) аа тва е ебати гаврата :)
0

#7
Потребителят е неактивен   encode 

  • Група: Потребители
  • Мнения: 86
  • Регистриран: 03-March 05
  • Репутация: 0
  • Град:In the middle of nowhere...
С какво трябва да бъде зареден този сорс с C++ ли
0

#8
Потребителят е неактивен   khalderon 

  • Група: Потребители
  • Мнения: 475
  • Регистриран: 12-February 04
  • Репутация: 0
  • Пол:Мъж
  • Град:Констанц, Германия
Хахаха, леле, скъсах се да се хиля!!! :) :) :) :) :evil: :)
0

#9
Потребителят е неактивен   zetxx 

  • Група: Потребители
  • Мнения: 21
  • Регистриран: 15-November 03
  • Репутация: 0
  • Пол:Мъж
:)
0

#10
Потребителят е неактивен   zaekcho 

  • Група: Потребители
  • Мнения: 505
  • Регистриран: 12-June 04
  • Репутация: 3
  • Пол:Мъж

Цитат

if (there_is_another_company)
{
steal(their_ideas);
accuse(compagny, stealing_our_ideas);
hire(a_lot_of_lawyers); /* in process.h */
wait(until_other_company_cannot_afford_another_law

suit);
buy_out(other_company);


Оооо, йеееееееее !

For all the sins you will commit
You'll beg forgiveness and none I'll give


Football manager addicted!
0

#11
Потребителят е неактивен   nintendo 

  • Група: Потребители
  • Мнения: 1262
  • Регистриран: 06-December 03
  • Репутация: 13
  • Пол:Мъж
Алелелеле, бацеее, прочетех го целия и се връголих от стола :) :sign: :) :!:
0

#12
Потребителят е неактивен   royalaaa 

  • Група: Потребители
  • Мнения: 342
  • Регистриран: 18-October 04
  • Репутация: 1
хахах, някой хора си нямат работа
0

#13
Потребителят е неактивен   deathmatch 

  • Група: Потребители
  • Мнения: 195
  • Регистриран: 07-January 06
  • Репутация: 0
  • Град:Сектор "Г"

royalaaa каза:

хахах, някой хора си нямат работа

да прав си
0

#14
Потребителят е неактивен   anatolk 

  • Група: Потребители
  • Мнения: 916
  • Регистриран: 02-April 05
  • Репутация: 1
  • Град:София

Цитат

Project: Version - Windows Longhorn

Аз доколкото си спомням същият код го видях за първи път преди около 8-9 години. Оттогава май само му сменят версията на Уиндоус.
0

#15
Потребителят е неактивен   vex 

  • Група: Потребители
  • Мнения: 50
  • Регистриран: 12-May 03
  • Репутация: 0

anatolk каза:

Аз доколкото си спомням същият код го видях за първи път преди около 8-9 години. Оттогава май само му сменят версията на Уиндоус.


е, нещата не са се променили много нали?
0

#16
Потребителят е неактивен   gomaker 

  • Група: Потребители
  • Мнения: 857
  • Регистриран: 14-February 05
  • Репутация: 99
  • Пол:Мъж
  • Интереси:Chess, C, C++
Този смешен код е пускан вече. Ето ви само малко от един ИСТИНСКИ КОД НА Windows 2000 Server да видите за какво става дума:

/****************************** Module Header ******************************

* Module Name: drawtext.c

*

* Copyright (c) 1985 - 1999, Microsoft Corporation

*

* This module contains common text drawing functions.

*

* History:

* 02-12-92 mikeke   Moved Drawtext to the client side

***************************************************************************/






/***************************************************************************

* Define some macros to test the format flags. We won't support them all

* on the kernel-mode side, since they're not all needed there.

***************************************************************************/


#ifdef _USERK_

	#define CALCRECT(wFormat)			   FALSE

	#define EDITCONTROL(wFormat)			FALSE

	#define EXPANDTABS(wFormat)			 FALSE

	#define EXTERNALLEADING(wFormat)		FALSE

	#define MODIFYSTRING(wFormat)		   FALSE

	#define NOPREFIX(wFormat)			   TRUE

	#define PATHELLIPSIS(wFormat)		   FALSE

	#define SINGLELINE(wFormat)			 TRUE

	#define TABSTOP(wFormat)				FALSE

	#define WORDBREAK(wFormat)			  FALSE

	#define WORDELLIPSIS(wFormat)		   FALSE

	#define NOFULLWIDTHCHARBREAK(dwFormat)  FALSE

#else

	#define CALCRECT(wFormat)			   (wFormat & DT_CALCRECT)

	#define EDITCONTROL(wFormat)			(wFormat & DT_EDITCONTROL)

	#define EXPANDTABS(wFormat)			 (wFormat & DT_EXPANDTABS)

	#define EXTERNALLEADING(wFormat)		(wFormat & DT_EXTERNALLEADING)

	#define MODIFYSTRING(wFormat)		   (wFormat & DT_MODIFYSTRING)

	#define NOPREFIX(wFormat)			   (wFormat & DT_NOPREFIX)

	#define PATHELLIPSIS(wFormat)		   (wFormat & DT_PATH_ELLIPSIS)

	#define SINGLELINE(wFormat)			 (wFormat & DT_SINGLELINE)

	#define TABSTOP(wFormat)				(wFormat & DT_TABSTOP)

	#define WORDBREAK(wFormat)			  (wFormat & DT_WORDBREAK)

	#define WORDELLIPSIS(wFormat)		   (wFormat & DT_WORD_ELLIPSIS)

	// Note: DT_NOFULLWIDTHCHARBREAK exceeds WORD limit. Use dwFormat

	//  rather than wFormat.

	#define NOFULLWIDTHCHARBREAK(dwFormat)  (dwFormat & DT_NOFULLWIDTHCHARBREAK)

#endif

#define ENDELLIPSIS(wFormat)		(wFormat & DT_END_ELLIPSIS)

#define NOCLIP(wFormat)			 (wFormat & DT_NOCLIP)

#define RTLREADING(wFormat)		 (wFormat & DT_RTLREADING)

#define HIDEPREFIX(wFormat)		 (wFormat & DT_HIDEPREFIX)



/***************************************************************************

* Stuff used in DrawText code

***************************************************************************/




#define CR 13

#define LF 10

#define DT_HFMTMASK 0x03

#define DT_VFMTMASK 0x0C

#define ETO_OPAQUEFGND 0x0A



static CONST WCHAR szEllipsis[CCHELLIPSIS+1] = TEXT("...");



extern HDC	ghdcBits2;



/* Max length of a full path is around 260. But, most of the time, it will

 * be less than 128. So, we alloc only this much on stack. If the string is

 * longer, we alloc from local heap (which is slower).

 *

 * BOGUS: For international versions, we need to give some more margin here.

 */

#define MAXBUFFSIZE	 128



/***************************************************************************

*  There are word breaking characters which are compatible with

* Japanese Windows 3.1 and FarEast Windows 95.

*

*  SJ - Country Japan , Charset SHIFTJIS, Codepage  932.

*  GB - Country PRC   , Charset GB2312  , Codepage  936.

*  B5 - Country Taiwan, Charset BIG5	, Codepage  950.

*  WS - Country Korea , Charset WANGSUNG, Codepage  949.

*  JB - Country Korea , Charset JOHAB   , Codepage 1361. *** LATER ***

*

* [START BREAK CHARACTERS]

*

*   These character should not be the last charatcer of the line.

*

*  Unicode   Japan	  PRC	 Taiwan	 Korea

*  -------+---------+---------+---------+---------+

*

* + ASCII

*

*   U+0024 (SJ+0024)					 (WS+0024) Dollar sign

*   U+0028 (SJ+0028)					 (WS+0028) Opening parenthesis

*   U+003C (SJ+003C)							   Less-than sign

*   U+005C (SJ+005C)							   Backslash

*   U+005B (SJ+005B) (GB+005B)		   (WS+005B) Opening square bracket

*   U+007B (SJ+007B) (GB+007B)		   (WS+007B) Opening curly bracket

*

* + General punctuation

*

*   U+2018							   (WS+A1AE) Single Turned Comma Quotation Mark

*   U+201C							   (WS+A1B0) Double Comma Quotation Mark

*

* + CJK symbols and punctuation

*

*   U+3008							   (WS+A1B4) Opening Angle Bracket

*   U+300A (SJ+8173)					 (WS+A1B6) Opening Double Angle Bracket

*   U+300C (SJ+8175)					 (WS+A1B8) Opening Corner Bracket

*   U+300E (SJ+8177)					 (WS+A1BA) Opening White Corner Bracket

*   U+3010 (SJ+9179)					 (WS+A1BC) Opening Black Lenticular Bracket

*   U+3014 (SJ+816B)					 (WS+A1B2) Opening Tortoise Shell Bracket

*

* + Fullwidth ASCII variants

*

*   U+FF04							   (WS+A3A4) Fullwidth Dollar Sign

*   U+FF08 (SJ+8169)					 (WS+A3A8) Fullwidth opening parenthesis

*   U+FF1C (SJ+8183)							   Fullwidth less-than sign

*   U+FF3B (SJ+816D)					 (WS+A3DB) Fullwidth opening square bracket

*   U+FF5B (SJ+816F)					 (WS+A3FB) Fullwidth opening curly bracket

*

* + Halfwidth Katakana variants

*

*   U+FF62 (SJ+00A2)							   Halfwidth Opening Corner Bracket

*

* + Fullwidth symbol variants

*

*   U+FFE1							   (WS+A1CC) Fullwidth Pound Sign

*   U+FFE6							   (WS+A3DC) Fullwidth Won Sign

*

* [END BREAK CHARACTERS]

*

*   These character should not be the top charatcer of the line.

*

*  Unicode   Japan	  PRC	 Taiwan	 Korea

*  -------+---------+---------+---------+---------+

*

* + ASCII

*

*   U+0021 (SJ+0021) (GB+0021) (B5+0021) (WS+0021) Exclamation mark

*   U+0025							   (WS+0025) Percent Sign

*   U+0029 (SJ+0029)					 (WS+0029) Closing parenthesis

*   U+002C (SJ+002C) (GB+002C) (B5+002C) (WS+002C) Comma

*   U+002E (SJ+002E) (GB+002E) (B5+002E) (WS+002E) Priod

*   U+003A							   (WS+003A) Colon

*   U+003B							   (WS+003B) Semicolon

*   U+003E (SJ+003E)							   Greater-than sign

*   U+003F (SJ+003F) (GB+003F) (B5+003F) (WS+003F) Question mark

*   U+005D (SJ+005D) (GB+005D) (B5+005D) (WS+005D) Closing square bracket

*   U+007D (SJ+007D) (GB+007D) (B5+007D) (WS+007D) Closing curly bracket

*

* + Latin1

*

*   U+00A8		   (GB+A1A7)					 Spacing diaeresis

*   U+00B0							   (WS+A1C6) Degree Sign

*   U+00B7					 (B5+A150)		   Middle Dot

*

* + Modifier letters

*

*   U+02C7		   (GB+A1A6)					 Modifier latter hacek

*   U+02C9		   (GB+A1A5)					 Modifier letter macron

*

* + General punctuation

*

*   U+2013					 (B5+A156)		   En Dash

*   U+2014					 (b5+A158)		   Em Dash

*   U+2015		   (GB+A1AA)					 Quotation dash

*   U+2016		   (GB+A1AC)					 Double vertical bar

*   U+2018		   (GB+A1AE)					 Single turned comma quotation mark

*   U+2019		   (GB+A1AF) (B5+A1A6) (WS+A1AF) Single comma quotation mark

*   U+201D		   (GB+A1B1) (B5+A1A8) (WS+A1B1) Double comma quotation mark

*   U+2022		   (GB+A1A4)					 Bullet

*   U+2025					 (B5+A14C)		   Two Dot Leader

*   U+2026		   (GB+A1AD) (B5+A14B)		   Horizontal ellipsis

*   U+2027					 (B5+A145)		   Hyphenation Point

*   U+2032					 (B5+A1AC) (WS+A1C7) Prime

*   U+2033							   (WS+A1C8) Double Prime

*

* + Letterlike symbols

*

*   U+2103							   (WS+A1C9) Degrees Centigrade

*

* + Mathemetical opetartors

*

*   U+2236		   (GB+A1C3)					 Ratio

*

* + Form and Chart components

*

*   U+2574					 (B5+A15A)		   Forms Light Left

*

* + CJK symbols and punctuation

*

*   U+3001 (SJ+8141) (GB+A1A2) (B5+A142)		   Ideographic comma

*   U+3002 (SJ+8142) (GB+A1A3) (B5+A143)		   Ideographic period

*   U+3003		   (GB+A1A8)					 Ditto mark

*   U+3005		   (GB+A1A9)					 Ideographic iteration

*   U+3009		   (GB+A1B5) (B5+A172) (WS+A1B5) Closing angle bracket

*   U+300B (SJ+8174) (GB+A1B7) (B5+A16E) (WS+A1B7) Closing double angle bracket

*   U+300D (SJ+8176) (GB+A1B9) (B5+A176) (WS+A1B9) Closing corner bracket

*   U+300F (SJ+8178) (GB+A1BB) (B5+A17A) (WS+A1BB) Closing white corner bracket

*   U+3011 (SJ+817A) (GB+A1BF) (B5+A16A) (WS+A1BD) Closing black lenticular bracket

*   U+3015 (SJ+816C) (GB+A1B3) (B5+A166) (WS+A1B3) Closing tortoise shell bracket

*   U+3017		   (GB+A1BD)					 Closing white lenticular bracket

*   U+301E					 (B5+A1AA)		   Double Prime Quotation Mark

*

* + Hiragana

*

*   U+309B (SJ+814A)							   Katakana-Hiragana voiced sound mark

*   U+309C (SJ+814B)							   Katakana-Hiragana semi-voiced sound mark

*

* + CNS 11643 compatibility

*

*   U+FE30					 (B5+A14A)		   Glyph for Vertical 2 Dot Leader

*   U+FE31					 (B5+A157)		   Glyph For Vertical Em Dash

*   U+FE33					 (B5+A159)		   Glyph for Vertical Spacing Underscore

*   U+FE34					 (B5+A15B)		   Glyph for Vertical Spacing Wavy Underscore

*   U+FE36					 (B5+A160)		   Glyph For Vertical Closing Parenthesis

*   U+FE38					 (B5+A164)		   Glyph For Vertical Closing Curly Bracket

*   U+FE3A					 (B5+A168)		   Glyph For Vertical Closing Tortoise Shell Bracket

*   U+FE3C					 (B5+A16C)		   Glyph For Vertical Closing Black Lenticular Bracket

*   U+FE3E					 (B5+A16E)		   Closing Double Angle Bracket

*   U+FE40					 (B5+A174)		   Glyph For Vertical Closing Angle Bracket

*   U+FE42					 (B5+A178)		   Glyph For Vertical Closing Corner Bracket

*   U+FE44					 (B5+A17C)		   Glyph For Vertical Closing White Corner Bracket

*   U+FE4F					 (B5+A15C)		   Spacing Wavy Underscore

*

* + Small variants

*

*   U+FE50					 (B5+A14D)		   Small Comma

*   U+FE51					 (B5+A14E)		   Small Ideographic Comma

*   U+FE52					 (B5+A14F)		   Small Period

*   U+FE54					 (B5+A151)		   Small Semicolon

*   U+FE55					 (B5+A152)		   Small Colon

*   U+FE56					 (B5+A153)		   Small Question Mark

*   U+FE57					 (B5+A154)		   Small Exclamation Mark

*   U+FE5A					 (B5+A17E)		   Small Closing Parenthesis

*   U+FE5C					 (B5+A1A2)		   Small Closing Curly Bracket

*   U+FE5E					 (B5+A1A4)		   Small Closing Tortoise Shell Bracket

*

* + Fullwidth ASCII variants

*

*   U+FF01 (SJ+8149) (GB+A3A1) (B5+A149) (WS+A3A1) Fullwidth exclamation mark

*   U+FF02		   (GB+A3A2)					 Fullwidth Quotation mark

*   U+FF05							   (WS+A3A5) Fullwidth Percent Sign

*   U+FF07		   (GB+A3A7)					 Fullwidth Apostrophe

*   U+FF09 (SJ+816A) (GB+A3A9) (B5+A15E) (WS+A3A9) Fullwidth Closing parenthesis

*   U+FF0C (SJ+8143) (GB+A3AC) (B5+A141) (WS+A3AC) Fullwidth comma

*   U+FF0D		   (GB+A3AD)					 Fullwidth Hyphen-minus

*   U+FF0E (SJ+8144)		   (B5+A144) (WS+A3AE) Fullwidth period

*   U+FF1A		   (GB+A3BA) (B4+A147) (WS+A3BA) Fullwidth colon

*   U+FF1B		   (GB+A3BB) (B5+A146) (WS+A3BB) Fullwidth semicolon

*   U+FF1E (SJ+8184)							   Fullwidth Greater-than sign

*   U+FF1F (SJ+8148) (GB+A3BF) (B5+A148) (WS+A3BF) Fullwidth question mark

*   U+FF3D (SJ+816E) (GB+A3DD)		   (WS+A3DD) Fullwidth Closing square bracket

*   U+FF5C					 (B5+A155)		   Fullwidth Vertical Bar

*   U+FF5D (SJ+8170)		   (B5+A162) (WS+A3FD) Fullwidth Closing curly bracket

*   U+FF5E		   (GB+A1AB)					 Fullwidth Spacing tilde

*

* + Halfwidth Katakana variants

*

*   U+FF61 (SJ+00A1)							   Halfwidth Ideographic period

*   U+FF63 (SJ+00A3)							   Halfwidth Closing corner bracket

*   U+FF64 (SJ+00A4)							   Halfwidth Ideographic comma

*   U+FF9E (SJ+00DE)							   Halfwidth Katakana voiced sound mark

*   U+FF9F (SJ+00DF)							   Halfwidth Katakana semi-voiced sound mark

*

* + Fullwidth symbol variants

*

*   U+FFE0							   (WS+A1CB) Fullwidth Cent Sign

*

***************************************************************************/




#if 0   // not currently used --- FYI only

/***************************************************************************

* Start Break table

*  These character should not be the last charatcer of the line.

***************************************************************************/




CONST BYTE aASCII_StartBreak[] = {

/* 00	   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */

/* 2X */				1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,

/* 3X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,

/* 4X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 5X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,

/* 6X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 7X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1

};



CONST BYTE aCJKSymbol_StartBreak[] = {

/* 30	   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */

/* 0X */							1, 0, 1, 0, 1, 0, 1, 0,

/* 1X */	1, 0, 0, 0, 1

};



CONST BYTE aFullWidthHalfWidthVariants_StartBreak[] = {

/* FF	   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */

/* 0X */				1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,

/* 1X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,

/* 2X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 3X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,

/* 4X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 5X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,

/* 6X */	0, 0, 1

};

#endif



/***************************************************************************

* End Break table.

*  These character should not be the top charatcer of the line.

***************************************************************************/




CONST BYTE aASCII_Latin1_EndBreak[] = {

/* 00	   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */

/* 2X */	   1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0,

/* 3X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1,

/* 4X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 5X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,

/* 6X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 7X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,

/* 8X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 9X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* AX */	0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,

/* BX */	1, 0, 0, 0, 0, 0, 0, 1

};



CONST BYTE aGeneralPunctuation_EndBreak[] = {

/* 20	   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */

/* 1X */			 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0,

/* 2X */	0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,

/* 3X */	0, 0, 1, 1

};



CONST BYTE aCJKSymbol_EndBreak[] = {

/* 30	   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */

/* 0X */	   1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1,

/* 1X */	0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1

};



CONST BYTE aCNS11643_SmallVariants_EndBreak[] = {

/* FE	   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */

/* 3X */	1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,

/* 4X */	1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,

/* 5X */	1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1

};



CONST BYTE aFullWidthHalfWidthVariants_EndBreak[] = {

/* FF	   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */

/* 0X */	   1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0,

/* 1X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1,

/* 2X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 3X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,

/* 4X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 5X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,

/* 6X */	0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 7X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 8X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

/* 9X */	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1

};



/***************************************************************************

*  UserIsFELineBreak() - Detects Far East word breaking characters.		 *

*																		   *

* History:																  *

* 10-Mar-1996 HideyukN  Created.											*

***************************************************************************/




#if 0   // not currently used --- FYI only

BOOL UserIsFELineBreakStart(WCHAR wch)

{

	switch (wch>>8) {

		case 0x00:

			//

			// Check if word breaking chars in ASCII.

			//

			if ((wch >= 0x0024) && (wch <= 0x007B))

				return((BOOL)(aASCII_StartBreak[wch - 0x0024]));

			else

				return(FALSE);



		case 0x20:

			//

			// Check if work breaking chars in "General punctuation"

			//

			if ((wch == 0x2018) || (wch == 0x201C))

				return(TRUE);

			else

				return(FALSE);



		case 0x30:

			//

			// Check if word breaking chars in "CJK symbols and punctuation"

			// and Hiragana.

			//

			if ((wch >= 0x3008) && (wch <= 0x3014))

				return((BOOL)(aCJKSymbol_StartBreak[wch - 0x3008]));

			else

				return(FALSE);



		case 0xFF:

			//

			// Check if word breaking chars in "Fullwidth ASCII variants",

			// "Halfwidth Katakana variants" or "Fullwidth Symbol variants".

			//

			if ((wch >= 0xFF04) && (wch <= 0xFF62))

				return((BOOL)(aFullWidthHalfWidthVariants_StartBreak[
wch - 0xFF04]));

			else if ((wch == 0xFFE1) || (wch == 0xFFE6))

				return(TRUE);

			else

				return(FALSE);



		default:

			return(FALSE);

	}

}

#endif



BOOL UserIsFELineBreakEnd(WCHAR wch)

{

	switch (wch>>8) {

		case 0x00:

			//

			// Check if word breaking chars in ASCII or Latin1.

			//

			if ((wch >= 0x0021) && (wch <= 0x00B7))

				return((BOOL)(aASCII_Latin1_EndBreak[wch - 0x0021]));

			else

				return(FALSE);



		case 0x02:

			//

			// Check if work breaking chars in "Modifier letters"

			//

			if ((wch == 0x02C7) || (wch == 0x02C9))

				return(TRUE);

			else

				return(FALSE);



		case 0x20:

			//

			// Check if work breaking chars in "General punctuation"

			//

			if ((wch >= 0x2013) && (wch <= 0x2033))

				return((BOOL)(aGeneralPunctuation_EndBreak[
wch - 0x2013]));

			else

				return(FALSE);



		case 0x21:

			//

			// Check if work breaking chars in "Letterlike symbols"

			//

			if (wch == 0x2103)

				return(TRUE);

			else

				return(FALSE);



		case 0x22:

			//

			// Check if work breaking chars in "Mathemetical opetartors"

			//

			if (wch == 0x2236)

				return(TRUE);

			else

				return(FALSE);



		case 0x25:

			//

			// Check if work breaking chars in "Form and Chart components"

			//

			if (wch == 0x2574)

				return(TRUE);

			else

				return(FALSE);



		case 0x30:

			//

			// Check if word breaking chars in "CJK symbols and punctuation"

			// and Hiragana.

			//

			if ((wch >= 0x3001) && (wch <= 0x301E))

				return((BOOL)(aCJKSymbol_EndBreak[wch - 0x3001]));

			else if ((wch == 0x309B) || (wch == 0x309C))

				return(TRUE);

			else

				return(FALSE);



		case 0xFE:

			//

			// Check if word breaking chars in "CNS 11643 compatibility"

			// or "Small variants".

			//

			if ((wch >= 0xFE30) && (wch <= 0xFE5E))

				return((BOOL)(aCNS11643_SmallVariants_EndBreak[
wch - 0xFE30]));

			else

				return(FALSE);



		case 0xFF:

			//

			// Check if word breaking chars in "Fullwidth ASCII variants",

			// "Halfwidth Katakana variants" or "Fullwidth symbol variants".

			//

			if ((wch >= 0xFF01) && (wch <= 0xFF9F))

				return((BOOL)(aFullWidthHalfWidthVariants_EndBreak[
wch - 0xFF01]));

			else if (wch >= 0xFFE0)

				return(TRUE);

			else

				return(FALSE);



		default:

			return(FALSE);

	}

}



#define UserIsFELineBreak(wChar)	UserIsFELineBreakEnd(wChar)



/***************************************************************************

*  UserIsFullWidth() - Detects Far East FullWidth character.				*

*																		   *

* History:																  *

* 10-Mar-1996 HideyukN  Created											 *

***************************************************************************/




typedef struct _FULLWIDTH_UNICODE {

	WCHAR Start;

	WCHAR End;

} FULLWIDTH_UNICODE, *PFULLWIDTH_UNICODE;



#define NUM_FULLWIDTH_UNICODES	4



CONST FULLWIDTH_UNICODE FullWidthUnicodes[] = {

   { 0x4E00, 0x9FFF }, // CJK_UNIFIED_IDOGRAPHS

   { 0x3040, 0x309F }, // HIRAGANA

   { 0x30A0, 0x30FF }, // KATAKANA

   { 0xAC00, 0xD7A3 }  // HANGUL

};



BOOL UserIsFullWidth(DWORD dwCodePage,WCHAR wChar)

{

	INT  index;

	INT  cChars;

#ifdef _USERK_

	CHAR aChars[2];

#endif // _USERK_



	//

	// Early out for ASCII.

	//

	if (wChar < 0x0080) {

		//

		// if the character < 0x0080, it should be a halfwidth character.

		//

		return (FALSE);

	}

	//

	// Scan FullWdith definition table... most of FullWidth character is

	// defined here... this is more faster than call NLS API.

	//

	for (index = 0; index < NUM_FULLWIDTH_UNICODES; index++) {

		if ((wChar >= FullWidthUnicodes[index].Start) &&

			(wChar <= FullWidthUnicodes[index].End)	  ) {

			return (TRUE);

		}

	}

	//

	// if this Unicode character is mapped to Double-Byte character,

	// this is also FullWidth character..

	//

#ifdef _USERK_

	cChars = EngWideCharToMultiByte((UINT)dwCodePage,&wChar,
sizeof(WCHAR),aChars,sizeof(aChars));

#else

	cChars = WideCharToMultiByte((UINT)dwCodePage,0,&wChar,
1,NULL,0,NULL,NULL);

#endif // _USERK_



	return(cChars > 1 ? TRUE : FALSE);

}

/***************************************************************************

*  UserTextOutWInternal

*  Wrapper for UserTextOutW, used to adjust the parameter passed to

*  PSMTextOut

*

***************************************************************************/


BOOL UserTextOutWInternal(

	HDC	 hdc,

	int	 x,

	int	 y,

	LPCWSTR lp,

	UINT	cc,

	DWORD   dwFlags)

{

	UNREFERENCED_PARAMETER(dwFlags);

	return UserTextOutW(hdc, x, y, lp, cc);

}





/*-----------------------------------------------------------
---------------*/

/*																		  */

/*  KKGetPrefixWidth() -													*/

/*																		  */

/*  Returns total width of prefix character. Japanese Windows has		   */

/*  three shortcut prefixes, '&',036 and 037.  They may have			  */

/*  different width.														*/

/*																		  */

/*	From Chicago ctlmgr.c HideyukN										*/

/*-----------------------------------------------------------
---------------*/



int KKGetPrefixWidth(HDC hdc, LPCWSTR lpStr, int cch)

{

	SIZE size;

	SIZE iPrefix1 = {-1L,-1L};

	SIZE iPrefix2 = {-1L,-1L};

	SIZE iPrefix3 = {-1L,-1L};

	int  iTotal   = 0;



	while (cch-- > 0 && *lpStr) {

		switch(*lpStr) {

		case CH_PREFIX:

			if (lpStr[1] != CH_PREFIX) {

				if (iPrefix1.cx == -1) {

					UserGetTextExtentPointW(hdc, lpStr, 1, &iPrefix1);

				}

				iTotal += iPrefix1.cx;

			} else {

				lpStr++;

				cch--;

			}

			break;

		case CH_ENGLISHPREFIX:

			if (iPrefix2.cx == -1) {

				 UserGetTextExtentPointW(hdc, lpStr, 1, &iPrefix2);

			}

			iTotal += iPrefix2.cx;

			break;

		case CH_KANJIPREFIX:

			if (iPrefix3.cx == -1) {

				 UserGetTextExtentPointW(hdc, lpStr, 1, &iPrefix3);

			}

			iTotal += iPrefix3.cx;

			//

			// In NT, always alpha numeric mode, Then we have to sum

			// KANA accel key prefix non visible char width.

			// so always add the extent for next char.

			//

			UserGetTextExtentPointW(hdc, lpStr, 1, &size);

			iTotal += size.cx;

			break;

		default:

			// No need to taking care of Double byte since 2nd byte of

			// DBC is grater than 0x2f but all shortcut keys are less

			// than 0x30.

			break;

		}

		lpStr++;

	}

	return iTotal;

}



/*-----------------------------------------------------------
---------------*/

/*																		  */

/*  GetNextWordbreak() -													*/

/*	From Chicago ctlmgr.c  FritzS										 */

/*																		  */

/*-----------------------------------------------------------
---------------*/



LPCWSTR GetNextWordbreak(DWORD dwCodePage,

						 LPCWSTR lpch,

						 LPCWSTR lpchEnd,

						 DWORD  dwFormat,

						 LPDRAWTEXTDATA lpDrawInfo)



{

	/* ichNonWhite is used to make sure we always make progress. */

	int ichNonWhite = 1;

	int ichComplexBreak = 0;		// Breaking opportunity for complex scripts

#if ((DT_WORDBREAK & ~0xff) != 0)

#error cannot use BOOLEAN for DT_WORDBREAK, or you should use "!!" before assigning it

#endif

	BOOLEAN fBreakSpace = (BOOLEAN)WORDBREAK(dwFormat);

	/*

	 * If DT_WORDBREAK and DT_NOFULLWIDTHCHARBREAK are both set, we must

	 * stop assuming FullWidth characters as word as we're doing in

	 * NT4 and Win95. Instead, CR/LF and/or white space will only be

	 * a line-break characters.

	 */

	BOOLEAN fDbcsCharBreak = (fBreakSpace && !NOFULLWIDTHCHARBREAK(dwFormat));



#ifdef _USERK_

	/*

	 * Well, we actually should not and do not call GetNextWordBreak() in

	 * kernel, since only Menu stuff (no word break!) calls DrawText from kernel.

	 * In reality, thanks to a smart linker, word-break helper

	 * functions even does not exist in win32k.sys.

	 * Later, we should explicitly omit to compile those routines when we

	 * build kernel.

	 */

	UNREFERENCED_PARAMETER(dwFormat);

#endif



	// We must terminate this loop before lpch == lpchEnd, otherwise, we

	// may gp fault during *lpch.

	while (lpch < lpchEnd) {

		switch (*lpch) {

		case CR:

		case LF:

			return lpch;



		case 't':

		case ' ':

			if (fBreakSpace)

				return (lpch + ichNonWhite);



			/*** FALL THRU ***/



		default:

			/*

			 * Since most Japanese writing don't use space character

			 * to separate each word, we define each Kanji character

			 * as a word.

			 */

			if (fDbcsCharBreak && UserIsFullWidth(dwCodePage, *lpch)) {

				if (!ichNonWhite)

					return lpch;

				/*

				 * if the next character is the last character of this string,

				 * We return the character, even this is a "KINSOKU" charcter...

				 */

				if ((lpch+1) != lpchEnd) {

					/*

					 * Check next character of FullWidth character.

					 * if the next character is "KINSOKU" character, the character

					 * should be handled as a part of previous FullWidth character.

					 * Never handle is as A character, and should not be a Word also.

					 */

					if (UserIsFELineBreak(*(lpch+1))) {

						/*

						 * Then if the character is "KINSOKU" character, we return

						 * the next of this character,...

						 */

						return (lpch + 1 + 1);

					}

				}

				/*

				 * Otherwise, we just return the chracter that is next of FullWidth

				 * Character. Because we treat A FullWidth chacter as A Word.

				 */

				return (lpch + 1);

			}

			/*

			 * If the character is not a FullWidth character and the complex script

			 * LPK is present. Call it to determine the breaking opportunity for

			 * script that requires word break such as Thai. Note that if *lpch is

			 * NOT a complex script character. The LPK will fail the call and return 0

			 * since currently Uniscribe does not know how to handle FE break.

			 */

			else if(fBreakSpace && lpDrawInfo->bCharsetDll) {

#ifdef _USERK_

				PTHREADINFO ptiCurrent = PtiCurrentShared();

				if(CALL_LPK(ptiCurrent))

#endif

					ichComplexBreak = (*UserLpkDrawTextEx)(0, 0, 0, lpch, (int)(lpchEnd - lpch), 0,

										0, NULL, DT_GETNEXTWORD, -1);

				if (ichComplexBreak > 0)

					return (lpch + ichComplexBreak);

			}

			lpch++;

			ichNonWhite = 0;

		}

	}



	return lpch;

}



/***************************************************************************

* GetPrefixCount

*

* This routine returns the count of accelerator mnemonics and the

* character location (starting at 0) of the character to underline.

* A single CH_PREFIX character will be striped and the following character

* underlined, all double CH_PREFIX character sequences will be replaced by

* a single CH_PREFIX (this is done by PSMTextOut). This routine is used

* to determine the actual character length of the string that will be

* printed, and the location the underline should be placed. Only

* cch characters from the input string will be processed. If the lpstrCopy

* parameter is non-NULL, this routine will make a printable copy of the

* string with all single prefix characters removed and all double prefix

* characters collapsed to a single character. If copying, a maximum

* character count must be specified which will limit the number of

* characters copied.

*

* The location of the single CH_PREFIX is returned in the low order

* word, and the count of CH_PREFIX characters that will be striped

* from the string during printing is in the hi order word. If the

* high order word is 0, the low order word is meaningless. If there

* were no single prefix characters (i.e. nothing to underline), the

* low order word will be -1 (to distinguish from location 0).

*

* These routines assume that there is only one single CH_PREFIX character

* in the string.

*

* WARNING! this rountine returns information in BYTE count not CHAR count

* (so it can easily be passed onto GreExtTextOutW which takes byte

* counts as well)

*

* History:

* 11-13-90 JimA		 Ported to NT

* 30-Nov-1992 mikeke	Client side version

***************************************************************************/




LONG GetPrefixCount(

	LPCWSTR lpstr,

	int cch,

	LPWSTR lpstrCopy,

	int charcopycount)

{

	int chprintpos = 0;		 /* Num of chars that will be printed */

	int chcount = 0;			/* Num of prefix chars that will be removed */

	int chprefixloc = -1;	   /* Pos (in printed chars) of the prefix */

	WCHAR ch;



	/*

	 * If not copying, use a large bogus count...

	 */

	if (lpstrCopy == NULL)

		charcopycount = 32767;



	while ((cch-- > 0) && *lpstr && charcopycount-- != 0) {



		/*

		 * Is this guy a prefix character ?

		 */

		if ((ch = *lpstr++) == CH_PREFIX) {



			/*

			 * Yup - increment the count of characters removed during print.

			 */

			chcount++;



			/*

			 * Is the next also a prefix char?

			 */

			if (*lpstr != CH_PREFIX) {



				/*

				 * Nope - this is a real one, mark its location.

				 */

				chprefixloc = chprintpos;



			} else {



				/*

				 * yup - simply copy it if copying.

				 */

				if (lpstrCopy != NULL)

					*(lpstrCopy++) = CH_PREFIX;

				cch--;

				lpstr++;

				chprintpos++;

			}

		} else if (ch == CH_ENGLISHPREFIX) {	// Still needs to be parsed

			/*

			 * Yup - increment the count of characters removed during print.

			 */

			chcount++;



			/*

			 * Next character is a real one, mark its location.

			 */

			chprefixloc = chprintpos;



		} else if (ch == CH_KANJIPREFIX) {	  // Still needs to be parsed

			/*

			 * We only support Alpha Numeric(CH_ENGLISHPREFIX).

			 * no support for Kana(CH_KANJIPREFIX).

			 */

			/*

			 * Yup - increment the count of characters removed during print.

			 */

			chcount++;



			if(cch) {

				/* don't copy the character */

				chcount++;

				lpstr++;

				cch--;

			}

		} else {



			/*

			 * Nope - just inc count of char.  that will be printed

			 */

			chprintpos++;

			if (lpstrCopy != NULL)

				*(lpstrCopy++) = ch;

		}

	}



	if (lpstrCopy != NULL)

		*lpstrCopy = 0;



	/*

	 * Return the character counts

	 */

	return MAKELONG(chprefixloc, chcount);

}



/***************************************************************************

*  DT_GetExtentMinusPrefixes

***************************************************************************/




int DT_GetExtentMinusPrefixes(HDC hdc, LPCWSTR lpchStr, int cchCount, UINT wFormat, 

						int iOverhang, LPDRAWTEXTDATA  lpDrawInfo, int iCharSet)

{

  int  iPrefixCount;

  int  cxPrefixes = 0;

  WCHAR PrefixChar = CH_PREFIX;

  SIZE size;

  PCLIENTINFO pci = GetClientInfo();

#ifdef _USERK_

  PTHREADINFO ptiCurrent = PtiCurrentShared();

#endif

  UNREFERENCED_PARAMETER(wFormat);



  if(!NOPREFIX(wFormat) &&

	  (iPrefixCount = HIWORD(GetPrefixCount(lpchStr, cchCount, NULL, 0)))) {

	  //

	  // Kanji Windows has three shortcut prefixes...

	  //  (ported from Win95 ctlmgr.c)

	  //

	  if (IS_DBCS_ENABLED() && (pci->dwTIFlags & TIF_16BIT)) {

		  // 16bit apps compatibility

		  cxPrefixes = KKGetPrefixWidth(hdc, lpchStr, cchCount) - (iPrefixCount * iOverhang);

	  }

	  else {

		  if(lpDrawInfo->bCharsetDll) {

#ifdef _USERK_

			  if(CALL_LPK(ptiCurrent))

#endif // _USERK_

			  {

				  // Call LPKDrawTextEx with fDraw = FALSE just to get the text extent.

				  return (*UserLpkDrawTextEx)(hdc, 0, 0, lpchStr, cchCount, FALSE,

						 wFormat, lpDrawInfo, DT_CHARSETDRAW, iCharSet);

			  }

		  } else {

			  cxPrefixes = UserGetTextExtentPointW(hdc, &PrefixChar, 1, &size);

			  cxPrefixes = size.cx - iOverhang;

			  cxPrefixes *=  iPrefixCount;

		  }

	  }

  }

#ifdef _USERK_

  if(CALL_LPK(ptiCurrent))

	xxxClientGetTextExtentPointW(hdc, lpchStr, cchCount, &size);

  else

#endif // _USERK_

	UserGetTextExtentPointW(hdc, lpchStr, cchCount, &size);

  return (size.cx - cxPrefixes);

}



/***************************************************************************

*   DT_DrawStr

*	  This will draw the given string in the given location without worrying

*  about the left/right justification. Gets the extent and returns it.

*  If fDraw is TRUE and if NOT DT_CALCRECT, this draws the text.

*		NOTE: This returns the extent minus Overhang.

*

*   From Chicago ctlmgr.c  FritzS

***************************************************************************/


int DT_DrawStr(HDC hdc, int  xLeft, int yTop, LPCWSTR lpchStr,

			   int cchCount, BOOL fDraw, UINT wFormat,

			   LPDRAWTEXTDATA  lpDrawInfo, int iCharSet)

{

	LPCWSTR		lpch;

	int   iLen;

	int   cxExtent;

	int   xOldLeft = xLeft;  // Save the xLeft given to compute the extent later

	int   xTabLength = lpDrawInfo->cxTabLength;

	int   iTabOrigin = lpDrawInfo->rcFormat.left;



#ifdef USE_MIRRORING

	//

	// Because xLeft and yTop is a point in a rect, and we shift the rect in a mirrored hdc to include

	// its most right pixel, then shift this point as well.

	//

	if (UserGetLayout(hdc) & LAYOUT_RTL) {

		--xOldLeft;

		--xLeft;

	}

#endif



	//

	// if there is a charset dll, let it draw the text.

	//

	if(lpDrawInfo->bCharsetDll) {

#ifdef _USERK_

		PTHREADINFO ptiCurrent = PtiCurrentShared();



		//

		// Don't perform a callback if in thread cleanup mode.

		//

		if(!CALL_LPK(ptiCurrent))

			return 0;

#endif // _USERK_

		return (*UserLpkDrawTextEx)(hdc, xLeft, yTop, lpchStr, cchCount, fDraw,

				   wFormat, lpDrawInfo, DT_CHARSETDRAW, iCharSet);

	}



	// Check if the tabs need to be expanded

	if(EXPANDTABS(wFormat)) {

		while(cchCount) {

			// Look for a tab

			for(iLen = 0, lpch = lpchStr; iLen < cchCount; iLen++)

				  if(*lpch++ == TEXT('t'))

					break;



				// Draw text, if any, upto the tab

			if (iLen) {

				// Draw the substring taking care of the prefixes.

				if (fDraw && !CALCRECT(wFormat)) { // Only if we need to draw text

					(*(lpDrawInfo->lpfnTextDraw))(hdc, xLeft, yTop, (LPWSTR)lpchStr, iLen, wFormat);

				}

				// Get the extent of this sub string and add it to xLeft.

				xLeft += DT_GetExtentMinusPrefixes(hdc, lpchStr, iLen, wFormat, lpDrawInfo->cxOverhang, lpDrawInfo, iCharSet) - lpDrawInfo->cxOverhang;

			}



			//if a TAB was found earlier, calculate the start of next sub-string.

			if (iLen < cchCount) {

				iLen++;  // Skip the tab

				if (xTabLength) // Tab length could be zero

					xLeft = (((xLeft - iTabOrigin)/xTabLength) + 1)*xTabLength + iTabOrigin;

			}



			// Calculate the details of the string that remains to be drawn.

			cchCount -= iLen;

			lpchStr = lpch;

		}

		cxExtent = xLeft - xOldLeft;

	} else {

		// If required, draw the text (with either PSMTextOut or PSTextOut)

		if (fDraw && !CALCRECT(wFormat)) {

			(*(lpDrawInfo->lpfnTextDraw))(hdc, xLeft, yTop, (LPWSTR)lpchStr, cchCount, wFormat);

		}

		// Compute the extent of the text.

		cxExtent = DT_GetExtentMinusPrefixes(hdc, lpchStr, cchCount, wFormat,

											 lpDrawInfo->cxOverhang, lpDrawInfo, iCharSet) - lpDrawInfo->cxOverhang;

	}

	return cxExtent;

}



/***************************************************************************

*  DT_DrawJustifiedLine

*	  This function draws one complete line with proper justification

*

*   from Chicago ctlmgr.c  FritzS

***************************************************************************/




void DT_DrawJustifiedLine(HDC  hdc, int yTop, LPCWSTR lpchLineSt,

								 int cchCount, UINT wFormat,

								 LPDRAWTEXTDATA lpDrawInfo, int iCharSet)

{

  LPRECT lprc;

  int   cxExtent;

  int   xLeft;



  lprc = &(lpDrawInfo->rcFormat);

  xLeft = lprc->left;



  // Handle the special justifications (right or centered) properly.

  if(wFormat & (DT_CENTER | DT_RIGHT)) {

	  cxExtent = DT_DrawStr(hdc, xLeft, yTop, lpchLineSt, cchCount, FALSE,

					 wFormat, lpDrawInfo, iCharSet) + lpDrawInfo->cxOverhang;

	  if(wFormat & DT_CENTER)

		  xLeft = lprc->left + (((lprc->right - lprc->left) - cxExtent) >> 1);

	  else

		  xLeft = lprc->right - cxExtent;

	} else

	  xLeft = lprc->left;



  // Draw the whole line.

  cxExtent = DT_DrawStr(hdc, xLeft, yTop, lpchLineSt, cchCount, TRUE, wFormat,

						lpDrawInfo, iCharSet) +lpDrawInfo->cxOverhang;

  if(cxExtent > lpDrawInfo->cxMaxExtent)

	  lpDrawInfo->cxMaxExtent = cxExtent;

}



/***************************************************************************

* DT_InitDrawTextInfo

*	  This is called at the begining of DrawText(); This initializes the

* DRAWTEXTDATA structure passed to this function with all the required info.

*

*  from Chicago ctlmgr.c  FritzS

***************************************************************************/




BOOL DT_InitDrawTextInfo(

	HDC hdc,

	LPRECT lprc,

	UINT wFormat,

	LPDRAWTEXTDATA lpDrawInfo,

	LPDRAWTEXTPARAMS lpDTparams)

{

  SIZE   sizeViewPortExt = {0, 0},sizeWindowExt = {0, 0};

  TEXTMETRICW tm;

  LPRECT	  lprcDest;

  int		 iTabLength = 8;   // Default Tab length is 8 characters.

  int		 iLeftMargin;

  int		 iRightMargin;

  BOOL		fUseSystemFont;



  if (lpDTparams) {

	  /*

	   *  Only if DT_TABSTOP flag is mentioned, we must use the iTabLength field.

	   */

	  if (TABSTOP(wFormat))

		  iTabLength = lpDTparams->iTabLength;

	  iLeftMargin = lpDTparams->iLeftMargin;

	  iRightMargin = lpDTparams->iRightMargin;

  } else {

	  iLeftMargin = iRightMargin = 0;

  }



  /*

   *  Get the View port and Window extents for the given DC

   *  If this call fails, hdc must be invalid

   */

  if (!UserGetViewportExtEx(hdc,&sizeViewPortExt))
 {

#ifndef _USERK_

	  /*

	   * This call fails on  standard Metafiles. So check

	   * if the DC is really invalid to be compatible with

	   * Win9x

	   */

	  if ((hdc == NULL) || !GdiValidateHandle(hdc))

#endif

		  return FALSE;

  }

  UserGetWindowExtEx(hdc, &sizeWindowExt);



  /*

   *  For the current mapping mode,  find out the sign of x from left to right.

   */

  lpDrawInfo->iXSign =

	  (((sizeViewPortExt.cx ^ sizeWindowExt.cx) & 0x80000000) ? -1 : 1);



  /*

   *  For the current mapping mode,  find out the sign of y from top to bottom.

   */

  lpDrawInfo->iYSign =

	  (((sizeViewPortExt.cy ^ sizeWindowExt.cy) & 0x80000000) ? -1 : 1);



  /*

   *  Calculate the dimensions of the current font in this DC.

   * (If it is SysFont AND the mapping mode is MM_TEXT, use system font's data)

   */

  fUseSystemFont = ((wFormat & DT_INTERNAL) || IsSysFontAndDefaultMode(hdc));

  if (!fUseSystemFont) {

	  /*

	   *  Edit controls have their own way of calculating the aveCharWidth.

	   */

	  if (EDITCONTROL(wFormat)) {

		  tm.tmAveCharWidth = UserGetCharDimensionsW(hdc, &tm, NULL);

		  tm.tmCharSet = (BYTE)UserGetTextCharsetInfo(hdc, NULL, 0);

		  if (tm.tmAveCharWidth == 0) {

			  fUseSystemFont = TRUE;

		  }

	  } else if (!UserGetTextMetricsW(hdc, &tm)) {

		  /*

		   * This can fail in a hard error popup during logon or logoff

		   * because UpdatePerUserSystemParameters destroys the server-side

		   * font handle for the DC, and a repaint occurs before we switch

		   * desktops (the switch recreates the popup from scratch with the

		   * new font OK). ChrisWil's changes to move system-wide attributes

		   * into desktops should take care of this in Kernel-mode.  This is

		   * just a horrible, horrible hack for now.

		   */

		  RIPMSG0(RIP_WARNING, "UserGetTextMetricsW failed: only in logon/off?n");

		  tm.tmOverhang = 0;



		  /*

		   * We should probably set fUseSystemFont to TRUE here. But I

		   *  assume that this "horrible hack" works fine plus it has been

		   *  here for good. So I'll leave it alone. 6/3/96

		   */

	  }

  }



  if (fUseSystemFont) {

	  /*

	   *  Avoid GetTextMetrics for internal calls since they use sys font.

	   */

	  tm.tmHeight = gpsi->cySysFontChar;

	  tm.tmExternalLeading = gpsi->tmSysFont.tmExternalLeading;

	  tm.tmAveCharWidth = gpsi->tmSysFont.tmAveCharWidth;

	  tm.tmOverhang = gpsi->tmSysFont.tmOverhang;

#ifdef _USERK_

	  tm.tmCharSet = (BYTE)UserGetTextCharsetInfo(gpDispInfo->hdcScreen,
 NULL, 0);

#else

	  tm.tmCharSet = (BYTE)UserGetTextCharsetInfo(ghdcBits2, NULL, 0);

#endif // _USERK_

  }





  // cyLineHeight is in pixels (This will be signed).

  lpDrawInfo->cyLineHeight = (tm.tmHeight +

			(EXTERNALLEADING(wFormat) ? tm.tmExternalLeading : 0)) *

			lpDrawInfo->iYSign;



  // cxTabLength is the tab length in pixels (This will not be signed)

  lpDrawInfo->cxTabLength = tm.tmAveCharWidth * iTabLength;



  // Set the cxOverhang

  lpDrawInfo->cxOverhang = tm.tmOverhang;



  // Pick up the proper TextOut function based on the prefix processing reqd.

#ifdef _USERK_

  lpDrawInfo->bCharsetDll = PpiCurrent()->dwLpkEntryPoints & LPK_DRAWTEXTEX;

  if (lpDrawInfo->bCharsetDll == FALSE) {

	  lpDrawInfo->lpfnTextDraw = (NOPREFIX(wFormat) ? (LPFNTEXTDRAW)UserTextOutWInternal : xxxPSMTextOut);

  }

#else

  lpDrawInfo->bCharsetDll = (BOOL)(fpLpkDrawTextEx != (FPLPKDRAWTEXTEX)NULL);

  if (lpDrawInfo->bCharsetDll == FALSE) {

	  lpDrawInfo->lpfnTextDraw = (NOPREFIX(wFormat) ? (LPFNTEXTDRAW)UserTextOutWInternal : PSMTextOut);

  }

#endif // _USERK_



  // Set up the format rectangle based on the margins.

//  LCopyStruct(lprc, lprcDest = (LPRECT)&(lpDrawInfo->rcFormat), sizeof(RECT));

  lprcDest = &(lpDrawInfo->rcFormat);

  *lprcDest = *lprc;



  // We need to do the following only if the margins are given

  if(iLeftMargin | iRightMargin) {

	  lprcDest->left += iLeftMargin * lpDrawInfo->iXSign;

	  lprcDest->right -= (lpDrawInfo->cxRightMargin = iRightMargin * lpDrawInfo->iXSign);

	} else

	  lpDrawInfo->cxRightMargin = 0;  // Initialize to zero.



  // cxMaxWidth is unsigned.

  lpDrawInfo->cxMaxWidth = (lprcDest->right - lprcDest->left) * lpDrawInfo->iXSign;

  lpDrawInfo->cxMaxExtent = 0;  // Initialize this to zero.



  return TRUE;

}



/***************************************************************************

* DT_AdjustWhiteSpaces

*	  In the case of WORDWRAP, we need to treat the white spaces at the

* begining/end of each line specially. This function does that.

*  lpStNext = points to the begining of next line.

*  lpiCount = points to the count of characters in the current line.

***************************************************************************/




LPCWSTR  DT_AdjustWhiteSpaces(LPCWSTR  lpStNext, LPINT lpiCount, UINT wFormat)

{

  switch(wFormat & DT_HFMTMASK) {

	  case DT_LEFT:

		// Prevent a white space at the begining of a left justfied text.

		// Is there a white space at the begining of next line......

		if((*lpStNext == TEXT(' ')) || (*lpStNext == TEXT('t'))) {

			// ...then, exclude it from next line.

			lpStNext++;

		  }

		break;



	  case DT_RIGHT:

		// Prevent a white space at the end of a RIGHT justified text.

		// Is there a white space at the end of current line,.......

		if((*(lpStNext-1) == TEXT(' ')) || (*(lpStNext - 1) == TEXT('t'))) {

			// .....then, Skip the white space from the current line.

			(*lpiCount)--;

		  }

		break;



	  case DT_CENTER:

		// Exclude white spaces from the begining and end of CENTERed lines.

		// If there is a white space at the end of current line.......

		if((*(lpStNext-1) == TEXT(' ')) || (*(lpStNext - 1) == TEXT('t')))

			(*lpiCount)--;	//...., don't count it for justification.

		// If there is a white space at the begining of next line.......

		if((*lpStNext == TEXT(' ')) || (*lpStNext == TEXT('t')))

			lpStNext++;	   //...., exclude it from next line.

		break;

	}

  return lpStNext;

}



/***************************************************************************

*  DT_BreakAWord

*	  A word needs to be broken across lines and this finds out where to

*  break it.

***************************************************************************/


LPCWSTR  DT_BreakAWord(HDC  hdc, LPCWSTR lpchText,

			  int iLength, int iWidth, UINT wFormat, int iOverhang, LPDRAWTEXTDATA  lpDrawInfo, int iCharSet)

{

  int  iLow = 0, iHigh = iLength;

  int  iNew;





  while((iHigh - iLow) > 1) {

	  iNew = iLow + (iHigh - iLow)/2;

	  if(DT_GetExtentMinusPrefixes(hdc, lpchText, iNew, wFormat, iOverhang, lpDrawInfo, iCharSet) > iWidth)

		  iHigh = iNew;

	  else

		  iLow = iNew;

	}

  // If the width is too low, we must print atleast one char per line.

  // Else, we will be in an infinite loop.

  if(!iLow && iLength)

	  iLow = 1;

  return (lpchText+iLow);

}



/***************************************************************************

* DT_GetLineBreak

*	  This finds out the location where we can break a line.

* Returns LPCSTR to the begining of next line.

* Also returns via lpiLineLength, the length of the current line.

* NOTE: (lpstNextLineStart - lpstCurrentLineStart) is not equal to the

* line length; This is because, we exclude some white spaces at the begining

* and/or end of lines; Also, CR/LF is excluded from the line length.

***************************************************************************/




LPWSTR DT_GetLineBreak(

	HDC  hdc,

	LPCWSTR lpchLineStart,

	int   cchCount,

	DWORD dwFormat,

	LPINT lpiLineLength,

	LPDRAWTEXTDATA  lpDrawInfo,

	int iCharSet)

{

  LPCWSTR lpchText, lpchEnd, lpch, lpchLineEnd;

  int   cxStart, cxExtent, cxNewExtent;

  BOOL  fAdjustWhiteSpaces = FALSE;

  WCHAR  ch;

  DWORD dwCodePage = USERGETCODEPAGE(hdc);



  cxStart = lpDrawInfo->rcFormat.left;

  cxExtent = cxNewExtent = 0;

  lpchText = lpchLineStart;

  lpchEnd = lpchLineStart + cchCount;





  while(lpchText < lpchEnd) {

	  lpchLineEnd = lpch = GetNextWordbreak(dwCodePage,lpchText, lpchEnd, dwFormat, lpDrawInfo);

	  // DT_DrawStr does not return the overhang; Otherwise we will end up

	  // adding one overhang for every word in the string.



	  // For simulated Bold fonts, the summation of extents of individual

	  // words in a line is greater than the extent of the whole line. So,

	  // always calculate extent from the LineStart.

	  // BUGTAG: #6054 -- Win95B -- SANKAR -- 3/9/95 --

	  cxNewExtent = DT_DrawStr(hdc, cxStart, 0, lpchLineStart, (int)(((PBYTE)lpch - (PBYTE)lpchLineStart)/sizeof(WCHAR)),
 FALSE,

				 dwFormat, lpDrawInfo, iCharSet);



	  if (WORDBREAK(dwFormat) && ((cxNewExtent + lpDrawInfo->cxOverhang) > lpDrawInfo->cxMaxWidth)) {

		  // Are there more than one word in this line?

		  if (lpchText != lpchLineStart)  {

			  lpchLineEnd = lpch = lpchText;

			  fAdjustWhiteSpaces = TRUE;

		  } else {

			  //One word is longer than the maximum width permissible.

			  //See if we are allowed to break that single word.

			  if(EDITCONTROL(dwFormat) && !WORDELLIPSIS(dwFormat)) {

				  lpchLineEnd = lpch = DT_BreakAWord(hdc, lpchText, (int)(((PBYTE)lpch - (PBYTE)lpchText)/sizeof(WCHAR)),

						lpDrawInfo->cxMaxWidth - cxExtent,

						dwFormat,

						lpDrawInfo->cxOverhang, lpDrawInfo, iCharSet); //Break that word

				  //Note: Since we broke in the middle of a word, no need to

				  // adjust for white spaces.

			  } else {

				  fAdjustWhiteSpaces = TRUE;

				  // Check if we need to end this line with ellipsis

				  if(WORDELLIPSIS(dwFormat))

					{

					  // Don't do this if already at the end of the string.

					  if (lpch < lpchEnd)

						{

						  // If there are CR/LF at the end, skip them.

						  if ((ch = *lpch) == CR || ch == LF)

							{

							  if ((++lpch < lpchEnd) && (*lpch == (WCHAR)(ch ^ (LF ^ CR))))

								  lpch++;

							  fAdjustWhiteSpaces = FALSE;

							}

						}

					}

			  }

		  }

		  // Well! We found a place to break the line. Let us break from this

		  // loop;

		  break;

	  } else {

		  // Don't do this if already at the end of the string.

		  if (lpch < lpchEnd) {

			  if ((ch = *lpch) == CR || ch == LF) {

				  if ((++lpch < lpchEnd) && (*lpch == (WCHAR)(ch ^ (LF ^ CR))))

					  lpch++;

				  fAdjustWhiteSpaces = FALSE;

				  break;

			  }

		  }

	  }



	  // Point at the beginning of the next word.

	  lpchText = lpch;

	  cxExtent = cxNewExtent;

  }



  // Calculate the length of current line.

  *lpiLineLength = (INT)((PBYTE)lpchLineEnd - (PBYTE)lpchLineStart)/sizeof(WCHAR);



  // Adjust the line length and lpch to take care of spaces.

  if(fAdjustWhiteSpaces && (lpch < lpchEnd))

	  lpch = DT_AdjustWhiteSpaces(lpch, lpiLineLength, dwFormat);



  // return the begining of next line;

  return (LPWSTR)lpch;

}



/***************************************************************************

*  NeedsEndEllipsis()

*	  This function checks whether the given string fits within the given

*	  width or we need to add end-ellipse. If it required end-ellipses, it

*	  returns TRUE and it returns the number of characters that are saved

*	  in the given string via lpCount.

***************************************************************************/


BOOL  NeedsEndEllipsis(HDC		hdc,

									 LPCWSTR	 lpchText,

									 LPINT	  lpCount,

									 LPDRAWTEXTDATA  lpDTdata,

									 UINT	   wFormat, LPDRAWTEXTDATA  lpDrawInfo, int iCharSet)

{

	int   cchText;

	int   ichMin, ichMax, ichMid;

	int   cxMaxWidth;

	int   iOverhang;

	int   cxExtent;

	SIZE size;

	cchText = *lpCount;  // Get the current count.

0

#17
Потребителят е неактивен   anonra 

  • Група: Потребители
  • Мнения: 209
  • Регистриран: 26-August 04
  • Репутация: 0
  • Град:София

vex каза:

anatolk каза:

Аз доколкото си спомням същият код го видях за първи път преди около 8-9 години. Оттогава май само му сменят версията на Уиндоус.


е, нещата не са се променили много нали?

Аз пък ще си позволя да не се съглася с теб - за мен Windows успя да догони в много отношения високопроизводителните *nix-базирани системи в последно време. Освен това за голяма част от сериозните проблеми, които възникват с ОС имат вина авторите на допълнителния софтуер. Нормално е най-атакуваната система да бъде непрекъснато под лупа и постоянно критикувана за доста неща. И все пак възможностите които получаваш май си струват :)
0

#18
Потребителят е неактивен   anatolk 

  • Група: Потребители
  • Мнения: 916
  • Регистриран: 02-April 05
  • Репутация: 1
  • Град:София
Не Windows, а NT. Windows отдавна не съществува като линия. Двете са съществено различни, макар че някои модули имат заимстван код. NT не е догонвал никакви съвременни *nix -базирани системи като Linux. Той се развива като самостоятелна линия от 90-та година насам и винаги е бил стабилен поради същността на архитектурата му, която има общо с unix, но не е unix в смисъла на Linux. От първите му версии насам основите му са се променили малко и предимно се добавя нова функционалност. Всички останали Windows системи са DOS базирани и при тях е абсолютно наложително да поддържат 16 битовия модел, откъдето идва и "нестабилността" им. За разлика от тях NT отрязва абсолютно всякаква поддръжка на 16 битови приложения, като ги изпълнява само и единствено в пълна емулация и е в пълния смисъл 32 битова система, за разлика от Windows, който е голяма смесица от 16 битов и 32 битов код. Само UI-то е това, което заблуждава хората, че между Windows и NT има нещо общо.
Относно производителността - това е много спорно и зависи от контекста. Сега изглежда сравнително производителен (като бързина), но чак до 98 година се използваше много ограничено именно поради огромните ресурси, които изискваше и неадкватността му към приложения, които искат цялата мощ на машината, като игри, тежки изчислителни приложения и др. Истината е, че хардуера стана силен дотолкова, че да не се забелязва какво е разхищението на ресурси дори за най-простите неща. На практика всички системи с такава архитектура са по природа непроизводителни. Бих ги определил по-скоро като надеждни и стабилни.
А иначе, вече няма операционни системи с архитектура различна от *nix базираните, дори Macintosh премина към тази архитектура, макар че се различаваше коренно от останалите системи. При интелските процесори всички ОС сега се проектират по една и съща схема - процесор в защитен режим, привилегии при изпълнението на инструкции, използване на paging механизмите на процесора и т.н. Така че каквато и съвременна система да се проектира за IA32 тя ще е в същността си идентична с Linux, NT и останалите подобни.
За вината на авторите - валидно е за всяко нещо, но докато в DOS цялата машина беше оставена в ръцете на автора за добро или зло, то "новите Windows" показват че ако има нещо, което не толерират, то това са авторите на софтуер и точно това ги прави толкова стабилни.
0

#19
Потребителят е неактивен   izrafel 

  • Група: Потребители
  • Мнения: 1237
  • Регистриран: 19-June 04
  • Репутация: 0
  • Град:in the dark corners of the human mind

zetxx каза:

:)

0

#20
Потребителят е неактивен   paynov 

  • Група: Потребители
  • Мнения: 34
  • Регистриран: 12-November 05
  • Репутация: 0
s kakvo trqbva da gi zaredq tezi kodove
0

Споделете тази тема чрез:


  • (3 Страници) +
  • 1
  • 2
  • 3
  • Вие не можете да започнете нова тема
  • Вие не може да отговаряте на тази тема

1 потребители четат тази тема
0 регистрирани потребители, 1 гости и 0 анонимни потребители


Data.BG e форум за дискусии. Data.BG не носи отговорност за съдържанието и достоверността на публикуваните в дискусиите материали.

Никаква част от съдържанието на тази страница не може да бъде репродуцирана, записвана или предавана под каквато и да е форма или по какъвто и да е повод без писменото съгласие на Data.BG.

Close  Member Login