text
stringlengths 5
99.8k
| meta
dict |
|---|---|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Encapsulation of JavaScript transformations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%[(8 codegen javascript) hs module {%{EH}JavaScript.Trf}
%%]
-- general imports
%%[(8 codegen javascript) import(qualified Data.Map as Map, qualified Data.Set as Set)
%%]
%%[(8 codegen javascript) import(Control.Monad)
%%]
%%[(8 codegen javascript) import({%{EH}Base.Target},{%{EH}Base.Optimize})
%%]
%%[(8 codegen javascript) import({%{EH}EHC.Common})
%%]
-- JavaScript
%%[(8 codegen javascript) import({%{EH}JavaScript})
%%]
-- JavaScript transformations
%%[(8 codegen javascript) import({%{EH}JavaScript.Trf.InlineSingleUseNames})
%%]
%%[(8 codegen javascript) import({%{EH}JavaScript.Trf.CompactAndSimplify})
%%]
-- Transformation utils
%%[(8 codegen javascript) import({%{EH}CodeGen.TrfUtils})
%%]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Interface to transformations, used internally as state
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%[(8 codegen javascript) export(TrfJavaScript,emptyTrfJavaScript)
type TrfJavaScript = TrfState JavaScriptModule ()
emptyTrfJavaScript :: TrfJavaScript
emptyTrfJavaScript = mkEmptyTrfState emptyJavaScriptModule ()
%%]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Running the transformations + checks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%[(8 codegen javascript) export(trfJavaScript)
-- | Perform JavaScript transformations.
-- The 'optimScope' tells at which compilation phase (per module, whole program) the transformations are done, default only per module
trfJavaScript :: EHCOpts -> OptimizationScope -> HsName -> TrfJavaScript -> TrfJavaScript
trfJavaScript opts optimScope modNm trfjs
-- = execState trf trfjs
= runTrf opts modNm ehcOptDumpJavaScriptStages (optimScope `elem`) trfjs trf
where trf
= do { -- initial is just to obtain JavaScript for dumping stages
t_initial
-- removal of unnecessary name introductions, in particular singly used ones
; t_inl_names
-- compactify and simplify further, trivial stuff like making names shorter
; t_comp_simpl
}
-- actual transformations
t_initial = liftTrfModPlain osm "initial" $ id
t_inl_names = liftTrfModPlain osm "inl-names" $ cmodTrfInlineSingleUseNames
t_comp_simpl = liftTrfModPlain osm "comp-simpl" $ jsmodTrfCompactAndSimplify
-- abbreviations for optimatisation scope
osm = [OptimizationScope_PerModule]
%%]
|
{
"pile_set_name": "Github"
}
|
varnishtest "VMOD blob decode() n chars with URL"
varnish v1 -vcl {
import blob;
import std;
backend b None;
sub vcl_recv {
return(synth(200));
}
sub vcl_synth {
set req.http.urllcfoobar = "foo%3abar%3abaz%3aquux";
set req.http.urlucfoobar = "foo%3Abar%3Abaz%3Aquux";
set req.http.urlhobbeslc = "Man%20is%20distinguished%2c%20not%20only%20by%20his%20reason%2c%20but%20by%20this%20singular%20passion%20from%20other%20animals%2c%20which%20is%20a%20lust%20of%20the%20mind%2c%20that%20by%20a%20perseverance%20of%20delight%20in%20the%20continued%20and%20indefatigable%20generation%20of%20knowledge%2c%20exceeds%20the%20short%20vehemence%20of%20any%20carnal%20pleasure.";
set req.http.urlhobbesuc = "Man%20is%20distinguished%2C%20not%20only%20by%20his%20reason%2C%20but%20by%20this%20singular%20passion%20from%20other%20animals%2C%20which%20is%20a%20lust%20of%20the%20mind%2C%20that%20by%20a%20perseverance%20of%20delight%20in%20the%20continued%20and%20indefatigable%20generation%20of%20knowledge%2C%20exceeds%20the%20short%20vehemence%20of%20any%20carnal%20pleasure.";
set req.http.urllcumlauts = "%c3%9cbergr%c3%b6%c3%9fentr%c3%a4ger";
set req.http.urlucumlauts = "%C3%9Cbergr%C3%B6%C3%9Fentr%C3%A4ger";
set req.http.urllcphk = "sm%c3%a5b%c3%b8rnsp%c3%a6dagog";
set req.http.urlucphk = "sm%C3%A5b%C3%B8rnsp%C3%A6dagog";
set req.http.urllcutf8 = "%e6%97%a5%e6%89%bc%e8%aa%9e";
set req.http.urlucutf8 = "%E6%97%A5%E6%89%BC%E8%AA%9E";
set req.http.urlalluc = "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF";
set req.http.urlalllc = "%00%01%02%03%04%05%06%07%08%09%0a%0b%0c%0d%0e%0f%10%11%12%13%14%15%16%17%18%19%1a%1b%1c%1d%1e%1f%20%21%22%23%24%25%26%27%28%29%2a%2b%2c-.%2f0123456789%3a%3b%3c%3d%3e%3f%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5b%5c%5d%5e_%60abcdefghijklmnopqrstuvwxyz%7b%7c%7d~%7f%80%81%82%83%84%85%86%87%88%89%8a%8b%8c%8d%8e%8f%90%91%92%93%94%95%96%97%98%99%9a%9b%9c%9d%9e%9f%a0%a1%a2%a3%a4%a5%a6%a7%a8%a9%aa%ab%ac%ad%ae%af%b0%b1%b2%b3%b4%b5%b6%b7%b8%b9%ba%bb%bc%bd%be%bf%c0%c1%c2%c3%c4%c5%c6%c7%c8%c9%ca%cb%cc%cd%ce%cf%d0%d1%d2%d3%d4%d5%d6%d7%d8%d9%da%db%dc%dd%de%df%e0%e1%e2%e3%e4%e5%e6%e7%e8%e9%ea%eb%ec%ed%ee%ef%f0%f1%f2%f3%f4%f5%f6%f7%f8%f9%fa%fb%fc%fd%fe%ff";
set resp.http.decuc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 9, req.http.urlucfoobar));
set resp.http.declc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 12, req.http.urllcfoobar));
set resp.http.dechobbesuc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 27, req.http.urlhobbesuc));
set resp.http.dechobbeslc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 27, req.http.urlhobbeslc));
set resp.http.decumlautsuc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 17, req.http.urlucumlauts));
set resp.http.decumlautslc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 25, req.http.urllcumlauts));
set resp.http.decphkuc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 18, req.http.urlucphk));
set resp.http.decphklc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 30, req.http.urllcphk));
set resp.http.decutf8uc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 9, req.http.urlucutf8));
set resp.http.decutf8lc =
blob.encode(IDENTITY,
blob=blob.decode(URL, 18, req.http.urllcutf8));
set resp.http.decalluc =
blob.encode(HEX,
blob=blob.decode(URL, 252, req.http.urlalluc));
set resp.http.decalllc =
blob.encode(HEX, UPPER,
blob.decode(URL, 252, req.http.urlalllc));
set resp.http.decempty =
blob.encode(IDENTITY, blob=blob.decode(URL, 10, ""));
set resp.http.decemptybyte =
blob.encode(IDENTITY, blob=blob.decode(URL, 3, "%00"));
set resp.http.decemptypieces =
blob.encode(IDENTITY,
blob=blob.decode(URL, 1, req.http.unset + ""
+ req.http.unset + ""));
set req.http.part1 = "foo%";
set resp.http.dec2pieces =
blob.encode(IDENTITY,
blob=blob.decode(URL, 6, req.http.part1 +
"20bar%20baz%20quux"));
set req.http.part2 = "0quux";
set resp.http.dec3param =
blob.encode(blob=blob.decode(encoded=req.http.part1 +
"20bar%20baz%2" + req.http.part2,
decoding=URL, length=12),
encoding=IDENTITY);
set resp.http.dec3pieces =
blob.encode(IDENTITY,
blob=blob.decode(URL, 18, req.http.part1
+ "20bar%20baz%2"
+ req.http.part2));
set resp.http.decmanypieces =
blob.encode(IDENTITY,
blob=blob.decode(URL, 24, "" + req.http.unset
+ req.http.part1 + req.http.unset + ""
+ req.http.unset + "" + "20bar%20baz%2"
+ "" + req.http.unset + req.http.part2
+ req.http.unset + "" + req.http.unset));
}
} -start
client c1 {
txreq
rxresp
expect resp.http.decuc == "foo:bar"
expect resp.http.declc == "foo:bar:"
expect resp.http.dechobbesuc == "Man is distinguished,"
expect resp.http.dechobbeslc == "Man is distinguished,"
expect resp.http.decumlautsuc == "Übergrö"
expect resp.http.decumlautslc == "Übergrößen"
expect resp.http.decphkuc == "småbørns"
expect resp.http.decphklc == "småbørnspædagog"
expect resp.http.decutf8uc == "日"
expect resp.http.decutf8lc == "日扼"
expect resp.http.decalluc == "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f"
expect resp.http.decalllc == "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F"
expect resp.http.decempty == ""
expect resp.http.decemptybyte == ""
expect resp.http.decemptypieces == ""
expect resp.http.dec2pieces == "foo "
expect resp.http.dec3pieces == "foo bar baz "
expect resp.http.dec3param == "foo bar "
expect resp.http.decmanypieces == "foo bar baz quux"
} -run
# Decode failures
server s1 -repeat 4 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
import blob;
sub vcl_deliver {
if (req.url == "/percent") {
set resp.http.bad = blob.encode(URL, UPPER,
blob.decode(URL, 1, "%20"));
}
elsif (req.url == "/percent-two") {
set resp.http.bad = blob.encode(URL, UPPER,
blob.decode(URL, 2, "%20"));
}
elsif (req.url == "/comma") {
set resp.http.good = blob.encode(IDENTITY, blob=
blob.decode(URL, 3, "%2c%q"));
}
elsif (req.url == "/colon") {
set resp.http.good = blob.encode(IDENTITY, blob=
blob.decode(URL, 3, "%3a%2q"));
}
}
}
client c1 {
txreq -url /comma
rxresp
expect resp.status == 200
expect resp.http.good == ","
txreq -url /colon
rxresp
expect resp.status == 200
expect resp.http.good == ":"
txreq -url /percent
rxresp
expect resp.status == 503
expect resp.reason == "VCL failed"
expect resp.http.bad == <undef>
} -run
client c1 {
txreq -url /percent-two
rxresp
expect resp.status == 503
expect resp.reason == "VCL failed"
expect resp.http.bad == <undef>
} -run
logexpect l1 -v v1 -d 1 -g vxid -q "VCL_Error" {
expect * * VCL_Error "^vmod blob error: cannot decode, illegal encoding beginning with \"%20\"$"
expect * * VCL_Error "^vmod blob error: cannot decode, illegal encoding beginning with \"%20\"$"
} -run
|
{
"pile_set_name": "Github"
}
|
comment_char %
escape_char /
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Tigre language locale for Eritrea.
%
% Charset: UTF-8
%
% Tigre terms are provided by Mussie Bekit with coordination by the
% Shimagale Team <http://www.shimagle.com/>. Prepared and contributed
% to glibc by Daniel Yacob <locales@geez.org>
%
% build with: localedef -f UTF-8 -i tig_ER tig_ER
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LC_IDENTIFICATION
title "Tigre language locale for Eritrea"
source "Ge'ez Frontier Foundation"
address "7802 Solomon Seal Dr., Springfield, VA 22152, USA"
contact ""
email "locales@geez.org"
tel ""
fax ""
language "tig"
territory "ER"
revision "0.20"
date "2003-07-05"
%
category "i18n:2000";LC_IDENTIFICATION
category "i18n:2000";LC_COLLATE
category "i18n:2000";LC_CTYPE
category "i18n:2000";LC_MEASUREMENT
category "i18n:2000";LC_MONETARY
category "posix:1993";LC_NUMERIC
category "i18n:2000";LC_PAPER
category "i18n:2000";LC_TELEPHONE
category "i18n:2000";LC_ADDRESS
category "i18n:2000";LC_MESSAGES
category "i18n:2000";LC_NAME
category "i18n:2000";LC_TIME
%
END LC_IDENTIFICATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Ethiopic Specifc Data:
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LC_COLLATE
copy "ti_ER"
END LC_COLLATE
LC_CTYPE
copy "ti_ER"
END LC_CTYPE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Eritrea Specifc Data:
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LC_MEASUREMENT
copy "ti_ER"
END LC_MEASUREMENT
LC_MONETARY
copy "ti_ER"
END LC_MONETARY
LC_NUMERIC
copy "ti_ER"
END LC_NUMERIC
LC_PAPER
copy "ti_ER"
END LC_PAPER
LC_TELEPHONE
copy "ti_ER"
END LC_TELEPHONE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Tigre Specific Data:
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LC_MESSAGES
copy "ti_ER"
END LC_MESSAGES
LC_NAME
copy "ti_ER"
END LC_NAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Tigre/ER Specific Data:
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LC_ADDRESS
%
% This is the ISO_IEC TR14652 Locale definition for the LC_ADDRESS category.
%
postal_fmt "<U0025><U007A><U0025><U0063><U0025><U0054><U0025><U0073>/
<U0025><U0062><U0025><U0065><U0025><U0072>"
country_name "<U12A4><U122D><U1275><U122B>"
country_post "<U0045><U0052><U0049>"
country_ab2 "<U0045><U0052>"
country_ab3 "<U0045><U0052><U0049>"
country_num 232
% country_car unknown
% country_isbn unknown, Need ISO 2108
lang_name "<U1275><U130D><U1228>"
lang_ab ""
lang_term "<U0074><U0069><U0067>"
lang_lib "<U0074><U0069><U0067>"
%
END LC_ADDRESS
LC_TIME
%
% Abbreviated weekday names (%a)
%
abday "<U1230><U002F><U12D3>";/
"<U1230><U1296><U0020>";/
"<U1273><U120B><U1238>";/
"<U12A3><U1228><U122D>";/
"<U12A8><U121A><U123D>";/
"<U1305><U121D><U12D3>";/
"<U1230><U002F><U1295>"
%
% Full weekday names (%A)
%
day "<U1230><U1295><U1260><U1275> <U12D3><U1263><U12ED>";/
"<U1230><U1296>";/
"<U1273><U120B><U1238><U1296>";/
"<U12A3><U1228><U122D><U1263><U12D3>";/
"<U12A8><U121A><U123D>";/
"<U1305><U121D><U12D3><U1275>";/
"<U1230><U1295><U1260><U1275> <U1295><U12A2><U123D>"
%
% Abbreviated month names (%b)
%
abmon "<U1325><U122A><U0020>";/
"<U1208><U12AB><U1272>";/
"<U1218><U130B><U1262>";/
"<U121A><U12EB><U12DD>";/
"<U130D><U1295><U1266>";/
"<U1230><U1290><U0020>";/
"<U1213><U121D><U1208>";/
"<U1290><U1213><U1230>";/
"<U1218><U1235><U12A8>";/
"<U1325><U1245><U121D>";/
"<U1215><U12F3><U122D>";/
"<U1273><U1215><U1233>"
%
% Full month names (%B)
%
mon "<U1325><U122A>";/
"<U1208><U12AB><U1272><U1275>";/
"<U1218><U130B><U1262><U1275>";/
"<U121A><U12EB><U12DD><U12EB>";/
"<U130D><U1295><U1266><U1275>";/
"<U1230><U1290>";/
"<U1213><U121D><U1208>";/
"<U1290><U1213><U1230>";/
"<U1218><U1235><U12A8><U1228><U121D>";/
"<U1325><U1245><U121D><U1272>";/
"<U1215><U12F3><U122D>";/
"<U1273><U1215><U1233><U1235>"
%
%
% Equivalent of AM PM
%
am_pm "<U1240><U12F0><U121D><U0020><U1230><U122D><U0020><U121D><U12D5><U120D>";/
"<U1213><U1246><U0020><U1230><U122D><U0020><U121D><U12D5><U120D>"
%
% Appropriate date representation (%x)
% "%d/%m/%Y"
%
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0059>"
%
% Appropriate time representation (%X)
% "%l:%M:%S"
%
t_fmt "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053>"
%
% Appropriate AM/PM time representation (%r)
% "%X %p"
%
t_fmt_ampm "<U0025><U0058><U0020><U0025><U0070>"
%
% Appropriate date and time representation (%c)
% "%A፡ %B %e ዮም %Y %r %Z
%
d_t_fmt "<U0025><U0041><U1361><U0020><U0025><U0042><U0020><U0025><U0065>/
<U0020><U12EE><U121D>/
<U0020><U0025><U0059><U0020><U0025><U0072><U0020><U0025><U005A>"
%
% Appropriate date representation (date(1))
% "%A፡ %B %e ዮም %r %Z %Y ዓ/ም
%
date_fmt "<U0025><U0041><U1361><U0020><U0025><U0042><U0020><U0025><U0065>/
<U0020><U12EE><U121D>/
<U0020><U0025><U0072><U0020><U0025><U005A><U0020><U0025><U0059>/
<U0020><U12D3><U002F><U121D>"
%
END LC_TIME
%
|
{
"pile_set_name": "Github"
}
|
classdef (InferiorClasses = {?chebfun}) linBlock
%LINBLOCK Linear operator on a single function.
% This class is not intended to be called directly by the end user.
%
% See also LINOP, CHEBOP, CHEBOPPREF.
% Copyright 2017 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEVELOPER NOTE:
%
% A LINBLOCK is an abstract representation of a linear operator on a single
% function defined on a fixed domain. Its main purpose is to maintain an
% unevaluated stack of algebraic steps operating on predefined building blocks.
% It also keeps track of the differential order of the operator.
%
% The reason for the 'Block' name is that these objects can be a block entry in
% a chebmatrix, for operators that apply to a mixture of multiple functions and
% scalars. The preferred usage externally is to create a 1x1 chebmatrix or linop
% rather than to manipulate the blocks themselves.
%
% The stack is used three different ways within the system:
% (1) Replace the building blocks with appropriate matrices, and then
% apply the algebra. (I.e., collocation.)
% (2) Derive the coefficients of each power of the derivative.
% (See the method toCoeff.)
% (3) Convert to a callable function that can be applied directly to a
% CHEBFUN. (See the method toFunction.)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% CLASS PROPERTIES:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
properties ( Access = public )
% The domain of CHEBFUN objects that are operated upon.
domain = [];
% The delayed evaluation stack. Its argument is an empty
% instance of the class that determines how the operator is
% discretized.
stack = [];
% Used to track differential order.
diffOrder = 0;
% Is the operator the zero operator or the zero functional? Usually not,
% so default value is set to FALSE:
iszero = false;
% Is the operator a pure evaluation or multiplication operator, i.e. one
% that does not involve differentiation or integration? For
% operatorBlocks, in oldschool collocation mode (before rectangular
% projection became the standard approach), this would amount to a
% diagonal operator. For functionalBlocks, these kind of functionals
% usually correspond to evaluation at a point, or inner products with
% chebfuns.
isNotDiffOrInt = false;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% CLASS CONSTRUCTOR:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
methods ( Access = public, Static = false )
function A = linBlock(varargin)
% A = LINBLOCK() Use the default preference domain.
% A = LINBLOCK(B) Self-return for the same type.
% A = LINBLOCK(DOMAIN) Null object on the domain.
if ( nargin == 0 )
p = cheboppref();
A.domain = p.domain;
elseif ( (nargin == 1) && isa(varargin{1}, 'linBlock') )
A = varargin{1};
return
else
A.domain = varargin{1};
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% CLASS METHODS:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
methods ( Access = public, Static = false )
function f = toFunction(A)
% Convert the LINBLOCK to a callable anonymous function that can be
% applied to a CHEBFUN.
B = blockFunction(A);
f = B.func;
end
function c = toCoeff(A, varargin)
% Convert the LINBLOCK to a CHEBFUN of coefficients multiplying the
% powers of the derivative.
B = blockCoeff(A, varargin{:});
c = chebmatrix(B.coeffs);
end
function C = minus(A, B)
C = A + (-B);
end
function C = horzcat(varargin)
kill = cellfun(@isempty, varargin); % skip empties
C = chebmatrix(varargin(~kill));
end
function spy(A, varargin)
% The CHEBMATRIX class implements a SPY method, which is precisely
% what we want:
spy(chebmatrix({A}), varargin{:});
end
function C = vertcat(varargin)
kill = cellfun(@isempty, varargin); % skip empties
C = chebmatrix(varargin(~kill)');
end
end
end
|
{
"pile_set_name": "Github"
}
|
row.names,sbp,tobacco,ldl,adiposity,famhist,typea,obesity,alcohol,age,chd
1,160,12.00, 5.73,23.11,Present,49,25.30, 97.20,52,1
2,144, 0.01, 4.41,28.61,Absent,55,28.87, 2.06,63,1
3,118, 0.08, 3.48,32.28,Present,52,29.14, 3.81,46,0
4,170, 7.50, 6.41,38.03,Present,51,31.99, 24.26,58,1
5,134,13.60, 3.50,27.78,Present,60,25.99, 57.34,49,1
6,132, 6.20, 6.47,36.21,Present,62,30.77, 14.14,45,0
7,142, 4.05, 3.38,16.20,Absent,59,20.81, 2.62,38,0
8,114, 4.08, 4.59,14.60,Present,62,23.11, 6.72,58,1
9,114, 0.00, 3.83,19.40,Present,49,24.86, 2.49,29,0
10,132, 0.00, 5.80,30.96,Present,69,30.11, 0.00,53,1
11,206, 6.00, 2.95,32.27,Absent,72,26.81, 56.06,60,1
12,134,14.10, 4.44,22.39,Present,65,23.09, 0.00,40,1
13,118, 0.00, 1.88,10.05,Absent,59,21.57, 0.00,17,0
14,132, 0.00, 1.87,17.21,Absent,49,23.63, 0.97,15,0
15,112, 9.65, 2.29,17.20,Present,54,23.53, 0.68,53,0
16,117, 1.53, 2.44,28.95,Present,35,25.89, 30.03,46,0
17,120, 7.50,15.33,22.00,Absent,60,25.31, 34.49,49,0
18,146,10.50, 8.29,35.36,Present,78,32.73, 13.89,53,1
19,158, 2.60, 7.46,34.07,Present,61,29.30, 53.28,62,1
20,124,14.00, 6.23,35.96,Present,45,30.09, 0.00,59,1
21,106, 1.61, 1.74,12.32,Absent,74,20.92, 13.37,20,1
22,132, 7.90, 2.85,26.50,Present,51,26.16, 25.71,44,0
23,150, 0.30, 6.38,33.99,Present,62,24.64, 0.00,50,0
24,138, 0.60, 3.81,28.66,Absent,54,28.70, 1.46,58,0
25,142,18.20, 4.34,24.38,Absent,61,26.19, 0.00,50,0
26,124, 4.00,12.42,31.29,Present,54,23.23, 2.06,42,1
27,118, 6.00, 9.65,33.91,Absent,60,38.80, 0.00,48,0
28,145, 9.10, 5.24,27.55,Absent,59,20.96, 21.60,61,1
29,144, 4.09, 5.55,31.40,Present,60,29.43, 5.55,56,0
30,146, 0.00, 6.62,25.69,Absent,60,28.07, 8.23,63,1
31,136, 2.52, 3.95,25.63,Absent,51,21.86, 0.00,45,1
32,158, 1.02, 6.33,23.88,Absent,66,22.13, 24.99,46,1
33,122, 6.60, 5.58,35.95,Present,53,28.07, 12.55,59,1
34,126, 8.75, 6.53,34.02,Absent,49,30.25, 0.00,41,1
35,148, 5.50, 7.10,25.31,Absent,56,29.84, 3.60,48,0
36,122, 4.26, 4.44,13.04,Absent,57,19.49, 48.99,28,1
37,140, 3.90, 7.32,25.05,Absent,47,27.36, 36.77,32,0
38,110, 4.64, 4.55,30.46,Absent,48,30.90, 15.22,46,0
39,130, 0.00, 2.82,19.63,Present,70,24.86, 0.00,29,0
40,136,11.20, 5.81,31.85,Present,75,27.68, 22.94,58,1
41,118, 0.28, 5.80,33.70,Present,60,30.98, 0.00,41,1
42,144, 0.04, 3.38,23.61,Absent,30,23.75, 4.66,30,0
43,120, 0.00, 1.07,16.02,Absent,47,22.15, 0.00,15,0
44,130, 2.61, 2.72,22.99,Present,51,26.29, 13.37,51,1
45,114, 0.00, 2.99, 9.74,Absent,54,46.58, 0.00,17,0
46,128, 4.65, 3.31,22.74,Absent,62,22.95, 0.51,48,0
47,162, 7.40, 8.55,24.65,Present,64,25.71, 5.86,58,1
48,116, 1.91, 7.56,26.45,Present,52,30.01, 3.60,33,1
49,114, 0.00, 1.94,11.02,Absent,54,20.17, 38.98,16,0
50,126, 3.80, 3.88,31.79,Absent,57,30.53, 0.00,30,0
51,122, 0.00, 5.75,30.90,Present,46,29.01, 4.11,42,0
52,134, 2.50, 3.66,30.90,Absent,52,27.19, 23.66,49,0
53,152, 0.90, 9.12,30.23,Absent,56,28.64, 0.37,42,1
54,134, 8.08, 1.55,17.50,Present,56,22.65, 66.65,31,1
55,156, 3.00, 1.82,27.55,Absent,60,23.91, 54.00,53,0
56,152, 5.99, 7.99,32.48,Absent,45,26.57,100.32,48,0
57,118, 0.00, 2.99,16.17,Absent,49,23.83, 3.22,28,0
58,126, 5.10, 2.96,26.50,Absent,55,25.52, 12.34,38,1
59,103, 0.03, 4.21,18.96,Absent,48,22.94, 2.62,18,0
60,121, 0.80, 5.29,18.95,Present,47,22.51, 0.00,61,0
61,142, 0.28, 1.80,21.03,Absent,57,23.65, 2.93,33,0
62,138, 1.15, 5.09,27.87,Present,61,25.65, 2.34,44,0
63,152,10.10, 4.71,24.65,Present,65,26.21, 24.53,57,0
64,140, 0.45, 4.30,24.33,Absent,41,27.23, 10.08,38,0
65,130, 0.00, 1.82,10.45,Absent,57,22.07, 2.06,17,0
66,136, 7.36, 2.19,28.11,Present,61,25.00, 61.71,54,0
67,124, 4.82, 3.24,21.10,Present,48,28.49, 8.42,30,0
68,112, 0.41, 1.88,10.29,Absent,39,22.08, 20.98,27,0
69,118, 4.46, 7.27,29.13,Present,48,29.01, 11.11,33,0
70,122, 0.00, 3.37,16.10,Absent,67,21.06, 0.00,32,1
71,118, 0.00, 3.67,12.13,Absent,51,19.15, 0.60,15,0
72,130, 1.72, 2.66,10.38,Absent,68,17.81, 11.10,26,0
73,130, 5.60, 3.37,24.80,Absent,58,25.76, 43.20,36,0
74,126, 0.09, 5.03,13.27,Present,50,17.75, 4.63,20,0
75,128, 0.40, 6.17,26.35,Absent,64,27.86, 11.11,34,0
76,136, 0.00, 4.12,17.42,Absent,52,21.66, 12.86,40,0
77,134, 0.00, 5.90,30.84,Absent,49,29.16, 0.00,55,0
78,140, 0.60, 5.56,33.39,Present,58,27.19, 0.00,55,1
79,168, 4.50, 6.68,28.47,Absent,43,24.25, 24.38,56,1
80,108, 0.40, 5.91,22.92,Present,57,25.72, 72.00,39,0
81,114, 3.00, 7.04,22.64,Present,55,22.59, 0.00,45,1
82,140, 8.14, 4.93,42.49,Absent,53,45.72, 6.43,53,1
83,148, 4.80, 6.09,36.55,Present,63,25.44, 0.88,55,1
84,148,12.20, 3.79,34.15,Absent,57,26.38, 14.40,57,1
85,128, 0.00, 2.43,13.15,Present,63,20.75, 0.00,17,0
86,130, 0.56, 3.30,30.86,Absent,49,27.52, 33.33,45,0
87,126,10.50, 4.49,17.33,Absent,67,19.37, 0.00,49,1
88,140, 0.00, 5.08,27.33,Present,41,27.83, 1.25,38,0
89,126, 0.90, 5.64,17.78,Present,55,21.94, 0.00,41,0
90,122, 0.72, 4.04,32.38,Absent,34,28.34, 0.00,55,0
91,116, 1.03, 2.83,10.85,Absent,45,21.59, 1.75,21,0
92,120, 3.70, 4.02,39.66,Absent,61,30.57, 0.00,64,1
93,143, 0.46, 2.40,22.87,Absent,62,29.17, 15.43,29,0
94,118, 4.00, 3.95,18.96,Absent,54,25.15, 8.33,49,1
95,194, 1.70, 6.32,33.67,Absent,47,30.16, 0.19,56,0
96,134, 3.00, 4.37,23.07,Absent,56,20.54, 9.65,62,0
97,138, 2.16, 4.90,24.83,Present,39,26.06, 28.29,29,0
98,136, 0.00, 5.00,27.58,Present,49,27.59, 1.47,39,0
99,122, 3.20,11.32,35.36,Present,55,27.07, 0.00,51,1
100,164,12.00, 3.91,19.59,Absent,51,23.44, 19.75,39,0
101,136, 8.00, 7.85,23.81,Present,51,22.69, 2.78,50,0
102,166, 0.07, 4.03,29.29,Absent,53,28.37, 0.00,27,0
103,118, 0.00, 4.34,30.12,Present,52,32.18, 3.91,46,0
104,128, 0.42, 4.60,26.68,Absent,41,30.97, 10.33,31,0
105,118, 1.50, 5.38,25.84,Absent,64,28.63, 3.89,29,0
106,158, 3.60, 2.97,30.11,Absent,63,26.64,108.00,64,0
107,108, 1.50, 4.33,24.99,Absent,66,22.29, 21.60,61,1
108,170, 7.60, 5.50,37.83,Present,42,37.41, 6.17,54,1
109,118, 1.00, 5.76,22.10,Absent,62,23.48, 7.71,42,0
110,124, 0.00, 3.04,17.33,Absent,49,22.04, 0.00,18,0
111,114, 0.00, 8.01,21.64,Absent,66,25.51, 2.49,16,0
112,168, 9.00, 8.53,24.48,Present,69,26.18, 4.63,54,1
113,134, 2.00, 3.66,14.69,Absent,52,21.03, 2.06,37,0
114,174, 0.00, 8.46,35.10,Present,35,25.27, 0.00,61,1
115,116,31.20, 3.17,14.99,Absent,47,19.40, 49.06,59,1
116,128, 0.00,10.58,31.81,Present,46,28.41, 14.66,48,0
117,140, 4.50, 4.59,18.01,Absent,63,21.91, 22.09,32,1
118,154, 0.70, 5.91,25.00,Absent,13,20.60, 0.00,42,0
119,150, 3.50, 6.99,25.39,Present,50,23.35, 23.48,61,1
120,130, 0.00, 3.92,25.55,Absent,68,28.02, 0.68,27,0
121,128, 2.00, 6.13,21.31,Absent,66,22.86, 11.83,60,0
122,120, 1.40, 6.25,20.47,Absent,60,25.85, 8.51,28,0
123,120, 0.00, 5.01,26.13,Absent,64,26.21, 12.24,33,0
124,138, 4.50, 2.85,30.11,Absent,55,24.78, 24.89,56,1
125,153, 7.80, 3.96,25.73,Absent,54,25.91, 27.03,45,0
126,123, 8.60,11.17,35.28,Present,70,33.14, 0.00,59,1
127,148, 4.04, 3.99,20.69,Absent,60,27.78, 1.75,28,0
128,136, 3.96, 2.76,30.28,Present,50,34.42, 18.51,38,0
129,134, 8.80, 7.41,26.84,Absent,35,29.44, 29.52,60,1
130,152,12.18, 4.04,37.83,Present,63,34.57, 4.17,64,0
131,158,13.50, 5.04,30.79,Absent,54,24.79, 21.50,62,0
132,132, 2.00, 3.08,35.39,Absent,45,31.44, 79.82,58,1
133,134, 1.50, 3.73,21.53,Absent,41,24.70, 11.11,30,1
134,142, 7.44, 5.52,33.97,Absent,47,29.29, 24.27,54,0
135,134, 6.00, 3.30,28.45,Absent,65,26.09, 58.11,40,0
136,122, 4.18, 9.05,29.27,Present,44,24.05, 19.34,52,1
137,116, 2.70, 3.69,13.52,Absent,55,21.13, 18.51,32,0
138,128, 0.50, 3.70,12.81,Present,66,21.25, 22.73,28,0
139,120, 0.00, 3.68,12.24,Absent,51,20.52, 0.51,20,0
140,124, 0.00, 3.95,36.35,Present,59,32.83, 9.59,54,0
141,160,14.00, 5.90,37.12,Absent,58,33.87, 3.52,54,1
142,130, 2.78, 4.89, 9.39,Present,63,19.30, 17.47,25,1
143,128, 2.80, 5.53,14.29,Absent,64,24.97, 0.51,38,0
144,130, 4.50, 5.86,37.43,Absent,61,31.21, 32.30,58,0
145,109, 1.20, 6.14,29.26,Absent,47,24.72, 10.46,40,0
146,144, 0.00, 3.84,18.72,Absent,56,22.10, 4.80,40,0
147,118, 1.05, 3.16,12.98,Present,46,22.09, 16.35,31,0
148,136, 3.46, 6.38,32.25,Present,43,28.73, 3.13,43,1
149,136, 1.50, 6.06,26.54,Absent,54,29.38, 14.50,33,1
150,124,15.50, 5.05,24.06,Absent,46,23.22, 0.00,61,1
151,148, 6.00, 6.49,26.47,Absent,48,24.70, 0.00,55,0
152,128, 6.60, 3.58,20.71,Absent,55,24.15, 0.00,52,0
153,122, 0.28, 4.19,19.97,Absent,61,25.63, 0.00,24,0
154,108, 0.00, 2.74,11.17,Absent,53,22.61, 0.95,20,0
155,124, 3.04, 4.80,19.52,Present,60,21.78,147.19,41,1
156,138, 8.80, 3.12,22.41,Present,63,23.33,120.03,55,1
157,127, 0.00, 2.81,15.70,Absent,42,22.03, 1.03,17,0
158,174, 9.45, 5.13,35.54,Absent,55,30.71, 59.79,53,0
159,122, 0.00, 3.05,23.51,Absent,46,25.81, 0.00,38,0
160,144, 6.75, 5.45,29.81,Absent,53,25.62, 26.23,43,1
161,126, 1.80, 6.22,19.71,Absent,65,24.81, 0.69,31,0
162,208,27.40, 3.12,26.63,Absent,66,27.45, 33.07,62,1
163,138, 0.00, 2.68,17.04,Absent,42,22.16, 0.00,16,0
164,148, 0.00, 3.84,17.26,Absent,70,20.00, 0.00,21,0
165,122, 0.00, 3.08,16.30,Absent,43,22.13, 0.00,16,0
166,132, 7.00, 3.20,23.26,Absent,77,23.64, 23.14,49,0
167,110,12.16, 4.99,28.56,Absent,44,27.14, 21.60,55,1
168,160, 1.52, 8.12,29.30,Present,54,25.87, 12.86,43,1
169,126, 0.54, 4.39,21.13,Present,45,25.99, 0.00,25,0
170,162, 5.30, 7.95,33.58,Present,58,36.06, 8.23,48,0
171,194, 2.55, 6.89,33.88,Present,69,29.33, 0.00,41,0
172,118, 0.75, 2.58,20.25,Absent,59,24.46, 0.00,32,0
173,124, 0.00, 4.79,34.71,Absent,49,26.09, 9.26,47,0
174,160, 0.00, 2.42,34.46,Absent,48,29.83, 1.03,61,0
175,128, 0.00, 2.51,29.35,Present,53,22.05, 1.37,62,0
176,122, 4.00, 5.24,27.89,Present,45,26.52, 0.00,61,1
177,132, 2.00, 2.70,21.57,Present,50,27.95, 9.26,37,0
178,120, 0.00, 2.42,16.66,Absent,46,20.16, 0.00,17,0
179,128, 0.04, 8.22,28.17,Absent,65,26.24, 11.73,24,0
180,108,15.00, 4.91,34.65,Absent,41,27.96, 14.40,56,0
181,166, 0.00, 4.31,34.27,Absent,45,30.14, 13.27,56,0
182,152, 0.00, 6.06,41.05,Present,51,40.34, 0.00,51,0
183,170, 4.20, 4.67,35.45,Present,50,27.14, 7.92,60,1
184,156, 4.00, 2.05,19.48,Present,50,21.48, 27.77,39,1
185,116, 8.00, 6.73,28.81,Present,41,26.74, 40.94,48,1
186,122, 4.40, 3.18,11.59,Present,59,21.94, 0.00,33,1
187,150,20.00, 6.40,35.04,Absent,53,28.88, 8.33,63,0
188,129, 2.15, 5.17,27.57,Absent,52,25.42, 2.06,39,0
189,134, 4.80, 6.58,29.89,Present,55,24.73, 23.66,63,0
190,126, 0.00, 5.98,29.06,Present,56,25.39, 11.52,64,1
191,142, 0.00, 3.72,25.68,Absent,48,24.37, 5.25,40,1
192,128, 0.70, 4.90,37.42,Present,72,35.94, 3.09,49,1
193,102, 0.40, 3.41,17.22,Present,56,23.59, 2.06,39,1
194,130, 0.00, 4.89,25.98,Absent,72,30.42, 14.71,23,0
195,138, 0.05, 2.79,10.35,Absent,46,21.62, 0.00,18,0
196,138, 0.00, 1.96,11.82,Present,54,22.01, 8.13,21,0
197,128, 0.00, 3.09,20.57,Absent,54,25.63, 0.51,17,0
198,162, 2.92, 3.63,31.33,Absent,62,31.59, 18.51,42,0
199,160, 3.00, 9.19,26.47,Present,39,28.25, 14.40,54,1
200,148, 0.00, 4.66,24.39,Absent,50,25.26, 4.03,27,0
201,124, 0.16, 2.44,16.67,Absent,65,24.58, 74.91,23,0
202,136, 3.15, 4.37,20.22,Present,59,25.12, 47.16,31,1
203,134, 2.75, 5.51,26.17,Absent,57,29.87, 8.33,33,0
204,128, 0.73, 3.97,23.52,Absent,54,23.81, 19.20,64,0
205,122, 3.20, 3.59,22.49,Present,45,24.96, 36.17,58,0
206,152, 3.00, 4.64,31.29,Absent,41,29.34, 4.53,40,0
207,162, 0.00, 5.09,24.60,Present,64,26.71, 3.81,18,0
208,124, 4.00, 6.65,30.84,Present,54,28.40, 33.51,60,0
209,136, 5.80, 5.90,27.55,Absent,65,25.71, 14.40,59,0
210,136, 8.80, 4.26,32.03,Present,52,31.44, 34.35,60,0
211,134, 0.05, 8.03,27.95,Absent,48,26.88, 0.00,60,0
212,122, 1.00, 5.88,34.81,Present,69,31.27, 15.94,40,1
213,116, 3.00, 3.05,30.31,Absent,41,23.63, 0.86,44,0
214,132, 0.00, 0.98,21.39,Absent,62,26.75, 0.00,53,0
215,134, 0.00, 2.40,21.11,Absent,57,22.45, 1.37,18,0
216,160, 7.77, 8.07,34.80,Absent,64,31.15, 0.00,62,1
217,180, 0.52, 4.23,16.38,Absent,55,22.56, 14.77,45,1
218,124, 0.81, 6.16,11.61,Absent,35,21.47, 10.49,26,0
219,114, 0.00, 4.97, 9.69,Absent,26,22.60, 0.00,25,0
220,208, 7.40, 7.41,32.03,Absent,50,27.62, 7.85,57,0
221,138, 0.00, 3.14,12.00,Absent,54,20.28, 0.00,16,0
222,164, 0.50, 6.95,39.64,Present,47,41.76, 3.81,46,1
223,144, 2.40, 8.13,35.61,Absent,46,27.38, 13.37,60,0
224,136, 7.50, 7.39,28.04,Present,50,25.01, 0.00,45,1
225,132, 7.28, 3.52,12.33,Absent,60,19.48, 2.06,56,0
226,143, 5.04, 4.86,23.59,Absent,58,24.69, 18.72,42,0
227,112, 4.46, 7.18,26.25,Present,69,27.29, 0.00,32,1
228,134,10.00, 3.79,34.72,Absent,42,28.33, 28.80,52,1
229,138, 2.00, 5.11,31.40,Present,49,27.25, 2.06,64,1
230,188, 0.00, 5.47,32.44,Present,71,28.99, 7.41,50,1
231,110, 2.35, 3.36,26.72,Present,54,26.08,109.80,58,1
232,136,13.20, 7.18,35.95,Absent,48,29.19, 0.00,62,0
233,130, 1.75, 5.46,34.34,Absent,53,29.42, 0.00,58,1
234,122, 0.00, 3.76,24.59,Absent,56,24.36, 0.00,30,0
235,138, 0.00, 3.24,27.68,Absent,60,25.70, 88.66,29,0
236,130,18.00, 4.13,27.43,Absent,54,27.44, 0.00,51,1
237,126, 5.50, 3.78,34.15,Absent,55,28.85, 3.18,61,0
238,176, 5.76, 4.89,26.10,Present,46,27.30, 19.44,57,0
239,122, 0.00, 5.49,19.56,Absent,57,23.12, 14.02,27,0
240,124, 0.00, 3.23, 9.64,Absent,59,22.70, 0.00,16,0
241,140, 5.20, 3.58,29.26,Absent,70,27.29, 20.17,45,1
242,128, 6.00, 4.37,22.98,Present,50,26.01, 0.00,47,0
243,190, 4.18, 5.05,24.83,Absent,45,26.09, 82.85,41,0
244,144, 0.76,10.53,35.66,Absent,63,34.35, 0.00,55,1
245,126, 4.60, 7.40,31.99,Present,57,28.67, 0.37,60,1
246,128, 0.00, 2.63,23.88,Absent,45,21.59, 6.54,57,0
247,136, 0.40, 3.91,21.10,Present,63,22.30, 0.00,56,1
248,158, 4.00, 4.18,28.61,Present,42,25.11, 0.00,60,0
249,160, 0.60, 6.94,30.53,Absent,36,25.68, 1.42,64,0
250,124, 6.00, 5.21,33.02,Present,64,29.37, 7.61,58,1
251,158, 6.17, 8.12,30.75,Absent,46,27.84, 92.62,48,0
252,128, 0.00, 6.34,11.87,Absent,57,23.14, 0.00,17,0
253,166, 3.00, 3.82,26.75,Absent,45,20.86, 0.00,63,1
254,146, 7.50, 7.21,25.93,Present,55,22.51, 0.51,42,0
255,161, 9.00, 4.65,15.16,Present,58,23.76, 43.20,46,0
256,164,13.02, 6.26,29.38,Present,47,22.75, 37.03,54,1
257,146, 5.08, 7.03,27.41,Present,63,36.46, 24.48,37,1
258,142, 4.48, 3.57,19.75,Present,51,23.54, 3.29,49,0
259,138,12.00, 5.13,28.34,Absent,59,24.49, 32.81,58,1
260,154, 1.80, 7.13,34.04,Present,52,35.51, 39.36,44,0
261,118, 0.00, 2.39,12.13,Absent,49,18.46, 0.26,17,1
263,124, 0.61, 2.69,17.15,Present,61,22.76, 11.55,20,0
264,124, 1.04, 2.84,16.42,Present,46,20.17, 0.00,61,0
265,136, 5.00, 4.19,23.99,Present,68,27.80, 25.86,35,0
266,132, 9.90, 4.63,27.86,Present,46,23.39, 0.51,52,1
267,118, 0.12, 1.96,20.31,Absent,37,20.01, 2.42,18,0
268,118, 0.12, 4.16, 9.37,Absent,57,19.61, 0.00,17,0
269,134,12.00, 4.96,29.79,Absent,53,24.86, 8.23,57,0
270,114, 0.10, 3.95,15.89,Present,57,20.31, 17.14,16,0
271,136, 6.80, 7.84,30.74,Present,58,26.20, 23.66,45,1
272,130, 0.00, 4.16,39.43,Present,46,30.01, 0.00,55,1
273,136, 2.20, 4.16,38.02,Absent,65,37.24, 4.11,41,1
274,136, 1.36, 3.16,14.97,Present,56,24.98, 7.30,24,0
275,154, 4.20, 5.59,25.02,Absent,58,25.02, 1.54,43,0
276,108, 0.80, 2.47,17.53,Absent,47,22.18, 0.00,55,1
277,136, 8.80, 4.69,36.07,Present,38,26.56, 2.78,63,1
278,174, 2.02, 6.57,31.90,Present,50,28.75, 11.83,64,1
279,124, 4.25, 8.22,30.77,Absent,56,25.80, 0.00,43,0
280,114, 0.00, 2.63, 9.69,Absent,45,17.89, 0.00,16,0
281,118, 0.12, 3.26,12.26,Absent,55,22.65, 0.00,16,0
282,106, 1.08, 4.37,26.08,Absent,67,24.07, 17.74,28,1
283,146, 3.60, 3.51,22.67,Absent,51,22.29, 43.71,42,0
284,206, 0.00, 4.17,33.23,Absent,69,27.36, 6.17,50,1
285,134, 3.00, 3.17,17.91,Absent,35,26.37, 15.12,27,0
286,148,15.00, 4.98,36.94,Present,72,31.83, 66.27,41,1
287,126, 0.21, 3.95,15.11,Absent,61,22.17, 2.42,17,0
288,134, 0.00, 3.69,13.92,Absent,43,27.66, 0.00,19,0
289,134, 0.02, 2.80,18.84,Absent,45,24.82, 0.00,17,0
290,123, 0.05, 4.61,13.69,Absent,51,23.23, 2.78,16,0
291,112, 0.60, 5.28,25.71,Absent,55,27.02, 27.77,38,1
292,112, 0.00, 1.71,15.96,Absent,42,22.03, 3.50,16,0
293,101, 0.48, 7.26,13.00,Absent,50,19.82, 5.19,16,0
294,150, 0.18, 4.14,14.40,Absent,53,23.43, 7.71,44,0
295,170, 2.60, 7.22,28.69,Present,71,27.87, 37.65,56,1
296,134, 0.00, 5.63,29.12,Absent,68,32.33, 2.02,34,0
297,142, 0.00, 4.19,18.04,Absent,56,23.65, 20.78,42,1
298,132, 0.10, 3.28,10.73,Absent,73,20.42, 0.00,17,0
299,136, 0.00, 2.28,18.14,Absent,55,22.59, 0.00,17,0
300,132,12.00, 4.51,21.93,Absent,61,26.07, 64.80,46,1
301,166, 4.10, 4.00,34.30,Present,32,29.51, 8.23,53,0
302,138, 0.00, 3.96,24.70,Present,53,23.80, 0.00,45,0
303,138, 2.27, 6.41,29.07,Absent,58,30.22, 2.93,32,1
304,170, 0.00, 3.12,37.15,Absent,47,35.42, 0.00,53,0
305,128, 0.00, 8.41,28.82,Present,60,26.86, 0.00,59,1
306,136, 1.20, 2.78, 7.12,Absent,52,22.51, 3.41,27,0
307,128, 0.00, 3.22,26.55,Present,39,26.59, 16.71,49,0
308,150,14.40, 5.04,26.52,Present,60,28.84, 0.00,45,0
309,132, 8.40, 3.57,13.68,Absent,42,18.75, 15.43,59,1
310,142, 2.40, 2.55,23.89,Absent,54,26.09, 59.14,37,0
311,130, 0.05, 2.44,28.25,Present,67,30.86, 40.32,34,0
312,174, 3.50, 5.26,21.97,Present,36,22.04, 8.33,59,1
313,114, 9.60, 2.51,29.18,Absent,49,25.67, 40.63,46,0
314,162, 1.50, 2.46,19.39,Present,49,24.32, 0.00,59,1
315,174, 0.00, 3.27,35.40,Absent,58,37.71, 24.95,44,0
316,190, 5.15, 6.03,36.59,Absent,42,30.31, 72.00,50,0
317,154, 1.40, 1.72,18.86,Absent,58,22.67, 43.20,59,0
318,124, 0.00, 2.28,24.86,Present,50,22.24, 8.26,38,0
319,114, 1.20, 3.98,14.90,Absent,49,23.79, 25.82,26,0
320,168,11.40, 5.08,26.66,Present,56,27.04, 2.61,59,1
321,142, 3.72, 4.24,32.57,Absent,52,24.98, 7.61,51,0
322,154, 0.00, 4.81,28.11,Present,56,25.67, 75.77,59,0
323,146, 4.36, 4.31,18.44,Present,47,24.72, 10.80,38,0
324,166, 6.00, 3.02,29.30,Absent,35,24.38, 38.06,61,0
325,140, 8.60, 3.90,32.16,Present,52,28.51, 11.11,64,1
326,136, 1.70, 3.53,20.13,Absent,56,19.44, 14.40,55,0
327,156, 0.00, 3.47,21.10,Absent,73,28.40, 0.00,36,1
328,132, 0.00, 6.63,29.58,Present,37,29.41, 2.57,62,0
329,128, 0.00, 2.98,12.59,Absent,65,20.74, 2.06,19,0
330,106, 5.60, 3.20,12.30,Absent,49,20.29, 0.00,39,0
331,144, 0.40, 4.64,30.09,Absent,30,27.39, 0.74,55,0
332,154, 0.31, 2.33,16.48,Absent,33,24.00, 11.83,17,0
333,126, 3.10, 2.01,32.97,Present,56,28.63, 26.74,45,0
334,134, 6.40, 8.49,37.25,Present,56,28.94, 10.49,51,1
335,152,19.45, 4.22,29.81,Absent,28,23.95, 0.00,59,1
336,146, 1.35, 6.39,34.21,Absent,51,26.43, 0.00,59,1
337,162, 6.94, 4.55,33.36,Present,52,27.09, 32.06,43,0
338,130, 7.28, 3.56,23.29,Present,20,26.80, 51.87,58,1
339,138, 6.00, 7.24,37.05,Absent,38,28.69, 0.00,59,0
340,148, 0.00, 5.32,26.71,Present,52,32.21, 32.78,27,0
341,124, 4.20, 2.94,27.59,Absent,50,30.31, 85.06,30,0
342,118, 1.62, 9.01,21.70,Absent,59,25.89, 21.19,40,0
343,116, 4.28, 7.02,19.99,Present,68,23.31, 0.00,52,1
344,162, 6.30, 5.73,22.61,Present,46,20.43, 62.54,53,1
345,138, 0.87, 1.87,15.89,Absent,44,26.76, 42.99,31,0
346,137, 1.20, 3.14,23.87,Absent,66,24.13, 45.00,37,0
347,198, 0.52,11.89,27.68,Present,48,28.40, 78.99,26,1
348,154, 4.50, 4.75,23.52,Present,43,25.76, 0.00,53,1
349,128, 5.40, 2.36,12.98,Absent,51,18.36, 6.69,61,0
350,130, 0.08, 5.59,25.42,Present,50,24.98, 6.27,43,1
351,162, 5.60, 4.24,22.53,Absent,29,22.91, 5.66,60,0
352,120,10.50, 2.70,29.87,Present,54,24.50, 16.46,49,0
353,136, 3.99, 2.58,16.38,Present,53,22.41, 27.67,36,0
354,176, 1.20, 8.28,36.16,Present,42,27.81, 11.60,58,1
355,134,11.79, 4.01,26.57,Present,38,21.79, 38.88,61,1
356,122, 1.70, 5.28,32.23,Present,51,24.08, 0.00,54,0
357,134, 0.90, 3.18,23.66,Present,52,23.26, 27.36,58,1
358,134, 0.00, 2.43,22.24,Absent,52,26.49, 41.66,24,0
359,136, 6.60, 6.08,32.74,Absent,64,33.28, 2.72,49,0
360,132, 4.05, 5.15,26.51,Present,31,26.67, 16.30,50,0
361,152, 1.68, 3.58,25.43,Absent,50,27.03, 0.00,32,0
362,132,12.30, 5.96,32.79,Present,57,30.12, 21.50,62,1
363,124, 0.40, 3.67,25.76,Absent,43,28.08, 20.57,34,0
364,140, 4.20, 2.91,28.83,Present,43,24.70, 47.52,48,0
365,166, 0.60, 2.42,34.03,Present,53,26.96, 54.00,60,0
366,156, 3.02, 5.35,25.72,Present,53,25.22, 28.11,52,1
367,132, 0.72, 4.37,19.54,Absent,48,26.11, 49.37,28,0
368,150, 0.00, 4.99,27.73,Absent,57,30.92, 8.33,24,0
369,134, 0.12, 3.40,21.18,Present,33,26.27, 14.21,30,0
370,126, 3.40, 4.87,15.16,Present,65,22.01, 11.11,38,0
371,148, 0.50, 5.97,32.88,Absent,54,29.27, 6.43,42,0
372,148, 8.20, 7.75,34.46,Present,46,26.53, 6.04,64,1
373,132, 6.00, 5.97,25.73,Present,66,24.18,145.29,41,0
374,128, 1.60, 5.41,29.30,Absent,68,29.38, 23.97,32,0
375,128, 5.16, 4.90,31.35,Present,57,26.42, 0.00,64,0
376,140, 0.00, 2.40,27.89,Present,70,30.74,144.00,29,0
377,126, 0.00, 5.29,27.64,Absent,25,27.62, 2.06,45,0
378,114, 3.60, 4.16,22.58,Absent,60,24.49, 65.31,31,0
379,118, 1.25, 4.69,31.58,Present,52,27.16, 4.11,53,0
380,126, 0.96, 4.99,29.74,Absent,66,33.35, 58.32,38,0
381,154, 4.50, 4.68,39.97,Absent,61,33.17, 1.54,64,1
382,112, 1.44, 2.71,22.92,Absent,59,24.81, 0.00,52,0
383,140, 8.00, 4.42,33.15,Present,47,32.77, 66.86,44,0
384,140, 1.68,11.41,29.54,Present,74,30.75, 2.06,38,1
385,128, 2.60, 4.94,21.36,Absent,61,21.30, 0.00,31,0
386,126,19.60, 6.03,34.99,Absent,49,26.99, 55.89,44,0
387,160, 4.20, 6.76,37.99,Present,61,32.91, 3.09,54,1
388,144, 0.00, 4.17,29.63,Present,52,21.83, 0.00,59,0
389,148, 4.50,10.49,33.27,Absent,50,25.92, 2.06,53,1
390,146, 0.00, 4.92,18.53,Absent,57,24.20, 34.97,26,0
391,164, 5.60, 3.17,30.98,Present,44,25.99, 43.20,53,1
392,130, 0.54, 3.63,22.03,Present,69,24.34, 12.86,39,1
393,154, 2.40, 5.63,42.17,Present,59,35.07, 12.86,50,1
394,178, 0.95, 4.75,21.06,Absent,49,23.74, 24.69,61,0
395,180, 3.57, 3.57,36.10,Absent,36,26.70, 19.95,64,0
396,134,12.50, 2.73,39.35,Absent,48,35.58, 0.00,48,0
397,142, 0.00, 3.54,16.64,Absent,58,25.97, 8.36,27,0
398,162, 7.00, 7.67,34.34,Present,33,30.77, 0.00,62,0
399,218,11.20, 2.77,30.79,Absent,38,24.86, 90.93,48,1
400,126, 8.75, 6.06,32.72,Present,33,27.00, 62.43,55,1
401,126, 0.00, 3.57,26.01,Absent,61,26.30, 7.97,47,0
402,134, 6.10, 4.77,26.08,Absent,47,23.82, 1.03,49,0
403,132, 0.00, 4.17,36.57,Absent,57,30.61, 18.00,49,0
404,178, 5.50, 3.79,23.92,Present,45,21.26, 6.17,62,1
405,208, 5.04, 5.19,20.71,Present,52,25.12, 24.27,58,1
406,160, 1.15,10.19,39.71,Absent,31,31.65, 20.52,57,0
407,116, 2.38, 5.67,29.01,Present,54,27.26, 15.77,51,0
408,180,25.01, 3.70,38.11,Present,57,30.54, 0.00,61,1
409,200,19.20, 4.43,40.60,Present,55,32.04, 36.00,60,1
410,112, 4.20, 3.58,27.14,Absent,52,26.83, 2.06,40,0
411,120, 0.00, 3.10,26.97,Absent,41,24.80, 0.00,16,0
412,178,20.00, 9.78,33.55,Absent,37,27.29, 2.88,62,1
413,166, 0.80, 5.63,36.21,Absent,50,34.72, 28.80,60,0
414,164, 8.20,14.16,36.85,Absent,52,28.50, 17.02,55,1
415,216, 0.92, 2.66,19.85,Present,49,20.58, 0.51,63,1
416,146, 6.40, 5.62,33.05,Present,57,31.03, 0.74,46,0
417,134, 1.10, 3.54,20.41,Present,58,24.54, 39.91,39,1
418,158,16.00, 5.56,29.35,Absent,36,25.92, 58.32,60,0
419,176, 0.00, 3.14,31.04,Present,45,30.18, 4.63,45,0
420,132, 2.80, 4.79,20.47,Present,50,22.15, 11.73,48,0
421,126, 0.00, 4.55,29.18,Absent,48,24.94, 36.00,41,0
422,120, 5.50, 3.51,23.23,Absent,46,22.40, 90.31,43,0
423,174, 0.00, 3.86,21.73,Absent,42,23.37, 0.00,63,0
424,150,13.80, 5.10,29.45,Present,52,27.92, 77.76,55,1
425,176, 6.00, 3.98,17.20,Present,52,21.07, 4.11,61,1
426,142, 2.20, 3.29,22.70,Absent,44,23.66, 5.66,42,1
427,132, 0.00, 3.30,21.61,Absent,42,24.92, 32.61,33,0
428,142, 1.32, 7.63,29.98,Present,57,31.16, 72.93,33,0
429,146, 1.16, 2.28,34.53,Absent,50,28.71, 45.00,49,0
430,132, 7.20, 3.65,17.16,Present,56,23.25, 0.00,34,0
431,120, 0.00, 3.57,23.22,Absent,58,27.20, 0.00,32,0
432,118, 0.00, 3.89,15.96,Absent,65,20.18, 0.00,16,0
433,108, 0.00, 1.43,26.26,Absent,42,19.38, 0.00,16,0
434,136, 0.00, 4.00,19.06,Absent,40,21.94, 2.06,16,0
435,120, 0.00, 2.46,13.39,Absent,47,22.01, 0.51,18,0
436,132, 0.00, 3.55, 8.66,Present,61,18.50, 3.87,16,0
437,136, 0.00, 1.77,20.37,Absent,45,21.51, 2.06,16,0
438,138, 0.00, 1.86,18.35,Present,59,25.38, 6.51,17,0
439,138, 0.06, 4.15,20.66,Absent,49,22.59, 2.49,16,0
440,130, 1.22, 3.30,13.65,Absent,50,21.40, 3.81,31,0
441,130, 4.00, 2.40,17.42,Absent,60,22.05, 0.00,40,0
442,110, 0.00, 7.14,28.28,Absent,57,29.00, 0.00,32,0
443,120, 0.00, 3.98,13.19,Present,47,21.89, 0.00,16,0
444,166, 6.00, 8.80,37.89,Absent,39,28.70, 43.20,52,0
445,134, 0.57, 4.75,23.07,Absent,67,26.33, 0.00,37,0
446,142, 3.00, 3.69,25.10,Absent,60,30.08, 38.88,27,0
447,136, 2.80, 2.53, 9.28,Present,61,20.70, 4.55,25,0
448,142, 0.00, 4.32,25.22,Absent,47,28.92, 6.53,34,1
449,130, 0.00, 1.88,12.51,Present,52,20.28, 0.00,17,0
450,124, 1.80, 3.74,16.64,Present,42,22.26, 10.49,20,0
451,144, 4.00, 5.03,25.78,Present,57,27.55, 90.00,48,1
452,136, 1.81, 3.31, 6.74,Absent,63,19.57, 24.94,24,0
453,120, 0.00, 2.77,13.35,Absent,67,23.37, 1.03,18,0
454,154, 5.53, 3.20,28.81,Present,61,26.15, 42.79,42,0
455,124, 1.60, 7.22,39.68,Present,36,31.50, 0.00,51,1
456,146, 0.64, 4.82,28.02,Absent,60,28.11, 8.23,39,1
457,128, 2.24, 2.83,26.48,Absent,48,23.96, 47.42,27,1
458,170, 0.40, 4.11,42.06,Present,56,33.10, 2.06,57,0
459,214, 0.40, 5.98,31.72,Absent,64,28.45, 0.00,58,0
460,182, 4.20, 4.41,32.10,Absent,52,28.61, 18.72,52,1
461,108, 3.00, 1.59,15.23,Absent,40,20.09, 26.64,55,0
462,118, 5.40,11.61,30.79,Absent,64,27.35, 23.97,40,0
463,132, 0.00, 4.82,33.41,Present,62,14.70, 0.00,46,1
|
{
"pile_set_name": "Github"
}
|
row.names,sbp,tobacco,ldl,adiposity,famhist,typea,obesity,alcohol,age,chd
1,160,12.00, 5.73,23.11,Present,49,25.30, 97.20,52,1
2,144, 0.01, 4.41,28.61,Absent,55,28.87, 2.06,63,1
3,118, 0.08, 3.48,32.28,Present,52,29.14, 3.81,46,0
4,170, 7.50, 6.41,38.03,Present,51,31.99, 24.26,58,1
5,134,13.60, 3.50,27.78,Present,60,25.99, 57.34,49,1
6,132, 6.20, 6.47,36.21,Present,62,30.77, 14.14,45,0
7,142, 4.05, 3.38,16.20,Absent,59,20.81, 2.62,38,0
8,114, 4.08, 4.59,14.60,Present,62,23.11, 6.72,58,1
9,114, 0.00, 3.83,19.40,Present,49,24.86, 2.49,29,0
10,132, 0.00, 5.80,30.96,Present,69,30.11, 0.00,53,1
11,206, 6.00, 2.95,32.27,Absent,72,26.81, 56.06,60,1
12,134,14.10, 4.44,22.39,Present,65,23.09, 0.00,40,1
13,118, 0.00, 1.88,10.05,Absent,59,21.57, 0.00,17,0
14,132, 0.00, 1.87,17.21,Absent,49,23.63, 0.97,15,0
15,112, 9.65, 2.29,17.20,Present,54,23.53, 0.68,53,0
16,117, 1.53, 2.44,28.95,Present,35,25.89, 30.03,46,0
17,120, 7.50,15.33,22.00,Absent,60,25.31, 34.49,49,0
18,146,10.50, 8.29,35.36,Present,78,32.73, 13.89,53,1
19,158, 2.60, 7.46,34.07,Present,61,29.30, 53.28,62,1
20,124,14.00, 6.23,35.96,Present,45,30.09, 0.00,59,1
21,106, 1.61, 1.74,12.32,Absent,74,20.92, 13.37,20,1
22,132, 7.90, 2.85,26.50,Present,51,26.16, 25.71,44,0
23,150, 0.30, 6.38,33.99,Present,62,24.64, 0.00,50,0
24,138, 0.60, 3.81,28.66,Absent,54,28.70, 1.46,58,0
25,142,18.20, 4.34,24.38,Absent,61,26.19, 0.00,50,0
26,124, 4.00,12.42,31.29,Present,54,23.23, 2.06,42,1
27,118, 6.00, 9.65,33.91,Absent,60,38.80, 0.00,48,0
28,145, 9.10, 5.24,27.55,Absent,59,20.96, 21.60,61,1
29,144, 4.09, 5.55,31.40,Present,60,29.43, 5.55,56,0
30,146, 0.00, 6.62,25.69,Absent,60,28.07, 8.23,63,1
31,136, 2.52, 3.95,25.63,Absent,51,21.86, 0.00,45,1
32,158, 1.02, 6.33,23.88,Absent,66,22.13, 24.99,46,1
33,122, 6.60, 5.58,35.95,Present,53,28.07, 12.55,59,1
34,126, 8.75, 6.53,34.02,Absent,49,30.25, 0.00,41,1
35,148, 5.50, 7.10,25.31,Absent,56,29.84, 3.60,48,0
36,122, 4.26, 4.44,13.04,Absent,57,19.49, 48.99,28,1
37,140, 3.90, 7.32,25.05,Absent,47,27.36, 36.77,32,0
38,110, 4.64, 4.55,30.46,Absent,48,30.90, 15.22,46,0
39,130, 0.00, 2.82,19.63,Present,70,24.86, 0.00,29,0
40,136,11.20, 5.81,31.85,Present,75,27.68, 22.94,58,1
41,118, 0.28, 5.80,33.70,Present,60,30.98, 0.00,41,1
42,144, 0.04, 3.38,23.61,Absent,30,23.75, 4.66,30,0
43,120, 0.00, 1.07,16.02,Absent,47,22.15, 0.00,15,0
44,130, 2.61, 2.72,22.99,Present,51,26.29, 13.37,51,1
45,114, 0.00, 2.99, 9.74,Absent,54,46.58, 0.00,17,0
46,128, 4.65, 3.31,22.74,Absent,62,22.95, 0.51,48,0
47,162, 7.40, 8.55,24.65,Present,64,25.71, 5.86,58,1
48,116, 1.91, 7.56,26.45,Present,52,30.01, 3.60,33,1
49,114, 0.00, 1.94,11.02,Absent,54,20.17, 38.98,16,0
50,126, 3.80, 3.88,31.79,Absent,57,30.53, 0.00,30,0
51,122, 0.00, 5.75,30.90,Present,46,29.01, 4.11,42,0
52,134, 2.50, 3.66,30.90,Absent,52,27.19, 23.66,49,0
53,152, 0.90, 9.12,30.23,Absent,56,28.64, 0.37,42,1
54,134, 8.08, 1.55,17.50,Present,56,22.65, 66.65,31,1
55,156, 3.00, 1.82,27.55,Absent,60,23.91, 54.00,53,0
56,152, 5.99, 7.99,32.48,Absent,45,26.57,100.32,48,0
57,118, 0.00, 2.99,16.17,Absent,49,23.83, 3.22,28,0
58,126, 5.10, 2.96,26.50,Absent,55,25.52, 12.34,38,1
59,103, 0.03, 4.21,18.96,Absent,48,22.94, 2.62,18,0
60,121, 0.80, 5.29,18.95,Present,47,22.51, 0.00,61,0
61,142, 0.28, 1.80,21.03,Absent,57,23.65, 2.93,33,0
62,138, 1.15, 5.09,27.87,Present,61,25.65, 2.34,44,0
63,152,10.10, 4.71,24.65,Present,65,26.21, 24.53,57,0
64,140, 0.45, 4.30,24.33,Absent,41,27.23, 10.08,38,0
65,130, 0.00, 1.82,10.45,Absent,57,22.07, 2.06,17,0
66,136, 7.36, 2.19,28.11,Present,61,25.00, 61.71,54,0
67,124, 4.82, 3.24,21.10,Present,48,28.49, 8.42,30,0
68,112, 0.41, 1.88,10.29,Absent,39,22.08, 20.98,27,0
69,118, 4.46, 7.27,29.13,Present,48,29.01, 11.11,33,0
70,122, 0.00, 3.37,16.10,Absent,67,21.06, 0.00,32,1
71,118, 0.00, 3.67,12.13,Absent,51,19.15, 0.60,15,0
72,130, 1.72, 2.66,10.38,Absent,68,17.81, 11.10,26,0
73,130, 5.60, 3.37,24.80,Absent,58,25.76, 43.20,36,0
74,126, 0.09, 5.03,13.27,Present,50,17.75, 4.63,20,0
75,128, 0.40, 6.17,26.35,Absent,64,27.86, 11.11,34,0
76,136, 0.00, 4.12,17.42,Absent,52,21.66, 12.86,40,0
77,134, 0.00, 5.90,30.84,Absent,49,29.16, 0.00,55,0
78,140, 0.60, 5.56,33.39,Present,58,27.19, 0.00,55,1
79,168, 4.50, 6.68,28.47,Absent,43,24.25, 24.38,56,1
80,108, 0.40, 5.91,22.92,Present,57,25.72, 72.00,39,0
81,114, 3.00, 7.04,22.64,Present,55,22.59, 0.00,45,1
82,140, 8.14, 4.93,42.49,Absent,53,45.72, 6.43,53,1
83,148, 4.80, 6.09,36.55,Present,63,25.44, 0.88,55,1
84,148,12.20, 3.79,34.15,Absent,57,26.38, 14.40,57,1
85,128, 0.00, 2.43,13.15,Present,63,20.75, 0.00,17,0
86,130, 0.56, 3.30,30.86,Absent,49,27.52, 33.33,45,0
87,126,10.50, 4.49,17.33,Absent,67,19.37, 0.00,49,1
88,140, 0.00, 5.08,27.33,Present,41,27.83, 1.25,38,0
89,126, 0.90, 5.64,17.78,Present,55,21.94, 0.00,41,0
90,122, 0.72, 4.04,32.38,Absent,34,28.34, 0.00,55,0
91,116, 1.03, 2.83,10.85,Absent,45,21.59, 1.75,21,0
92,120, 3.70, 4.02,39.66,Absent,61,30.57, 0.00,64,1
93,143, 0.46, 2.40,22.87,Absent,62,29.17, 15.43,29,0
94,118, 4.00, 3.95,18.96,Absent,54,25.15, 8.33,49,1
95,194, 1.70, 6.32,33.67,Absent,47,30.16, 0.19,56,0
96,134, 3.00, 4.37,23.07,Absent,56,20.54, 9.65,62,0
97,138, 2.16, 4.90,24.83,Present,39,26.06, 28.29,29,0
98,136, 0.00, 5.00,27.58,Present,49,27.59, 1.47,39,0
99,122, 3.20,11.32,35.36,Present,55,27.07, 0.00,51,1
100,164,12.00, 3.91,19.59,Absent,51,23.44, 19.75,39,0
101,136, 8.00, 7.85,23.81,Present,51,22.69, 2.78,50,0
102,166, 0.07, 4.03,29.29,Absent,53,28.37, 0.00,27,0
103,118, 0.00, 4.34,30.12,Present,52,32.18, 3.91,46,0
104,128, 0.42, 4.60,26.68,Absent,41,30.97, 10.33,31,0
105,118, 1.50, 5.38,25.84,Absent,64,28.63, 3.89,29,0
106,158, 3.60, 2.97,30.11,Absent,63,26.64,108.00,64,0
107,108, 1.50, 4.33,24.99,Absent,66,22.29, 21.60,61,1
108,170, 7.60, 5.50,37.83,Present,42,37.41, 6.17,54,1
109,118, 1.00, 5.76,22.10,Absent,62,23.48, 7.71,42,0
110,124, 0.00, 3.04,17.33,Absent,49,22.04, 0.00,18,0
111,114, 0.00, 8.01,21.64,Absent,66,25.51, 2.49,16,0
112,168, 9.00, 8.53,24.48,Present,69,26.18, 4.63,54,1
113,134, 2.00, 3.66,14.69,Absent,52,21.03, 2.06,37,0
114,174, 0.00, 8.46,35.10,Present,35,25.27, 0.00,61,1
115,116,31.20, 3.17,14.99,Absent,47,19.40, 49.06,59,1
116,128, 0.00,10.58,31.81,Present,46,28.41, 14.66,48,0
117,140, 4.50, 4.59,18.01,Absent,63,21.91, 22.09,32,1
118,154, 0.70, 5.91,25.00,Absent,13,20.60, 0.00,42,0
119,150, 3.50, 6.99,25.39,Present,50,23.35, 23.48,61,1
120,130, 0.00, 3.92,25.55,Absent,68,28.02, 0.68,27,0
121,128, 2.00, 6.13,21.31,Absent,66,22.86, 11.83,60,0
122,120, 1.40, 6.25,20.47,Absent,60,25.85, 8.51,28,0
123,120, 0.00, 5.01,26.13,Absent,64,26.21, 12.24,33,0
124,138, 4.50, 2.85,30.11,Absent,55,24.78, 24.89,56,1
125,153, 7.80, 3.96,25.73,Absent,54,25.91, 27.03,45,0
126,123, 8.60,11.17,35.28,Present,70,33.14, 0.00,59,1
127,148, 4.04, 3.99,20.69,Absent,60,27.78, 1.75,28,0
128,136, 3.96, 2.76,30.28,Present,50,34.42, 18.51,38,0
129,134, 8.80, 7.41,26.84,Absent,35,29.44, 29.52,60,1
130,152,12.18, 4.04,37.83,Present,63,34.57, 4.17,64,0
131,158,13.50, 5.04,30.79,Absent,54,24.79, 21.50,62,0
132,132, 2.00, 3.08,35.39,Absent,45,31.44, 79.82,58,1
133,134, 1.50, 3.73,21.53,Absent,41,24.70, 11.11,30,1
134,142, 7.44, 5.52,33.97,Absent,47,29.29, 24.27,54,0
135,134, 6.00, 3.30,28.45,Absent,65,26.09, 58.11,40,0
136,122, 4.18, 9.05,29.27,Present,44,24.05, 19.34,52,1
137,116, 2.70, 3.69,13.52,Absent,55,21.13, 18.51,32,0
138,128, 0.50, 3.70,12.81,Present,66,21.25, 22.73,28,0
139,120, 0.00, 3.68,12.24,Absent,51,20.52, 0.51,20,0
140,124, 0.00, 3.95,36.35,Present,59,32.83, 9.59,54,0
141,160,14.00, 5.90,37.12,Absent,58,33.87, 3.52,54,1
142,130, 2.78, 4.89, 9.39,Present,63,19.30, 17.47,25,1
143,128, 2.80, 5.53,14.29,Absent,64,24.97, 0.51,38,0
144,130, 4.50, 5.86,37.43,Absent,61,31.21, 32.30,58,0
145,109, 1.20, 6.14,29.26,Absent,47,24.72, 10.46,40,0
146,144, 0.00, 3.84,18.72,Absent,56,22.10, 4.80,40,0
147,118, 1.05, 3.16,12.98,Present,46,22.09, 16.35,31,0
148,136, 3.46, 6.38,32.25,Present,43,28.73, 3.13,43,1
149,136, 1.50, 6.06,26.54,Absent,54,29.38, 14.50,33,1
150,124,15.50, 5.05,24.06,Absent,46,23.22, 0.00,61,1
151,148, 6.00, 6.49,26.47,Absent,48,24.70, 0.00,55,0
152,128, 6.60, 3.58,20.71,Absent,55,24.15, 0.00,52,0
153,122, 0.28, 4.19,19.97,Absent,61,25.63, 0.00,24,0
154,108, 0.00, 2.74,11.17,Absent,53,22.61, 0.95,20,0
155,124, 3.04, 4.80,19.52,Present,60,21.78,147.19,41,1
156,138, 8.80, 3.12,22.41,Present,63,23.33,120.03,55,1
157,127, 0.00, 2.81,15.70,Absent,42,22.03, 1.03,17,0
158,174, 9.45, 5.13,35.54,Absent,55,30.71, 59.79,53,0
159,122, 0.00, 3.05,23.51,Absent,46,25.81, 0.00,38,0
160,144, 6.75, 5.45,29.81,Absent,53,25.62, 26.23,43,1
161,126, 1.80, 6.22,19.71,Absent,65,24.81, 0.69,31,0
162,208,27.40, 3.12,26.63,Absent,66,27.45, 33.07,62,1
163,138, 0.00, 2.68,17.04,Absent,42,22.16, 0.00,16,0
164,148, 0.00, 3.84,17.26,Absent,70,20.00, 0.00,21,0
165,122, 0.00, 3.08,16.30,Absent,43,22.13, 0.00,16,0
166,132, 7.00, 3.20,23.26,Absent,77,23.64, 23.14,49,0
167,110,12.16, 4.99,28.56,Absent,44,27.14, 21.60,55,1
168,160, 1.52, 8.12,29.30,Present,54,25.87, 12.86,43,1
169,126, 0.54, 4.39,21.13,Present,45,25.99, 0.00,25,0
170,162, 5.30, 7.95,33.58,Present,58,36.06, 8.23,48,0
171,194, 2.55, 6.89,33.88,Present,69,29.33, 0.00,41,0
172,118, 0.75, 2.58,20.25,Absent,59,24.46, 0.00,32,0
173,124, 0.00, 4.79,34.71,Absent,49,26.09, 9.26,47,0
174,160, 0.00, 2.42,34.46,Absent,48,29.83, 1.03,61,0
175,128, 0.00, 2.51,29.35,Present,53,22.05, 1.37,62,0
176,122, 4.00, 5.24,27.89,Present,45,26.52, 0.00,61,1
177,132, 2.00, 2.70,21.57,Present,50,27.95, 9.26,37,0
178,120, 0.00, 2.42,16.66,Absent,46,20.16, 0.00,17,0
179,128, 0.04, 8.22,28.17,Absent,65,26.24, 11.73,24,0
180,108,15.00, 4.91,34.65,Absent,41,27.96, 14.40,56,0
181,166, 0.00, 4.31,34.27,Absent,45,30.14, 13.27,56,0
182,152, 0.00, 6.06,41.05,Present,51,40.34, 0.00,51,0
183,170, 4.20, 4.67,35.45,Present,50,27.14, 7.92,60,1
184,156, 4.00, 2.05,19.48,Present,50,21.48, 27.77,39,1
185,116, 8.00, 6.73,28.81,Present,41,26.74, 40.94,48,1
186,122, 4.40, 3.18,11.59,Present,59,21.94, 0.00,33,1
187,150,20.00, 6.40,35.04,Absent,53,28.88, 8.33,63,0
188,129, 2.15, 5.17,27.57,Absent,52,25.42, 2.06,39,0
189,134, 4.80, 6.58,29.89,Present,55,24.73, 23.66,63,0
190,126, 0.00, 5.98,29.06,Present,56,25.39, 11.52,64,1
191,142, 0.00, 3.72,25.68,Absent,48,24.37, 5.25,40,1
192,128, 0.70, 4.90,37.42,Present,72,35.94, 3.09,49,1
193,102, 0.40, 3.41,17.22,Present,56,23.59, 2.06,39,1
194,130, 0.00, 4.89,25.98,Absent,72,30.42, 14.71,23,0
195,138, 0.05, 2.79,10.35,Absent,46,21.62, 0.00,18,0
196,138, 0.00, 1.96,11.82,Present,54,22.01, 8.13,21,0
197,128, 0.00, 3.09,20.57,Absent,54,25.63, 0.51,17,0
198,162, 2.92, 3.63,31.33,Absent,62,31.59, 18.51,42,0
199,160, 3.00, 9.19,26.47,Present,39,28.25, 14.40,54,1
200,148, 0.00, 4.66,24.39,Absent,50,25.26, 4.03,27,0
201,124, 0.16, 2.44,16.67,Absent,65,24.58, 74.91,23,0
202,136, 3.15, 4.37,20.22,Present,59,25.12, 47.16,31,1
203,134, 2.75, 5.51,26.17,Absent,57,29.87, 8.33,33,0
204,128, 0.73, 3.97,23.52,Absent,54,23.81, 19.20,64,0
205,122, 3.20, 3.59,22.49,Present,45,24.96, 36.17,58,0
206,152, 3.00, 4.64,31.29,Absent,41,29.34, 4.53,40,0
207,162, 0.00, 5.09,24.60,Present,64,26.71, 3.81,18,0
208,124, 4.00, 6.65,30.84,Present,54,28.40, 33.51,60,0
209,136, 5.80, 5.90,27.55,Absent,65,25.71, 14.40,59,0
210,136, 8.80, 4.26,32.03,Present,52,31.44, 34.35,60,0
211,134, 0.05, 8.03,27.95,Absent,48,26.88, 0.00,60,0
212,122, 1.00, 5.88,34.81,Present,69,31.27, 15.94,40,1
213,116, 3.00, 3.05,30.31,Absent,41,23.63, 0.86,44,0
214,132, 0.00, 0.98,21.39,Absent,62,26.75, 0.00,53,0
215,134, 0.00, 2.40,21.11,Absent,57,22.45, 1.37,18,0
216,160, 7.77, 8.07,34.80,Absent,64,31.15, 0.00,62,1
217,180, 0.52, 4.23,16.38,Absent,55,22.56, 14.77,45,1
218,124, 0.81, 6.16,11.61,Absent,35,21.47, 10.49,26,0
219,114, 0.00, 4.97, 9.69,Absent,26,22.60, 0.00,25,0
220,208, 7.40, 7.41,32.03,Absent,50,27.62, 7.85,57,0
221,138, 0.00, 3.14,12.00,Absent,54,20.28, 0.00,16,0
222,164, 0.50, 6.95,39.64,Present,47,41.76, 3.81,46,1
223,144, 2.40, 8.13,35.61,Absent,46,27.38, 13.37,60,0
224,136, 7.50, 7.39,28.04,Present,50,25.01, 0.00,45,1
225,132, 7.28, 3.52,12.33,Absent,60,19.48, 2.06,56,0
226,143, 5.04, 4.86,23.59,Absent,58,24.69, 18.72,42,0
227,112, 4.46, 7.18,26.25,Present,69,27.29, 0.00,32,1
228,134,10.00, 3.79,34.72,Absent,42,28.33, 28.80,52,1
229,138, 2.00, 5.11,31.40,Present,49,27.25, 2.06,64,1
230,188, 0.00, 5.47,32.44,Present,71,28.99, 7.41,50,1
231,110, 2.35, 3.36,26.72,Present,54,26.08,109.80,58,1
232,136,13.20, 7.18,35.95,Absent,48,29.19, 0.00,62,0
233,130, 1.75, 5.46,34.34,Absent,53,29.42, 0.00,58,1
234,122, 0.00, 3.76,24.59,Absent,56,24.36, 0.00,30,0
235,138, 0.00, 3.24,27.68,Absent,60,25.70, 88.66,29,0
236,130,18.00, 4.13,27.43,Absent,54,27.44, 0.00,51,1
237,126, 5.50, 3.78,34.15,Absent,55,28.85, 3.18,61,0
238,176, 5.76, 4.89,26.10,Present,46,27.30, 19.44,57,0
239,122, 0.00, 5.49,19.56,Absent,57,23.12, 14.02,27,0
240,124, 0.00, 3.23, 9.64,Absent,59,22.70, 0.00,16,0
241,140, 5.20, 3.58,29.26,Absent,70,27.29, 20.17,45,1
242,128, 6.00, 4.37,22.98,Present,50,26.01, 0.00,47,0
243,190, 4.18, 5.05,24.83,Absent,45,26.09, 82.85,41,0
244,144, 0.76,10.53,35.66,Absent,63,34.35, 0.00,55,1
245,126, 4.60, 7.40,31.99,Present,57,28.67, 0.37,60,1
246,128, 0.00, 2.63,23.88,Absent,45,21.59, 6.54,57,0
247,136, 0.40, 3.91,21.10,Present,63,22.30, 0.00,56,1
248,158, 4.00, 4.18,28.61,Present,42,25.11, 0.00,60,0
249,160, 0.60, 6.94,30.53,Absent,36,25.68, 1.42,64,0
250,124, 6.00, 5.21,33.02,Present,64,29.37, 7.61,58,1
251,158, 6.17, 8.12,30.75,Absent,46,27.84, 92.62,48,0
252,128, 0.00, 6.34,11.87,Absent,57,23.14, 0.00,17,0
253,166, 3.00, 3.82,26.75,Absent,45,20.86, 0.00,63,1
254,146, 7.50, 7.21,25.93,Present,55,22.51, 0.51,42,0
255,161, 9.00, 4.65,15.16,Present,58,23.76, 43.20,46,0
256,164,13.02, 6.26,29.38,Present,47,22.75, 37.03,54,1
257,146, 5.08, 7.03,27.41,Present,63,36.46, 24.48,37,1
258,142, 4.48, 3.57,19.75,Present,51,23.54, 3.29,49,0
259,138,12.00, 5.13,28.34,Absent,59,24.49, 32.81,58,1
260,154, 1.80, 7.13,34.04,Present,52,35.51, 39.36,44,0
261,118, 0.00, 2.39,12.13,Absent,49,18.46, 0.26,17,1
263,124, 0.61, 2.69,17.15,Present,61,22.76, 11.55,20,0
264,124, 1.04, 2.84,16.42,Present,46,20.17, 0.00,61,0
265,136, 5.00, 4.19,23.99,Present,68,27.80, 25.86,35,0
266,132, 9.90, 4.63,27.86,Present,46,23.39, 0.51,52,1
267,118, 0.12, 1.96,20.31,Absent,37,20.01, 2.42,18,0
268,118, 0.12, 4.16, 9.37,Absent,57,19.61, 0.00,17,0
269,134,12.00, 4.96,29.79,Absent,53,24.86, 8.23,57,0
270,114, 0.10, 3.95,15.89,Present,57,20.31, 17.14,16,0
271,136, 6.80, 7.84,30.74,Present,58,26.20, 23.66,45,1
272,130, 0.00, 4.16,39.43,Present,46,30.01, 0.00,55,1
273,136, 2.20, 4.16,38.02,Absent,65,37.24, 4.11,41,1
274,136, 1.36, 3.16,14.97,Present,56,24.98, 7.30,24,0
275,154, 4.20, 5.59,25.02,Absent,58,25.02, 1.54,43,0
276,108, 0.80, 2.47,17.53,Absent,47,22.18, 0.00,55,1
277,136, 8.80, 4.69,36.07,Present,38,26.56, 2.78,63,1
278,174, 2.02, 6.57,31.90,Present,50,28.75, 11.83,64,1
279,124, 4.25, 8.22,30.77,Absent,56,25.80, 0.00,43,0
280,114, 0.00, 2.63, 9.69,Absent,45,17.89, 0.00,16,0
281,118, 0.12, 3.26,12.26,Absent,55,22.65, 0.00,16,0
282,106, 1.08, 4.37,26.08,Absent,67,24.07, 17.74,28,1
283,146, 3.60, 3.51,22.67,Absent,51,22.29, 43.71,42,0
284,206, 0.00, 4.17,33.23,Absent,69,27.36, 6.17,50,1
285,134, 3.00, 3.17,17.91,Absent,35,26.37, 15.12,27,0
286,148,15.00, 4.98,36.94,Present,72,31.83, 66.27,41,1
287,126, 0.21, 3.95,15.11,Absent,61,22.17, 2.42,17,0
288,134, 0.00, 3.69,13.92,Absent,43,27.66, 0.00,19,0
289,134, 0.02, 2.80,18.84,Absent,45,24.82, 0.00,17,0
290,123, 0.05, 4.61,13.69,Absent,51,23.23, 2.78,16,0
291,112, 0.60, 5.28,25.71,Absent,55,27.02, 27.77,38,1
292,112, 0.00, 1.71,15.96,Absent,42,22.03, 3.50,16,0
293,101, 0.48, 7.26,13.00,Absent,50,19.82, 5.19,16,0
294,150, 0.18, 4.14,14.40,Absent,53,23.43, 7.71,44,0
295,170, 2.60, 7.22,28.69,Present,71,27.87, 37.65,56,1
296,134, 0.00, 5.63,29.12,Absent,68,32.33, 2.02,34,0
297,142, 0.00, 4.19,18.04,Absent,56,23.65, 20.78,42,1
298,132, 0.10, 3.28,10.73,Absent,73,20.42, 0.00,17,0
299,136, 0.00, 2.28,18.14,Absent,55,22.59, 0.00,17,0
300,132,12.00, 4.51,21.93,Absent,61,26.07, 64.80,46,1
301,166, 4.10, 4.00,34.30,Present,32,29.51, 8.23,53,0
302,138, 0.00, 3.96,24.70,Present,53,23.80, 0.00,45,0
303,138, 2.27, 6.41,29.07,Absent,58,30.22, 2.93,32,1
304,170, 0.00, 3.12,37.15,Absent,47,35.42, 0.00,53,0
305,128, 0.00, 8.41,28.82,Present,60,26.86, 0.00,59,1
306,136, 1.20, 2.78, 7.12,Absent,52,22.51, 3.41,27,0
307,128, 0.00, 3.22,26.55,Present,39,26.59, 16.71,49,0
308,150,14.40, 5.04,26.52,Present,60,28.84, 0.00,45,0
309,132, 8.40, 3.57,13.68,Absent,42,18.75, 15.43,59,1
310,142, 2.40, 2.55,23.89,Absent,54,26.09, 59.14,37,0
311,130, 0.05, 2.44,28.25,Present,67,30.86, 40.32,34,0
312,174, 3.50, 5.26,21.97,Present,36,22.04, 8.33,59,1
313,114, 9.60, 2.51,29.18,Absent,49,25.67, 40.63,46,0
314,162, 1.50, 2.46,19.39,Present,49,24.32, 0.00,59,1
315,174, 0.00, 3.27,35.40,Absent,58,37.71, 24.95,44,0
316,190, 5.15, 6.03,36.59,Absent,42,30.31, 72.00,50,0
317,154, 1.40, 1.72,18.86,Absent,58,22.67, 43.20,59,0
318,124, 0.00, 2.28,24.86,Present,50,22.24, 8.26,38,0
319,114, 1.20, 3.98,14.90,Absent,49,23.79, 25.82,26,0
320,168,11.40, 5.08,26.66,Present,56,27.04, 2.61,59,1
321,142, 3.72, 4.24,32.57,Absent,52,24.98, 7.61,51,0
322,154, 0.00, 4.81,28.11,Present,56,25.67, 75.77,59,0
323,146, 4.36, 4.31,18.44,Present,47,24.72, 10.80,38,0
324,166, 6.00, 3.02,29.30,Absent,35,24.38, 38.06,61,0
325,140, 8.60, 3.90,32.16,Present,52,28.51, 11.11,64,1
326,136, 1.70, 3.53,20.13,Absent,56,19.44, 14.40,55,0
327,156, 0.00, 3.47,21.10,Absent,73,28.40, 0.00,36,1
328,132, 0.00, 6.63,29.58,Present,37,29.41, 2.57,62,0
329,128, 0.00, 2.98,12.59,Absent,65,20.74, 2.06,19,0
330,106, 5.60, 3.20,12.30,Absent,49,20.29, 0.00,39,0
331,144, 0.40, 4.64,30.09,Absent,30,27.39, 0.74,55,0
332,154, 0.31, 2.33,16.48,Absent,33,24.00, 11.83,17,0
333,126, 3.10, 2.01,32.97,Present,56,28.63, 26.74,45,0
334,134, 6.40, 8.49,37.25,Present,56,28.94, 10.49,51,1
335,152,19.45, 4.22,29.81,Absent,28,23.95, 0.00,59,1
336,146, 1.35, 6.39,34.21,Absent,51,26.43, 0.00,59,1
337,162, 6.94, 4.55,33.36,Present,52,27.09, 32.06,43,0
338,130, 7.28, 3.56,23.29,Present,20,26.80, 51.87,58,1
339,138, 6.00, 7.24,37.05,Absent,38,28.69, 0.00,59,0
340,148, 0.00, 5.32,26.71,Present,52,32.21, 32.78,27,0
341,124, 4.20, 2.94,27.59,Absent,50,30.31, 85.06,30,0
342,118, 1.62, 9.01,21.70,Absent,59,25.89, 21.19,40,0
343,116, 4.28, 7.02,19.99,Present,68,23.31, 0.00,52,1
344,162, 6.30, 5.73,22.61,Present,46,20.43, 62.54,53,1
345,138, 0.87, 1.87,15.89,Absent,44,26.76, 42.99,31,0
346,137, 1.20, 3.14,23.87,Absent,66,24.13, 45.00,37,0
347,198, 0.52,11.89,27.68,Present,48,28.40, 78.99,26,1
348,154, 4.50, 4.75,23.52,Present,43,25.76, 0.00,53,1
349,128, 5.40, 2.36,12.98,Absent,51,18.36, 6.69,61,0
350,130, 0.08, 5.59,25.42,Present,50,24.98, 6.27,43,1
351,162, 5.60, 4.24,22.53,Absent,29,22.91, 5.66,60,0
352,120,10.50, 2.70,29.87,Present,54,24.50, 16.46,49,0
353,136, 3.99, 2.58,16.38,Present,53,22.41, 27.67,36,0
354,176, 1.20, 8.28,36.16,Present,42,27.81, 11.60,58,1
355,134,11.79, 4.01,26.57,Present,38,21.79, 38.88,61,1
356,122, 1.70, 5.28,32.23,Present,51,24.08, 0.00,54,0
357,134, 0.90, 3.18,23.66,Present,52,23.26, 27.36,58,1
358,134, 0.00, 2.43,22.24,Absent,52,26.49, 41.66,24,0
359,136, 6.60, 6.08,32.74,Absent,64,33.28, 2.72,49,0
360,132, 4.05, 5.15,26.51,Present,31,26.67, 16.30,50,0
361,152, 1.68, 3.58,25.43,Absent,50,27.03, 0.00,32,0
362,132,12.30, 5.96,32.79,Present,57,30.12, 21.50,62,1
363,124, 0.40, 3.67,25.76,Absent,43,28.08, 20.57,34,0
364,140, 4.20, 2.91,28.83,Present,43,24.70, 47.52,48,0
365,166, 0.60, 2.42,34.03,Present,53,26.96, 54.00,60,0
366,156, 3.02, 5.35,25.72,Present,53,25.22, 28.11,52,1
367,132, 0.72, 4.37,19.54,Absent,48,26.11, 49.37,28,0
368,150, 0.00, 4.99,27.73,Absent,57,30.92, 8.33,24,0
369,134, 0.12, 3.40,21.18,Present,33,26.27, 14.21,30,0
370,126, 3.40, 4.87,15.16,Present,65,22.01, 11.11,38,0
371,148, 0.50, 5.97,32.88,Absent,54,29.27, 6.43,42,0
372,148, 8.20, 7.75,34.46,Present,46,26.53, 6.04,64,1
373,132, 6.00, 5.97,25.73,Present,66,24.18,145.29,41,0
374,128, 1.60, 5.41,29.30,Absent,68,29.38, 23.97,32,0
375,128, 5.16, 4.90,31.35,Present,57,26.42, 0.00,64,0
376,140, 0.00, 2.40,27.89,Present,70,30.74,144.00,29,0
377,126, 0.00, 5.29,27.64,Absent,25,27.62, 2.06,45,0
378,114, 3.60, 4.16,22.58,Absent,60,24.49, 65.31,31,0
379,118, 1.25, 4.69,31.58,Present,52,27.16, 4.11,53,0
380,126, 0.96, 4.99,29.74,Absent,66,33.35, 58.32,38,0
381,154, 4.50, 4.68,39.97,Absent,61,33.17, 1.54,64,1
382,112, 1.44, 2.71,22.92,Absent,59,24.81, 0.00,52,0
383,140, 8.00, 4.42,33.15,Present,47,32.77, 66.86,44,0
384,140, 1.68,11.41,29.54,Present,74,30.75, 2.06,38,1
385,128, 2.60, 4.94,21.36,Absent,61,21.30, 0.00,31,0
386,126,19.60, 6.03,34.99,Absent,49,26.99, 55.89,44,0
387,160, 4.20, 6.76,37.99,Present,61,32.91, 3.09,54,1
388,144, 0.00, 4.17,29.63,Present,52,21.83, 0.00,59,0
389,148, 4.50,10.49,33.27,Absent,50,25.92, 2.06,53,1
390,146, 0.00, 4.92,18.53,Absent,57,24.20, 34.97,26,0
391,164, 5.60, 3.17,30.98,Present,44,25.99, 43.20,53,1
392,130, 0.54, 3.63,22.03,Present,69,24.34, 12.86,39,1
393,154, 2.40, 5.63,42.17,Present,59,35.07, 12.86,50,1
394,178, 0.95, 4.75,21.06,Absent,49,23.74, 24.69,61,0
395,180, 3.57, 3.57,36.10,Absent,36,26.70, 19.95,64,0
396,134,12.50, 2.73,39.35,Absent,48,35.58, 0.00,48,0
397,142, 0.00, 3.54,16.64,Absent,58,25.97, 8.36,27,0
398,162, 7.00, 7.67,34.34,Present,33,30.77, 0.00,62,0
399,218,11.20, 2.77,30.79,Absent,38,24.86, 90.93,48,1
400,126, 8.75, 6.06,32.72,Present,33,27.00, 62.43,55,1
401,126, 0.00, 3.57,26.01,Absent,61,26.30, 7.97,47,0
402,134, 6.10, 4.77,26.08,Absent,47,23.82, 1.03,49,0
403,132, 0.00, 4.17,36.57,Absent,57,30.61, 18.00,49,0
404,178, 5.50, 3.79,23.92,Present,45,21.26, 6.17,62,1
405,208, 5.04, 5.19,20.71,Present,52,25.12, 24.27,58,1
406,160, 1.15,10.19,39.71,Absent,31,31.65, 20.52,57,0
407,116, 2.38, 5.67,29.01,Present,54,27.26, 15.77,51,0
408,180,25.01, 3.70,38.11,Present,57,30.54, 0.00,61,1
409,200,19.20, 4.43,40.60,Present,55,32.04, 36.00,60,1
410,112, 4.20, 3.58,27.14,Absent,52,26.83, 2.06,40,0
411,120, 0.00, 3.10,26.97,Absent,41,24.80, 0.00,16,0
412,178,20.00, 9.78,33.55,Absent,37,27.29, 2.88,62,1
413,166, 0.80, 5.63,36.21,Absent,50,34.72, 28.80,60,0
414,164, 8.20,14.16,36.85,Absent,52,28.50, 17.02,55,1
415,216, 0.92, 2.66,19.85,Present,49,20.58, 0.51,63,1
416,146, 6.40, 5.62,33.05,Present,57,31.03, 0.74,46,0
417,134, 1.10, 3.54,20.41,Present,58,24.54, 39.91,39,1
418,158,16.00, 5.56,29.35,Absent,36,25.92, 58.32,60,0
419,176, 0.00, 3.14,31.04,Present,45,30.18, 4.63,45,0
420,132, 2.80, 4.79,20.47,Present,50,22.15, 11.73,48,0
421,126, 0.00, 4.55,29.18,Absent,48,24.94, 36.00,41,0
422,120, 5.50, 3.51,23.23,Absent,46,22.40, 90.31,43,0
423,174, 0.00, 3.86,21.73,Absent,42,23.37, 0.00,63,0
424,150,13.80, 5.10,29.45,Present,52,27.92, 77.76,55,1
425,176, 6.00, 3.98,17.20,Present,52,21.07, 4.11,61,1
426,142, 2.20, 3.29,22.70,Absent,44,23.66, 5.66,42,1
427,132, 0.00, 3.30,21.61,Absent,42,24.92, 32.61,33,0
428,142, 1.32, 7.63,29.98,Present,57,31.16, 72.93,33,0
429,146, 1.16, 2.28,34.53,Absent,50,28.71, 45.00,49,0
430,132, 7.20, 3.65,17.16,Present,56,23.25, 0.00,34,0
431,120, 0.00, 3.57,23.22,Absent,58,27.20, 0.00,32,0
432,118, 0.00, 3.89,15.96,Absent,65,20.18, 0.00,16,0
433,108, 0.00, 1.43,26.26,Absent,42,19.38, 0.00,16,0
434,136, 0.00, 4.00,19.06,Absent,40,21.94, 2.06,16,0
435,120, 0.00, 2.46,13.39,Absent,47,22.01, 0.51,18,0
436,132, 0.00, 3.55, 8.66,Present,61,18.50, 3.87,16,0
437,136, 0.00, 1.77,20.37,Absent,45,21.51, 2.06,16,0
438,138, 0.00, 1.86,18.35,Present,59,25.38, 6.51,17,0
439,138, 0.06, 4.15,20.66,Absent,49,22.59, 2.49,16,0
440,130, 1.22, 3.30,13.65,Absent,50,21.40, 3.81,31,0
441,130, 4.00, 2.40,17.42,Absent,60,22.05, 0.00,40,0
442,110, 0.00, 7.14,28.28,Absent,57,29.00, 0.00,32,0
443,120, 0.00, 3.98,13.19,Present,47,21.89, 0.00,16,0
444,166, 6.00, 8.80,37.89,Absent,39,28.70, 43.20,52,0
445,134, 0.57, 4.75,23.07,Absent,67,26.33, 0.00,37,0
446,142, 3.00, 3.69,25.10,Absent,60,30.08, 38.88,27,0
447,136, 2.80, 2.53, 9.28,Present,61,20.70, 4.55,25,0
448,142, 0.00, 4.32,25.22,Absent,47,28.92, 6.53,34,1
449,130, 0.00, 1.88,12.51,Present,52,20.28, 0.00,17,0
450,124, 1.80, 3.74,16.64,Present,42,22.26, 10.49,20,0
451,144, 4.00, 5.03,25.78,Present,57,27.55, 90.00,48,1
452,136, 1.81, 3.31, 6.74,Absent,63,19.57, 24.94,24,0
453,120, 0.00, 2.77,13.35,Absent,67,23.37, 1.03,18,0
454,154, 5.53, 3.20,28.81,Present,61,26.15, 42.79,42,0
455,124, 1.60, 7.22,39.68,Present,36,31.50, 0.00,51,1
456,146, 0.64, 4.82,28.02,Absent,60,28.11, 8.23,39,1
457,128, 2.24, 2.83,26.48,Absent,48,23.96, 47.42,27,1
458,170, 0.40, 4.11,42.06,Present,56,33.10, 2.06,57,0
459,214, 0.40, 5.98,31.72,Absent,64,28.45, 0.00,58,0
460,182, 4.20, 4.41,32.10,Absent,52,28.61, 18.72,52,1
461,108, 3.00, 1.59,15.23,Absent,40,20.09, 26.64,55,0
462,118, 5.40,11.61,30.79,Absent,64,27.35, 23.97,40,0
463,132, 0.00, 4.82,33.41,Present,62,14.70, 0.00,46,1
|
{
"pile_set_name": "Github"
}
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Library/Spool/UI
FILE: uiSpoolSummonsPrint.asm
AUTHOR: Don Reeves, March 30, 1990
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial revision
DESCRIPTION:
Contains all the procedures & method handlers that retrieve
information from the printer drivers and .INI file(s).
$Id: uiSpoolSummonsPrint.asm,v 1.1 97/04/07 11:10:39 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsPrinterInstalledRemoved
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Notification that a printer device was added or removed
CALLED BY: GLOBAL (MSG_PRINTER_INSTALLED_REMOVED)
PASS: *DS:SI = SpoolSummonsClass object
DS:DI = SpoolSummonsClassInstance
RETURN: Nothing
DESTROYED: AX, CX, DX, BP
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsPrinterInstalledRemoved method dynamic SpoolSummonsClass,
MSG_PRINTER_INSTALLED_REMOVED
; If there are no more printers, close the print dialog.
; Otherwise, just re-initialize.
;
or ds:[di].SSI_flags, mask SSF_RELOAD_PRINTER_LIST
mov cx, PDT_ALL_LOCAL_AND_NETWORK
call SpoolGetNumPrinters
tst ax
jz bringDown
call SpoolSummonsInitialize
jmp exit
bringDown:
mov ax, MSG_GEN_GUP_INTERACTION_COMMAND
mov cx, IC_DISMISS
mov si, offset PrinterChangeBox
call ObjCallInstanceNoLock
mov ax, MSG_GEN_GUP_INTERACTION_COMMAND
mov cx, IC_DISMISS
mov si, offset PrintDialogBox
call ObjCallInstanceNoLock
exit:
ret
SpoolSummonsPrinterInstalledRemoved endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsRequestPrinterMoniker
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sets the moniker (a printer name) for a single list entry
CALLED BY: UI (MSG_META_GEN_LIST_REQUEST_ENTRY_MONIKER)
PASS: DS:*SI = SpoolSummons object
DS:DI = SpoolSummons instance data
CX:DX = OD of the dynamic list
BP = Requested entry #
RETURN: Nothing (but a method is sent back)
DESTROYED: AX, BX, CX, DX, DI, SI, BP
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsRequestPrinterMoniker method dynamic SpoolSummonsClass,
MSG_SPOOL_SUMMONS_REQUEST_PRINTER_MONIKER
.enter
;
; Make sure we've actually got a printer
tst ds:[di].SSI_printDataHan
jz done
; Access the printer strings
;
push si ; save the SpoolSummons chunk
push ds, dx ; save the GenDynamicList OD
call SSOpenPrintStrings ; lock the file, etc...
mov dx, bp ; printer number => DX
call SpoolSummonsGetPrinterCategory ; string => DS:SI
; string length => CX
; Send method to the GenDynamicList
;
mov cx, ds
mov dx, si ; printer name => CX:DX
pop ds, si ; GenDynamicList OD => DS:SI
mov ax, MSG_GEN_DYNAMIC_LIST_REPLACE_ITEM_TEXT
call ObjCallInstanceNoLock ; send the message
; Finally, unlock the strings block
;
pop si ; restore SpoolSummons chunk
call SSClosePrintStrings ; close the print strings
done:
.leave
ret
SpoolSummonsRequestPrinterMoniker endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsLoadPrinters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load all the available printers from the .INI file
CALLED BY: GLOBAL
PASS: DS:*SI = SpoolSummons instance data
RETURN: AX = Number of VALID printers
CX = Number of printers
DX = Currently selected printer
DS:DI = SpoolSummonsInstance
Carry = Set if need to reset everything
= Clear if nothing has changed
DESTROYED: BX
PSEUDO CODE/STRATEGY:
Should be called each time the SpoolSummons comes on screen.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsLoadPrinters proc near
class SpoolSummonsClass
uses bp, es
.enter
; See if we need to reload our data
;
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
test ds:[di].SSI_flags, mask SSF_RELOAD_PRINTER_LIST
jz exit ; if no changes, do nothing
; First remove the old UI, if necessary
;
andnf ds:[di].SSI_flags, not (mask SSF_RELOAD_PRINTER_LIST)
mov cx, ds:[di].SSI_currentPrinter ; printer # => CX
call RemovePrinterUIBoth ; remove all current UI
; Load all the names of the printer devices into a block
;
call SpoolSummonsLoadPrinterNames ; # of devices => AX
; memory block => BX
; memory block size => CX
; default system printer => DI
; Store away the data
;
mov bp, ds:[si] ; dereference the handle
add bp, ds:[bp].SpoolSummons_offset ; access my instance data
mov ds:[bp].SSI_numPrinters, ax ; store number of printers
xchg ds:[bp].SSI_printDataHan, bx ; and the printers data handle
mov ds:[bp].SSI_printDataLen, cx ; and the length of the data
mov ds:[bp].SSI_sysDefPrinter, di ; store the system's default
mov dx, ds:[bp].SSI_appDefPrinter ; application default => DX
mov cx, ax ; number of printers => CX & AX
tst bx ; was there an old data handle
jz done ; no, so go on
call MemFree ; else free this block handle
; Exit here
done:
call SpoolSummonsLoadInfo ; load all the information
call SpoolSummonsAssignDefault ; assign the default printer
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access my instance data
mov ax, ds:[di].SSI_numValidPrinters
mov ds:[di].SSI_currentPrinter, -1 ; reset the current printer
stc ; must reset everything
exit:
.leave
ret
SpoolSummonsLoadPrinters endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsLoadPrinterNames
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load the printer names for the current driver type
CALLED BY: SpoolSummonsLoadPrinters
PASS: *DS:SI = SpoolSummonsClass object
RETURN: AX = Number of devices
BX = Handle of block holding device strings (NULL if none)
CX = Size of memory block
DI = Default system printer
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 11/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsLoadPrinterNames proc near
class SpoolSummonsClass
uses si, es
.enter
; Get the number of device available
;
mov di, ds:[si]
add di, ds:[di].SpoolSummons_offset
mov cl, ds:[di].SSI_driverType
mov dh, cl
clr ch
call SpoolGetNumPrinters ; number of printers => AX
tst ax
jz error
; Allocate a block large enough to hold the device strings
;
push ax
mov cl, GEODE_MAX_DEVICE_NAME_SIZE
mul cl ; # of byte => AX
mov si, ax
mov bx, ds:[LMBH_handle]
call MemOwner ; owner (app process) => BX
mov cx, mask HF_SHARABLE or mask HF_SWAPABLE or \
((mask HAF_LOCK) shl 8)
call MemAllocSetOwner
pop bp ; max # of printers => BP
jc error ; if no memory, fail
; Load the printer names, one by one. Register usage:
; AX = Printer #
; CX = Valid # of printers
; DH = PrinterDeviceType we want
; BP = Total # of printers
; ES:DI = Buffer for printer names
;
mov es, ax
clr ax, cx, di
stringLoop:
push cx
call SpoolGetPrinterString ; fill buffer with string
pop cx
jc noMore
inc ax
cmp dh, PDT_ALL ; if looking for all devices
je havePrinter ; ...then skip none
cmp dl, dh ; else compare device types
jne stringLoop ; ...and skip mismatches
havePrinter:
inc cx
cmp cx, bp
je noMore
add di, GEODE_MAX_DEVICE_NAME_SIZE
jmp stringLoop
; OK, we've loaded all of the printers. Clean up &
; choose the default printer. If we have PDT_ALL or
; PDT_PRINTER, use the value in the .INI file. Else,
; choose the first device.
noMore:
call MemUnlock ; unlock device strings block
call SpoolGetDefaultPrinter ; default printer => AX
cmp dh, PDT_PRINTER ; if device = printer
je done ; ...use returned value
clr ax ; else use first device
done:
mov_tr di, ax ; default => DI
mov_tr ax, cx ; # of devices => AX
mov cx, si ; size of block => CX
exit:
.leave
ret
; Some sort of error was returned. Abort, abort.
error:
clr ax, bx, cx, di
jmp exit
SpoolSummonsLoadPrinterNames endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsLoadInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load all the information about every printer
CALLED BY: SpoolSummonsLoadPrinters
PASS: DS:*SI = SpoolSummonsClass instance data
RETURN: AX = Chunk handle to the PrinterInfoTable
= 0 if no printers
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 6/14/90 Initial version
Don 4/18/91 Only initialize structures - load no printers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsLoadInfo proc near
class SpoolSummonsClass
uses cx, dx, di
.enter
; Destroy the old handle, allocate a new buffer
;
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset
mov cx, ds:[di].SSI_numPrinters ; number of printers => CX
clr ax
xchg ax, ds:[di].SSI_printInfoChunk
mov ds:[di].SSI_numValidPrinters, 0 ; assume no valid printers
tst ax ; invalid handle ??
jz getNew ; yes, so jump
call LMemFree ; free the chunk
clr ax ; now there's no handle
getNew:
jcxz done ; no printers (AX = 0)
push cx ; save the number if printers
mov al, size PrinterInfoStruct
mul cl ; assume < 256 printers
mov cx, ax ; size => CX
mov al, mask OCF_IGNORE_DIRTY ; ignore dirty
call LMemAlloc ; allocate the chunk
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
mov ds:[di].SSI_printInfoChunk, ax ; store the new chunk
pop cx ; number of printers => CX
; Initialize all the PrinterInfoStructs
;
mov di, ax ; information chunk => DI
mov di, ds:[di] ; dereference handle
initLoop:
mov ds:[di].PIS_info, 0 ; not initialized
add di, size PrinterInfoStruct ; go to the next structure
loop initLoop
done:
.leave
ret
SpoolSummonsLoadInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsAssignDefault
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Assign the default printer, based upon the application's
desires and what printers are valid
CALLED BY: SpoolSummonsLoadPrinters
PASS: DS:*SI = SpoolSummonClass instance data
AX = PrinterInfoChunk handle
CX = Number of printers
DX = Application default printer
DI = System default printer
RETURN: DX = Default printer
DESTROYED: AX, BX, DI
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 6/18/90 Initial version
Don 4/18/91 Call standard routine to load printer info
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsAssignDefault proc near
uses cx
.enter
; Test the default case
;
tst ax ; any information chunk
jz done
cmp dx, -1 ; no application default ??
jne defaultLoop
mov dx, di ; else use system default
jmp defaultLoop
; Find a default printer
startLoop:
clr ax, dx ; start at printer zero
defaultLoop:
xchg cx, dx
call AccessPrinterInfoStruct
xchg cx, dx
jc tryAnother ; if invalid, try another
test ds:[di].PIS_info, mask SSPI_VALID
jnz done
tryAnother:
tst ax
jnz startLoop
inc dx ; go to the next printer
loop defaultLoop
mov dx, -1 ; no default found = ouch!
done:
.leave
ret
SpoolSummonsAssignDefault endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsGetPrinterCategory
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Returns the appropriate printer category string
CALLED BY: GLOBAL
PASS: DS:DI = Printer data strings
CX = Number of bytes in the strings block
DX = Number of string to access (0 is the first)
RETURN: DS:SI = Requested string
CX = Length of the string
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSGetPrinterCategory proc far
call SpoolSummonsGetPrinterCategory
ret
SSGetPrinterCategory endp
SpoolSummonsGetPrinterCategory proc near
uses ax, di, es
.enter
; Now that the printer names are stored in an array, this is simple
;
EC < cmp dx, MAXIMUM_NUMBER_OF_PRINTERS >
EC < ERROR_A SPOOL_SUMMONS_TOO_MANY_PRINTERS >
mov al, GEODE_MAX_DEVICE_NAME_SIZE
mul dl
mov si, ax ; printer name => DS:SI
; Now calculate the length of the string
;
segmov es, ds
mov di, ax ; start of string => ES:DI
call LocalStringLength ; cx <- length w/o NULL
.leave
ret
SpoolSummonsGetPrinterCategory endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsGetPrinterInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Returns the printer information for a specific printer
CALLED BY: SpoolSummonsPrinterSelected
PASS: DS:*SI = SpoolSummonsClass instance data
CX = Printer number
RETURN: CL = PaperInputOptions
CH = Maximum PaperSizes
DL = Printer attributes
DH = SpoolSummonsPrinterInfo
(If not valid, CX contains the PRINT_CONTROL_ERROR
enumerated type to use in an error box)
DESTROYED: DI
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 6/14/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsGetPrinterInfo proc near
uses ax
.enter
; Now get out the information
;
clr dx ; assume no printers
call AccessPrinterInfoStruct
mov cx, PCERR_NO_PRINTERS ; assume no printers
jc done ; fail if error
mov dl, ds:[di].PIS_POM
mov dh, ds:[di].PIS_info
mov cx, ds:[di].PIS_error ; error, just in case
done:
.leave
ret
SpoolSummonsGetPrinterInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AccessPrinterInfoStruct
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Returns pointer to the proper PrinterInfoStruct
CALLED BY: INTERNAL
PASS: DS:*SI = SpoolSummonsClass specific instance data
CX = Printer number (0 to MAXIMUM_NUMBER_OF_PRINTERS)
RETURN: DS:DI = PrinterInfoStruct
Carry = Set if no such printer
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 2/26/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AccessPrinterInfoStruct proc near
class SpoolSummonsClass
uses ax, cx
.enter
; Access the correct PrinterInfoStruct
;
EC < cmp cx, MAXIMUM_NUMBER_OF_PRINTERS >
EC < ERROR_A SPOOL_SUMMONS_TOO_MANY_PRINTERS >
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
cmp cx, ds:[di].SSI_numPrinters ; if printer # too large, error
jae error ; printer # too large!
push cx ; save printer number
mov di, ds:[di].SSI_printInfoChunk ; table chunk => DI
mov di, ds:[di] ; dereference the chunk
mov al, size PrinterInfoStruct
mul cl
add di, ax ; DS:DI => PrinterInfoStruct
pop cx ; printer number => CX
test ds:[di].PIS_info, mask SSPI_INITIALIZED
jnz done
call LoadPrinterInfo ; load printer information
done:
.leave
ret
error:
stc
jmp done
AccessPrinterInfoStruct endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LoadPrinterInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load the printer information for a specific printer
CALLED BY: AccessPrinterInfoStruct
PASS: DS:*SI = SpoolSummonClass instance data
DS:DI = PrinterInfoStruct
CX = Printer number
RETURN: Nothing
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 4/18/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
LoadPrinterInfo proc near
uses ax, bx, cx, dx, di, es
class SpoolSummonsClass
.enter
; Some set-up work
;
push si ; save the SpoolSummons chunk
segmov es, ds ; PrinterInfoStruct => ES:DI
or es:[di].PIS_info, mask SSPI_INITIALIZED
push di, cx
call SSOpenPrintStrings ; open the print strings
pop dx ; printer number => DX
call SpoolSummonsGetPrinterCategory ; device name => DS:SI
pop di ; PrinterInfoStruct => ES:DI
ConvPrinterNameToIniCat
; Now grab all the specific information
;
call GrabPrinterInfo ; grab the printer information
ConvPrinterNameDone
; Now clean up
;
segmov ds, es ; PrinterInfoStruct => DS:DI
pop si ; restore the chunk handle
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access my instance data
test dl, mask SSPI_VALID ; valid printer ??
jz done
inc ds:[di].SSI_numValidPrinters
done:
call SSClosePrintStrings ; unlock the string block
.leave
ret
LoadPrinterInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrabPrinterInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Grab specific information from the printer
CALLED BY: LoadPrinterInfo
PASS: DS:SI = Printer name string
ES:DI = PrinterInfoStruct
RETURN: DL = SpoolSummonsPrinterInfo
SSPI_VALID is important
DESTROYED: AX, CX, DH
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 4/11/90 Initial version
Don 5/9/90 Perform some wonderful error checking
Don 2/22/91 Cleaned up the code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ssPortString byte 'port', 0
GrabPrinterInfo proc near
uses bx, bp, ds, es, si
SBCS < deviceName local (MAX_DEVICE_NAME_SIZE) dup (char) >
DBCS < deviceName local (MAX_DEVICE_NAME_SIZE) dup (wchar) >
driverStrategy local fptr.far
printInfo local SpoolSummonsPrinterInfo
.enter
; Determine if we are printing to a file or not
;
mov printInfo, 0 ; initalize to zero
push es, di, bp ; save local variable staff
mov cx, cs
mov dx, offset SpoolSummonsCode:ssPortString
segmov es, ss
lea di, ss:[deviceName] ; ES:DI is the buffer (temp)
SBCS < mov bp,(MAX_DEVICE_NAME_SIZE) or INITFILE_UPCASE_CHARS>
DBCS < mov bp,(MAX_DEVICE_NAME_SIZE*(size wchar)) or INITFILE_UPCASE_CHARS>
call InitFileReadString
pop bp ; local variables => BP
jc getDriverName ; if failure, give up
SBCS < cmp {char} es:[di], 'F' ; F as in "FILE" ?? >
DBCS < cmp {wchar} es:[di], 'F' ; F as in "FILE" ?? >
jne getDriverName
or printInfo, mask SSPI_PRINT_TO_FILE
; Get the driver name (SpoolSummonsPrinterInfo in AL)
getDriverName:
call SpoolLoadDriverLow ; load the printer driver
pop es, di ; restore saved data
jc fail
; Access the PrintDriverInfo block
;
mov driverStrategy.offset, cx
mov driverStrategy.segment, dx ; store the FAR address
push bx ; save the Driver handle
xchg ax, bx ; PState handle => BX
push di ; save the PrinterInfoStruct
mov di, DR_PRINT_DRIVER_INFO
call driverStrategy ; PrintDriverInfo => DX:SI
xchg bx, dx
call MemLock
add si, size DriverExtendedInfoTable
mov ds, ax ; PrintDriverInfo => DS:SI
pop di ; PrinterInfoStruct => ES:DI
push di
call CopyDriverInfo ; copy the driver information
call MemUnlock
mov bx, dx ; PState handle => BX
; Access the PrinterInfo block for this specific printer
;
mov di, DR_PRINT_DEVICE_INFO ; get the print device info
call driverStrategy ; PrinterInfo => DX:SI
call MemFree ; free the PState
mov bx, dx ; PrinterInfo handle => BX
tst bx ; if null handle returned,
jz deviceInvalid ; ...device is bogus
call MemLock ; lock the handle
mov ds, ax ; DS:SI => PrinterInfo
pop di ; ES:DI => PrinterInfoStruct
call CopyPrinterInfo ; copy all the data over
call MemUnlock ; unlock the PrinterInfo
mov dl, mask SSPI_VALID
freeDriver:
pop bx ; restore the Driver Handle
push ds
segmov ds,es
call SpoolFreeDriver ; free up the driver
pop ds
jmp done ; and we're done
; Assume after this point that PrinterInfoStruct is in ES:DI
fail:
mov es:[di].PIS_error, ax ; store cause of error
clr dl
done:
or dl, printInfo ; include earlier information
or es:[di].PIS_info, dl ; store SSPI_VALID or not
.leave
ret
; Handle invalid device case (SpoolLoadDriverLow will never
; catch this case because UserLoadExtendedDriver does not)
deviceInvalid:
pop di ; ES:DI => PrinterInfoStruct
mov es:[di].PIS_error, PCERR_PRINTER_NOT_KNOWN
clr dl ; don't set SSPI_VALID
jmp freeDriver
GrabPrinterInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolLoadDriver
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load a printer driver
CALLED BY: EXTERNAL
PASS: *DS:SI = SpoolSummonsClass object
DX = Printer number
RETURN: see SpoolLoadDriverLow
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolLoadDriver proc near
uses di
.enter
; Set up for lower-level call
;
push ds, dx ; save segment, printer number
call SSOpenPrintStrings
pop dx
call SpoolSummonsGetPrinterCategory ; printer category => DS:SI
ConvPrinterNameToIniCat
call SpoolLoadDriverLow ; load the printer driver
ConvPrinterNameDone
; Clean up
;
pop ds
pushf ; save carry result
mov si, offset PrintDialogBox ; SpoolSummonsClass => DS:*SI
call SSClosePrintStrings
popf ; restore carry
.leave
ret
SpoolLoadDriver endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolFreeDriver
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Free a driver
CALLED BY: UTILITY
PASS: DS = Segment of SpoolSummons object
BX = Handle of driver or FREE_DRIVER_IMMEDIATELY
RETURN: Nothing
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolFreeDriver proc near
class SpoolSummonsClass
uses bx, si
.enter
; We cache this driver, and free the currently cached driver
;
mov si, offset PrintDialogBox
EC < call ECCheckObject >
mov si, ds:[si]
add si, ds:[si].SpoolSummons_offset
xchg bx, ds:[si].SSI_cachedDriver
tst bx
jz done
; See if drivers should be freed immediately, in case
; this object is getting destroyed. Make sure we handle
; a case where FREE_DRIVER_IMMEDIATELY is passed more
; than once.
;
cmp bx, FREE_DRIVER_IMMEDIATELY
jne freeDriver
xchg bx, ds:[si].SSI_cachedDriver
cmp bx, FREE_DRIVER_IMMEDIATELY
je done
freeDriver:
call GeodeFreeDriver
done:
.leave
ret
SpoolFreeDriver endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolFreeDriverAndUIBlock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Free a driver and a memory block that was duplicated from
a resource in that driver
CALLED BY: UTILITY
PASS: DS = Segment of SpoolSummons object
BX = Handle of driver
CX:DX = OD of object in duplicated tree
RETURN: Nothing
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolFreeDriverAndUIBlock proc near
class SpoolSummonsClass
uses ax, cx, dx, di, si, bp
.enter
; Record an event we will send to ourselves
;
mov ax, MSG_SPOOL_SUMMONS_FREE_UI_BLOCK_AND_DRIVER
mov bp, bx ; driver handle => BP
mov bx, ds:[LMBH_handle]
mov si, offset PrintDialogBox
mov di, mask MF_RECORD
call ObjMessage
; Now flush the input queue for the block
;
mov ax, MSG_META_OBJ_FLUSH_INPUT_QUEUE
mov dx, cx ; handle of block to be freed
mov cx, di ; event to send ourselves
clr bp ; start the flush process
call ObjCallInstanceNoLock
.leave
ret
SpoolFreeDriverAndUIBlock endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsFreeUIBlockAndDriver
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Message sent back after flusing UI queue
CALLED BY: GLOBAL (MSG_SPOOL_SUMMONS_FREE_UI_BLOCK_AND_DRIVER)
PASS: *DS:SI = SpoolSummonsClass object
DS:DI = SpoolSummonsClassInstance
CX:DX = OD of object in duplicated block
BP = Handle of driver to free
RETURN: Nothing
DESTROYED: AX, CX, DX, BP
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 11/16/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsFreeUIBlockAndDriver method dynamic SpoolSummonsClass,
MSG_SPOOL_SUMMONS_FREE_UI_BLOCK_AND_DRIVER
.enter
; First free the block
;
push bp
mov ax, MSG_META_BLOCK_FREE
mov bx, cx
mov si, dx ; duplicated tree => BX:SI
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
; Now free the driver
;
pop bx
call SpoolFreeDriver
.leave
ret
SpoolSummonsFreeUIBlockAndDriver endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolLoadDriverLow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load a printer driver
CALLED BY: SpoolLoadDriver(), GrabPrinterInfo()
PASS: DS:SI = Printer category name
ES = Segment holding SpoolSummons object
RETURN: AX = PState handle
BX = Driver handle
DX:CX = Driver Strategy
Carry = Clear (success)
- or -
AX = PrinterControlErrors
BX = garbage
DX:CX = garbage
Carry = Set (failure)
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
Call SpoolFreeDriver instead of GeodeFreeDriver to
free the just-loaded printer driver
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 4/17/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolLoadDriverLow proc near
uses ds, si
.enter
; First allocate a PState
;
mov ax, (size PState)
mov cx, ALLOC_DYNAMIC_NO_ERR or ((mask HAF_ZERO_INIT) shl 8)
call MemAlloc ; handle => BX (PState)
push bx ; save PState handle
; Access this driver, please
;
mov ax, SP_PRINTER_DRIVERS
mov cx, PRINT_PROTO_MAJOR
mov dx, PRINT_PROTO_MINOR
call UserLoadExtendedDriver ; driver handle => BX
jc error ; if error, abort
; The driver is loaded. Now set up a few things
;
call GeodeInfoDriver ; to get strategy routine
mov cx, ds:[si].DIS_strategy.offset
mov dx, ds:[si].DIS_strategy.segment
pop ax ; PState handle => AX
clc ; indicate success
done:
.leave
ret
; We couldn't set device. Fail & clean up
error:
pop bx ; PState handle => BX
call MemFree ; free the PState
mov ax, PCERR_PRINTER_NOT_KNOWN ; error type => AX
stc ; set carry for failure
jmp done ; we're outta here
SpoolLoadDriverLow endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CopyDriverInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load the driver-dependent information
CALLED BY: GrabPrinterInfo
PASS: DS:SI = PrintDriverInfo
ES:DI = PrinterInfoStruct
RETURN: Nothing
DESTROYED: AX
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 4/17/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CopyDriverInfo proc near
.enter
mov ax, ds:[si].PDI_timeoutValue
mov es:[di].PIS_timeout, ax
mov al, ds:[si].PDI_driverType ; PrinterDriverType => AL
mov es:[di].PIS_driverType, al
.leave
ret
CopyDriverInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CopyPrinterInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Copy the needed information out of the PrinterInfo table
into my own PrinterInfoStruct
CALLED BY: GrabPrinterInfo
PASS: DS:SI = PrinterInfo
ES:DI = PrinterInfoStruct
RETURN: Nothing
DESTROYED: AX
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 2/22/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CopyPrinterInfo proc near
.enter
; Determine what printer modes this beast supports
;
clr al ; initially no printer modes
tst ds:[si].PI_lowRes ; low resolution graphics
jz mode1
or al, mask POM_GRAPHICS_LOW
mode1:
tst ds:[si].PI_medRes ; medium resolution graphics
jz mode2
or al, mask POM_GRAPHICS_MEDIUM
mode2:
tst ds:[si].PI_hiRes ; high-resolution graphics
jz mode3
or al, mask POM_GRAPHICS_HIGH
mode3:
tst ds:[si].PI_draft ; text draft
jz mode4
or al, mask POM_TEXT_DRAFT
mode4:
tst ds:[si].PI_nlq ; near letter quality
jz modeDone
or al, mask POM_TEXT_NLQ
; Now copy all the information we need
modeDone:
mov es:[di].PIS_POM, al ; store the PrinterOutputModes
; Set some information flags
;
mov ax, ds:[si].PI_paperWidth
mov es:[di].PIS_maxWidth, ax
test ds:[si].PI_connect, mask PC_FILE
jz mainUI
or es:[di].PIS_info, mask SSPI_CAPABLE_TO_FILE
mainUI:
tst ds:[si].PI_mainUI.chunk
jz optionUI
or es:[di].PIS_info, mask SSPI_UI_IN_DIALOG_BOX
optionUI:
tst ds:[si].PI_optionsUI.chunk
jz done
or es:[di].PIS_info, mask SSPI_UI_IN_OPTIONS_BOX
done:
.leave
ret
CopyPrinterInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsGetPrinterStrings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Provides a copy of the block containing the print strings
CALLED BY: GLOBAL (MSG_SPOOL_SUMMONS_GET_PRINTER_STRINGS)
PASS: DS:*SI = SpoolSummons instance data
RETURN: CX = Length of the buffer
DX = Handle to block holding the strings
BP = Currently selected printer
DESTROYED: AX, BX, DI
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsGetPrinterStrings method SpoolSummonsClass, \
MSG_SPOOL_SUMMONS_GET_PRINTER_STRINGS
.enter
push ds, si ; save the SpoolSummons handle
call SSOpenPrintStrings ; get some important data
mov bp, dx ; current printer => BP
inc cx ; leave room for NULL
mov dx, cx ; store in DX
mov ax, cx ; bytes to allocate
mov cx, ((mask HF_SHARABLE or mask HF_SWAPABLE) or \
((mask HAF_LOCK or mask HAF_NO_ERR) shl 8))
call MemAlloc ; allocate a block
mov si, di ; DS:SI is the string buffer
mov es, ax
clr di ; ES:DI is the blank buffer
mov cx, dx ; bytes to copy => CX
rep movsb ; copy the bytes
mov cx, dx ; string size => CX
dec cx ; without NULL, actually
mov dx, bx ; block handle => DX
call MemUnlock ; unlock the block
pop ds, si ; restore the SpoolSummons obj
call SSClosePrintStrings ; unlock the strings block
.leave
ret
SpoolSummonsGetPrinterStrings endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSOpenPrintStrings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Access the print strings block and lock it
CALLED BY: GLOBAL
PASS: DS:*SI = SpoolSummons instance data
RETURN: DS:DI = Printer strings
CX = Length of the strings buffer
DX = Current printer (0 -> N-1)
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSOpenPrintStrings proc near
class SpoolSummonsClass
uses ax, bx
.enter
mov di, ds:[si] ; derference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
mov bx, ds:[di].SSI_printDataHan
mov cx, ds:[di].SSI_printDataLen
mov dx, ds:[di].SSI_currentPrinter
call MemLock
mov ds, ax
clr di
.leave
ret
SSOpenPrintStrings endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSClosePrintStrings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Access the print strings block and unlock it
CALLED BY: GLOBAL
PASS: DS:*SI = SpoolSummons instance data
RETURN: Nothing
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSClosePrintStrings proc near
class SpoolSummonsClass
uses bx, di
.enter
mov di, ds:[si] ; derference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
mov bx, ds:[di].SSI_printDataHan ; block handle => BX
call MemUnlock ; unlock the block
.leave
ret
SSClosePrintStrings endp
SpoolSummonsCode ends
|
{
"pile_set_name": "Github"
}
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC/GEOS
MODULE: uiEditBar.asm
FILE: uiEditBar.asm
AUTHOR: Gene Anderson, May 12, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 5/12/92 Initial revision
DESCRIPTION:
$Id: uiEditBar.asm,v 1.1 97/04/07 11:12:13 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
;---------------------------------------------------
SpreadsheetClassStructures segment resource
SSEditBarControlClass
EBCEditBarClass
SpreadsheetClassStructures ends
;---------------------------------------------------
EditBarControlCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCGetInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get information about the EditBarControl
CALLED BY: MSG_GEN_CONTROL_GET_INFO
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCGetInfo method dynamic SSEditBarControlClass, \
MSG_GEN_CONTROL_GET_INFO
mov si, offset EBC_dupInfo
FALL_THRU CopyDupInfoCommon
EBCGetInfo endm
CopyDupInfoCommon proc far
EC < push bp, ax ;>
EC < mov bp, sp ;>
EC < mov ax, cs ;ax <- our segment >
EC < cmp ss:[bp][4].segment, ax ;4 is for saved regs >
EC < ERROR_NE CONTROLLER_UTILITY_ROUTINE_MUST_BE_CALLED_FROM_SAME_SEGMENT >
EC < pop bp, ax ;>
mov es, cx
mov di, dx ;es:di = dest
segmov ds, cs
mov cx, size GenControlBuildInfo
rep movsb
ret
CopyDupInfoCommon endp
EBC_dupInfo GenControlBuildInfo <
mask GCBF_SUSPEND_ON_APPLY or mask GCBF_EXPAND_TOOL_WIDTH_TO_FIT_PARENT,
; GCBI_flags
EBC_IniFileKey, ; GCBI_initFileKey
EBC_gcnList, ; GCBI_gcnList
length EBC_gcnList, ; GCBI_gcnCount
EBC_notifyTypeList, ; GCBI_notificationList
length EBC_notifyTypeList, ; GCBI_notificationCount
EBCName, ; GCBI_controllerName
handle EditBarControlUI, ; GCBI_dupBlock
EBC_childList, ; GCBI_childList
length EBC_childList, ; GCBI_childCount
EBC_featuresList, ; GCBI_featuresList
length EBC_featuresList, ; GCBI_featuresCount
SSEBC_DEFAULT_FEATURES, ; GCBI_features
handle EditBarControlToolUI, ; GCBI_toolBlock
EBC_toolList, ; GCBI_toolList
length EBC_toolList, ; GCBI_toolCount
EBC_toolFeaturesList, ; GCBI_toolFeaturesList
length EBC_toolFeaturesList, ; GCBI_toolFeaturesCount
SSEBC_DEFAULT_TOOLBOX_FEATURES> ; GCBI_toolFeatures
if FULL_EXECUTE_IN_PLACE
SpreadsheetControlInfoXIP segment resource
endif
EBC_IniFileKey char "editbar", 0
EBC_gcnList GCNListType \
<MANUFACTURER_ID_GEOWORKS, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_ACTIVE_CELL_CHANGE>,
<MANUFACTURER_ID_GEOWORKS, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_EDIT_BAR_CHANGE>
EBC_notifyTypeList NotificationType \
<MANUFACTURER_ID_GEOWORKS, GWNT_SPREADSHEET_ACTIVE_CELL_CHANGE>,
<MANUFACTURER_ID_GEOWORKS, GWNT_SPREADSHEET_EDIT_BAR_CHANGE>
;---
EBC_childList GenControlChildInfo \
<offset GotoDB, mask SSEBCF_GOTO_CELL, mask GCCF_IS_DIRECTLY_A_FEATURE>
; Careful, this table is in the *opposite* order as the record which
; it corresponds to.
EBC_featuresList GenControlFeaturesInfo \
<offset GotoDB, GotoDBName, 0>
;---
EBC_toolList GenControlChildInfo \
<offset GotoCellEdit, mask SSEBCTF_GOTO_CELL, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset GotoCellButton, mask SSEBCTF_GOTO_CELL_BUTTON, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset EditIcons, mask SSEBCTF_EDIT_ICONS, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset EditBar, mask SSEBCTF_EDIT_BAR, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset BackspaceButton, mask SSEBCTF_BACKSPACE_BUTTON, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset FilterSelector, mask SSEBCTF_FILTER_SELECTOR, \
mask GCCF_IS_DIRECTLY_A_FEATURE>
; Careful, this table is in the *opposite* order as the record which
; it corresponds to.
EBC_toolFeaturesList GenControlFeaturesInfo \
<offset GotoCellEdit, GotoCellName, 0>,
<offset GotoCellButton, GotoCellButtonName, 0>,
<offset EditIcons, EditIconsName, 0>,
<offset EditBar, EditBarName, 0>,
<offset BackspaceButton, BackspaceButtonName, 0>,
<offset FilterSelector, FilterSelectorName, 0>
if FULL_EXECUTE_IN_PLACE
SpreadsheetControlInfoXIP ends
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCUpdateUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Update the UI for the EditBarControl
CALLED BY: MSG_GEN_CONTROL_UPDATE_UI
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCUpdateUI method dynamic SSEditBarControlClass, \
MSG_GEN_CONTROL_UPDATE_UI
;
; Get notification data
;
mov bx, ss:[bp].GCUUIP_dataBlock
push bx
call MemLock
mov dx, ax ;dx <- seg addr of notification
mov es, ax ;es <- seg addr of notification
mov bx, ss:[bp].GCUUIP_toolBlock
mov ax, ss:[bp].GCUUIP_toolboxFeatures
cmp ss:[bp].GCUUIP_changeType, GWNT_SPREADSHEET_EDIT_BAR_CHANGE
LONG je editBarUpdate
; make sure that the font of the text in edit bar is the
; current font
;
; Any "Goto" tool?
;
test ax, mask SSEBCTF_GOTO_CELL
jz noGotoTool
push bp
mov bp, offset NSSACC_text ;dx:bp <- ptr to text
mov di, offset GotoCellEdit ;^lbx:di <- text object
call EBC_SetText
pop bp
noGotoTool:
;
; Any "Goto" button?
;
test ax, mask SSEBCTF_GOTO_CELL_BUTTON
jz noGotoButton
mov cx, offset NSSACC_text ;dx:cx <- ptr to text
mov di, offset GotoCellButton ;^lbx:di <- text object
call EBC_SetMoniker
noGotoButton:
;
; Any "Goto" DB?
;
mov bx, ss:[bp].GCUUIP_childBlock
mov ax, ss:[bp].GCUUIP_features
test ax, mask SSEBCF_GOTO_CELL
jz noGotoDB
mov bp, offset NSSACC_text ;dx:bp <- ptr to text
mov di, offset GotoDBCellEdit ;^lbx:di <- text object
call EBC_SetText
call EBC_SelectText ;select the new cell ref text
noGotoDB:
jmp done
editBarUpdate:
;
; Any "Edit Bar" tool?
;
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
;
; Is the edit bar dirty? If so, ignore this update
; so we don't obliterate what the user is typing.
;
call EBC_CheckModified
jnz done ;branch if modified
;
; Update the edit bar
;
mov bp, offset NSSEBC_text ;dx:bp <- ptr to text
mov di, offset EditBar ;di <- text object
if _PROTECT_CELL
call EBC_EnableDisable ;enable/disable the text obj
endif
call EBC_SetText
;
; Set the edit bar not user modified
;
call EBC_NotModified
noEditBar:
done:
;
; All done...clean up
;
pop bx
call MemUnlock
ret
EBCUpdateUI endm
;---
EBC_CheckModified proc near
uses ax, si
.enter
push ax, si
mov ax, MSG_VIS_TEXT_GET_USER_MODIFIED_STATE
mov si, offset EditBar ;^lbx:si <- OD of edit bar
call EBC_ObjMessageCall
pop ax, si
tst cx ;user modified?
.leave
ret
EBC_CheckModified endp
EBC_NotModified proc near
uses ax, si
.enter
mov ax, MSG_VIS_TEXT_SET_NOT_USER_MODIFIED
mov si, offset EditBar ;^lbx:si <- OD of edit bar
call EBC_ObjMessageCall
.leave
ret
EBC_NotModified endp
if _PROTECT_CELL
EBC_EnableDisable proc near
uses ax, cx, si, dx, bp
.enter
;
; enable or disable the Edit bar text field based on the protection
; flag. If the cell is unprotected, enable the text; otherwise, disable
; the text.
;
mov ax, MSG_GEN_SET_NOT_ENABLED ;assume disable
push ds
mov ds, dx ;ds = notification seg
test ds:[NSSEBC_miscData], mask SSEBCMD_PROTECTION
pop ds
jnz msgSet ;jump if cell protected
mov ax, MSG_GEN_SET_ENABLED
msgSet:
mov si, di
mov dl, VUM_NOW
call EBC_ObjMessageCall
.leave
ret
EBC_EnableDisable endp
endif
EBC_SetText proc near
uses ax, cx, si, dx, bp
.enter
;
; the text message can destroy cx, dx, bp
;
mov si, di ;^lbx:si <- OD of text object
mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR
clr cx ;cx <- text is NULL-terminated
call EBC_ObjMessageCall
.leave
ret
EBC_SetText endp
EBC_SetMoniker proc near
uses ax, cx, si, dx, bp
.enter
;
; the text message can destroy cx, dx, bp
;
xchg cx, dx ; cx:dx = fptr to string
mov bp, VUM_NOW
mov si, di ;^lbx:si <- OD of text object
mov ax, MSG_GEN_REPLACE_VIS_MONIKER_TEXT
call EBC_ObjMessageCall
.leave
ret
EBC_SetMoniker endp
EBC_SelectText proc near
uses ax, cx, si, dx, bp
.enter
;
; the text message can destroy cx, dx, bp
;
mov si, di ;^lbx:si <- OD of text object
mov ax, MSG_VIS_TEXT_SELECT_ALL
call EBC_ObjMessageCall
.leave
ret
EBC_SelectText endp
DisEnableEditIcons proc near
uses ax, dx, si
.enter
push ax
mov dl, VUM_NOW ;dl <- VisUpdateMode
mov si, offset EnterIcon
call EBC_ObjMessageSend
pop ax
mov dl, VUM_NOW ;dl <- VisUpdateMode
mov si, offset CancelIcon
call EBC_ObjMessageSend
.leave
ret
DisEnableEditIcons endp
DisEnableBackspaceButton proc near
uses ax, dx, si
.enter
mov dl, VUM_NOW ;dl <- VisUpdateMode
mov si, offset BackspaceButton
call EBC_ObjMessageSend
.leave
ret
DisEnableBackspaceButton endp
DisEnableFilterSelector proc near
uses ax, dx, si
.enter
mov dl, VUM_NOW ;dl <- VisUpdateMode
mov si, offset FilterSelector
call EBC_ObjMessageSend
.leave
ret
DisEnableFilterSelector endp
EBC_ObjMessageSend proc near
uses di
.enter
mov di, mask MF_FIXUP_DS
call ObjMessage
.leave
ret
EBC_ObjMessageSend endp
EBC_ObjMessageCall proc near
uses di
.enter
mov di, mask MF_FIXUP_DS or mask MF_CALL
call ObjMessage
.leave
ret
EBC_ObjMessageCall endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetRCValue
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: set row/column GenValues from row/column text
CALLED BY: INTERNAL
EBCUpdateUI
PASS: *ds:si = controller
dx:bp = row/column text
bx = child block
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 10/28/96 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCTextGainedFocus
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle gaining the focus
CALLED BY: MSG_META_GAINED_FOCUS_EXCL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of EBCEditBarClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/18/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCTextGainedFocus method dynamic EBCEditBarClass, \
MSG_META_GAINED_FOCUS_EXCL
;
; Let our superclass do its thing
;
mov di, offset EBCEditBarClass
call ObjCallSuperNoLock
;
; Save our focus state
;
mov di, ds:[si]
add di, ds:[di].Gen_offset
ornf ds:[di].EBCI_flags, mask SSEBCF_IS_FOCUS
;
; If we have any icons, call the controller enable them
;
movdw bxsi, ds:[OLMBH_output]
mov ax, MSG_SSEBC_DIS_ENABLE_EDIT_ICONS
mov cx, MSG_GEN_SET_ENABLED
call EBC_ObjMessageCall
ret
EBCTextGainedFocus endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCTextLostFocus
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle losing the focus
CALLED BY: MSG_META_LOST_FOCUS_EXCL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of EBCEditBarClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCTextLostFocus method dynamic EBCEditBarClass, \
MSG_META_LOST_FOCUS_EXCL
;
; Let our superclass do its thing
;
mov di, offset EBCEditBarClass
call ObjCallSuperNoLock
;
; Update our focus state
;
mov di, ds:[si]
add di, ds:[di].Gen_offset
andnf ds:[di].EBCI_flags, not (mask SSEBCF_IS_FOCUS)
;
; If we have any icons, call the controller to disable them
;
movdw bxsi, ds:[OLMBH_output]
mov ax, MSG_SSEBC_DIS_ENABLE_EDIT_ICONS
mov cx, MSG_GEN_SET_NOT_ENABLED
call EBC_ObjMessageCall
ret
EBCTextLostFocus endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCTextGetFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get current flags for EditBar text object
CALLED BY: MSG_EBC_TEXT_EDIT_GET_FLAGS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of EBCEditBarClass
ax - the message
RETURN: cl - SSEditBarControlFlags
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCTextGetFlags method dynamic EBCEditBarClass, \
MSG_EBC_TEXT_EDIT_GET_FLAGS
mov cl, ds:[di].EBCI_flags ;cl <- EditBarControlFlags
ret
EBCTextGetFlags endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCEditKbdChar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle keypress in the edit bar
CALLED BY: MSG_META_KBD_CHAR
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of EBCEditBarClass
ax - MSG_META_KBD_CHAR:
cl - Character (Chars or VChar)
ch - CharacterSet (CS_BSW or CS_CONTROL)
dl - CharFlags
dh - ShiftState (left from conversion)
bp low - ToggleState
bp high - scan code
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/22/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCEditKbdChar method dynamic EBCEditBarClass, \
MSG_META_KBD_CHAR
SBCS< cmp ch, CS_CONTROL ;control key? >
DBCS< cmp ch, CS_CONTROL_HB ;control key? >
jne callSuper ;branch if not a control key
test dl, mask CF_STATE_KEY or \
mask CF_TEMP_ACCENT
jnz callSuper
call EBCCheckShortcut ;shortcut?
jnc callSuper ;branch if not found
test dl, mask CF_RELEASE ;release or press?
jnz quit ;ignore releases on shortcuts
call cs:EBCKbdActions[di] ;call handler routine
jnc callSuper ;branch if not handled
quit:
.leave
ret
callSuper:
mov di, offset EBCEditBarClass ;es:di <- ptr to class
call ObjCallSuperNoLock
jmp quit
EBCEditKbdChar endm
EBCCancel proc near
movdw bxsi, ds:[OLMBH_output]
mov ax, MSG_SSEBC_CANCEL_DATA
call EBC_ObjMessageCall
stc ;carry <- press handled
ret
EBCCancel endp
EBCEnterNoPass proc near
clr bp
FALL_THRU EBCEnter
EBCEnterNoPass endp
EBCEnter proc near
movdw bxsi, ds:[OLMBH_output]
mov ax, MSG_SSEBC_ENTER_DATA
call EBC_ObjMessageCall
stc ;carry <- press handled
ret
EBCEnter endp
EBCEnterAndPass proc near
;
; Record the keyboard event
;
mov bx, segment SpreadsheetClass
mov si, offset SpreadsheetClass
mov di, mask MF_RECORD
call ObjMessage
mov bp, di ; kbd event
GOTO EBCEnter
EBCEnterAndPass endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCheckStart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if we're at the start of the edit bar
CALLED BY: EBCEditKbdChar()
PASS: *ds:si - EBCEditBar object
ax - MSG_META_KBD_CHAR
cx, dx, bp - values for MSG_META_KBD_CHAR
RETURN: carry - set if at start of edit bar
DESTROYED: bx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 7/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCheckStart proc near
mov bx, ds:LMBH_handle ;^lbx:si <- OD of text object
push ax, cx, dx, bp
;
; Get the current selection
;
sub sp, (size VisTextRange)
mov bp, sp ;ss:bp <- ptr to VisTextRange
call GetSelection
mov bx, ss:[bp].VTR_start.low ;bx <- start of selection
add sp, (size VisTextRange)
;
; If we're at the start, enter data and go...
;
pop ax, cx, dx, bp
tst bx ;at start?
jne notStart ;branch (carry clear)
call EBCEnterAndPass
notStart:
ret
EBCCheckStart endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCheckEnd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if we're at the end of the edit bar
CALLED BY: EBCEditKbdChar()
PASS: *ds:si - EBCEditBar object
ax - MSG_META_KBD_CHAR
cx, dx, bp - values for MSG_META_KBD_CHAR
RETURN: carry - set if at end of edit bar
DESTROYED: bx, si
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 7/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCheckEnd proc near
mov bx, ds:LMBH_handle ;^lbx:si <- OD of text object
push ax, cx, dx, bp
;
; Get the current selection
;
sub sp, (size VisTextRange)
mov bp, sp ;ss:bp <- ptr to VisTextRange
call GetSelection
mov dx, ss:[bp].VTR_end.low ;bx <- end of selection
add sp, (size VisTextRange)
;
; Get the length
;
push dx
mov ax, MSG_VIS_TEXT_GET_TEXT_SIZE
call EBC_ObjMessageCall ;dx:ax <- length of text
EC < tst dx ;>
EC < ERROR_NZ VISIBLE_POSITION_TOO_LARGE ;>
pop bx
sub bx, ax ;bx <- position - length
;
; If we're at the end, enter data and go...
;
pop ax, cx, dx, bp
tst bx ;at end?
jne notEnd ;branch (carry clear)
call EBCEnterAndPass
notEnd:
ret
EBCCheckEnd endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCheckShortcut
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if the keypress is an edit bar shortcut
CALLED BY: EBCKbdChar()
PASS: ax - MSG_META_KBD_CHAR:
cl - Character (Chars or VChar)
ch - CharacterSet (CS_BSW or CS_CONTROL)
dl - CharFlags
dh - ShiftState (left from conversion)
bp low - ToggleState
bp high - scan code
RETURN: carry - set if shortcut
di - offset of shortcut in table
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 12/13/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCheckShortcut proc near
uses ax, ds, si
.enter
mov ax, (length EBCKbdShortcuts)
mov si, offset EBCKbdShortcuts
segmov ds, cs
call FlowCheckKbdShortcut
mov di, si ;di <- offset of shortcut
.leave
ret
EBCCheckShortcut endp
;p a c s s c
;h l t h e h
;y t r f t a
;s l t r
;
if DBCS_PCGEOS
EBCKbdShortcuts KeyboardShortcut \
<0, 0, 0, 0, C_SYS_ESCAPE and mask KS_CHAR>, ;<Esc>
<0, 0, 0, 0, C_SYS_TAB and mask KS_CHAR>, ;<Tab>
<0, 0, 0, 1, C_SYS_TAB and mask KS_CHAR>, ;<Shift-Tab>
<0, 0, 0, 0, C_SYS_ENTER and mask KS_CHAR>, ;<Enter>
<0, 0, 0, 1, C_SYS_ENTER and mask KS_CHAR>, ;<Shift-Enter>
<0, 0, 0, 0, C_SYS_UP and mask KS_CHAR>, ;<UpArrow>
<0, 0, 0, 0, C_SYS_DOWN and mask KS_CHAR>, ;<DownArrow>
<0, 0, 1, 0, C_SYS_UP and mask KS_CHAR>, ;<Ctrl-Up>
<0, 0, 1, 0, C_SYS_DOWN and mask KS_CHAR>, ;<Ctrl-Down>
<0, 0, 1, 0, C_SYS_LEFT and mask KS_CHAR>, ;<Ctrl-Left>
<0, 0, 1, 0, C_SYS_RIGHT and mask KS_CHAR>, ;<Ctrl-Right>
<0, 0, 0, 0, C_SYS_PREVIOUS and mask KS_CHAR>, ;<PageUp>
<0, 0, 0, 0, C_SYS_NEXT and mask KS_CHAR>, ;<PageDown>
<0, 0, 1, 0, C_SYS_PREVIOUS and mask KS_CHAR>, ;<Ctrl-PageUp>
<0, 0, 1, 0, C_SYS_NEXT and mask KS_CHAR>, ;<Ctrl-PageDown>
<0, 0, 0, 0, C_SYS_LEFT and mask KS_CHAR>, ;<LeftArrow>
<0, 0, 0, 0, C_SYS_RIGHT and mask KS_CHAR>, ;<RightArrow>
<0, 0, 1, 0, C_SYS_ENTER and mask KS_CHAR> ;<Ctrl><Enter>
else
EBCKbdShortcuts KeyboardShortcut \
<0, 0, 0, 0, 0xf, VC_ESCAPE>, ;<Esc>
<0, 0, 0, 0, 0xf, VC_TAB>, ;<Tab>
<0, 0, 0, 1, 0xf, VC_TAB>, ;<Shift-Tab>
<0, 0, 0, 0, 0xf, VC_ENTER>, ;<Enter>
<0, 0, 0, 1, 0xf, VC_ENTER>, ;<Shift-Enter>
<0, 0, 0, 0, 0xf, VC_UP>, ;<UpArrow>
<0, 0, 0, 0, 0xf, VC_DOWN>, ;<DownArrow>
<0, 0, 1, 0, 0xf, VC_UP>, ;<Ctrl-Up>
<0, 0, 1, 0, 0xf, VC_DOWN>, ;<Ctrl-Down>
<0, 0, 1, 0, 0xf, VC_LEFT>, ;<Ctrl-Left>
<0, 0, 1, 0, 0xf, VC_RIGHT>, ;<Ctrl-Right>
<0, 0, 0, 0, 0xf, VC_PREVIOUS>, ;<PageUp>
<0, 0, 0, 0, 0xf, VC_NEXT>, ;<PageDown>
<0, 0, 1, 0, 0xf, VC_PREVIOUS>, ;<Ctrl-PageUp>
<0, 0, 1, 0, 0xf, VC_NEXT>, ;<Ctrl-PageDown>
<0, 0, 0, 0, 0xf, VC_LEFT>, ;<LeftArrow>
<0, 0, 0, 0, 0xf, VC_RIGHT>, ;<RightArrow>
<0, 0, 1, 0, 0xf, VC_ENTER> ;<Ctrl><Enter>
endif
EBCKbdActions nptr \
offset EBCCancel,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCCheckStart,
offset EBCCheckEnd,
offset EBCEnterNoPass
CheckHack <(length EBCKbdActions) eq (length EBCKbdShortcuts)>
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCEnterData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Enter data from the edit bar
CALLED BY: MSG_SSEBC_ENTER_DATA
PASS: *ds:si - instance data
es - seg addr of SSEditBarControlClass
ax - the message
bp - keyboard event to send to spreadsheet, or zero if none.
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/18/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCEnterData method dynamic SSEditBarControlClass,
MSG_SSEBC_ENTER_DATA
call SSCGetToolBlockAndTools
;
; See if any changes have been made. If not, we're done
; !* Commenting this out to fix a bug that allowed illegally formated
; data to be entered into a cell from the edit bar on the 2nd try
; (see bug 38444. PB 7/5/95
; call EBC_CheckModified
; jz done ;branch if not modified
mov di, offset EditBar ;^lbx:di <- OD of text object
mov ax, MSG_SPREADSHEET_ENTER_DATA_WITH_EVENT
;ax <- message to send
call GetSendText ;get text and send to ssheet
;
; Mark the edit bar as not modified
;
call EBC_NotModified
done::
ret
EBCEnterData endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCancelData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Cancel changes to data in edit abr
CALLED BY: MSG_SSEBC_CANCEL_DATA
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 1/31/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCancelData method dynamic SSEditBarControlClass,
MSG_SSEBC_CANCEL_DATA
call SSCGetToolBlockAndTools
;
; Mark the text as not modified so the notification isn't ignored
;
call EBC_NotModified
;
; Force the controller to send a new notification
;
mov ax, MSG_GEN_RESET
call ObjCallInstanceNoLock
ret
EBCCancelData endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCInitiateEditBarDB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Brings up the "Goto Cell" dialog box
CALLED BY: MSG_SSEBC_INITIATE_GOTO_CELL_DB
PASS: *ds:si = SSEditBarContorlClass object
RETURN: nothing
DESTROYED: ax, cx, dx, bp
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 7/15/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCInitiateEditBarDB method dynamic SSEditBarControlClass,
MSG_SSEBC_INITIATE_GOTO_CELL_DB
.enter
;
; Get pointer to Goto Dialog
;
call SSCGetChildBlockAndFeatures
tst bx
jnz gotGotoDB
;
; If no child block yet, build it now
;
mov ax, MSG_GEN_CONTROL_GENERATE_UI
call ObjCallInstanceNoLock
call SSCGetChildBlockAndFeatures
gotGotoDB:
;
; If the feature exists, initiate the dialog!
;
test ax, mask SSEBCF_GOTO_CELL
jz noGotoDB
mov si, offset GotoDB ;^lbx:si <- OD of text object
mov ax, MSG_GEN_INTERACTION_INITIATE
call EBC_ObjMessageCall
noGotoDB:
.leave
ret
EBCInitiateEditBarDB endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCInitialKeypress
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle initial keypress that begins editing
CALLED BY: MSG_SSEBC_INITIAL_KEYPRESS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
same as MSG_META_KBD_CHAR:
cl - Character (Chars or VChar)
ch - CharacterSet (CS_BSW or CS_CONTROL)
dl - CharFlags
dh - ShiftState (left from conversion)
bp low - ToggleState
bp high - scan code
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/27/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCInitialKeypress method dynamic SSEditBarControlClass, \
MSG_SSEBC_INITIAL_KEYPRESS
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR ;any edit bar?
jz done ;branch if no edit bar
;
; If we have an edit bar:
; (1) select all the text
; (2) send the keypress to it
; (3) tell it to grab the focus
; changed 6/27/94-brianc to work with FEP:
; (1) select all the text
; (2) tell it to grab the focus
; (3) send the keypress to it
;
mov si, offset EditBar
if _PROTECT_CELL
;
; We don't want to get any keyboard input when the cell is protected,
; so ignore the input when the text field is disabled.
;
push cx, dx, bp
mov ax, MSG_GEN_GET_ENABLED
call EBC_ObjMessageCall
pop cx, dx, bp
jnc done
endif
push cx, dx, bp
mov ax, MSG_VIS_TEXT_SELECT_ALL
call EBC_ObjMessageCall
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
pop cx, dx, bp
mov ax, MSG_META_KBD_CHAR
call EBC_ObjMessageCall
done:
ret
EBCInitialKeypress endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCPassKeypress
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Pass a keypress on to the spreadsheet
CALLED BY: MSG_SSEBC_PASS_KEYPRESS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
same as MSG_META_KBD_CHAR:
cl - Character (Chars or VChar)
ch - CharacterSet (CS_BSW or CS_CONTROL)
dl - CharFlags
dh - ShiftState (left from conversion)
bp low - ToggleState
bp high - scan code
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/27/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCPassKeypress method dynamic SSEditBarControlClass, \
MSG_SSEBC_PASS_KEYPRESS
mov ax, MSG_META_KBD_CHAR
call SSCSendToSpreadsheet
ret
EBCPassKeypress endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCEnableIcons
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Enable the edit icons
CALLED BY: MSG_SSEBC_ENABLE_ICONS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/27/92 Initial version
martin 7/13/93 Added more features
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCEnableIcons method dynamic SSEditBarControlClass, \
MSG_SSEBC_DIS_ENABLE_EDIT_ICONS
.enter
;
; Do we have any icons?
;
call SSCGetToolBlockAndTools
xchg ax, cx ;ax <- MSG_GEN_SET_ENABLED
;
; If we have icons, enable them
;
test cx, mask SSEBCTF_EDIT_ICONS
jz iconsDone
call DisEnableEditIcons
iconsDone:
;
; Do we have a backspace button?
;
test cx, mask SSEBCTF_BACKSPACE_BUTTON
jz backspaceDone
call DisEnableBackspaceButton
backspaceDone:
;
; Do we have a mask selector?
;
test cx, mask SSEBCTF_FILTER_SELECTOR
jz exit
call DisEnableFilterSelector
exit:
.leave
ret
EBCEnableIcons endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCGotoCellDB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Goto a cell, from the DB
CALLED BY: MSG_SSEBC_GOTO_CELL_DB
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/ 5/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCGotoCellDB method dynamic SSEditBarControlClass, \
MSG_SSEBC_GOTO_CELL_DB
call SSCGetChildBlockAndFeatures
mov di, offset GotoDBCellEdit ;^lbx:di <- OD of text object
mov ax, MSG_SPREADSHEET_GOTO_CELL
call GetSendText
ret
EBCGotoCellDB endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCGotoCell
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Goto a cell
CALLED BY: MSG_SSEBC_GOTO_CELL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/ 5/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCGotoCell method dynamic SSEditBarControlClass, \
MSG_SSEBC_GOTO_CELL
call SSCGetToolBlockAndTools
mov di, offset GotoCellEdit ;^lbx:di <- OD of text object
mov ax, MSG_SPREADSHEET_GOTO_CELL
call GetSendText
ret
EBCGotoCell endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetRCFromValue
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: go to cell specified by R/C GenValue pair
CALLED BY: UTILITY
PASS: *ds:si = controller
bx = child block
RETURN: nothing
DESTROYED: ax, bx, cx, dx, bp, si, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 10/28/96 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetSendText
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get text from an controller text object and send to the ssheet
CALLED BY: UTILITY
PASS: *ds:si - controller
^lbx:di - OD of text object
ax - message to send
RETURN: none
DESTROYED: cx, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
NOTE: assumes the spreadsheet message wants the text as:
dx - handle of text block (NULL-terminated)
cx - length of text (w/o NULL)
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/ 5/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetSendText proc near
.enter
;
; Get the text from the object
;
push si, ax
mov si, di ;^lbx:si <- OD of text object
clr dx ;dx <- alloc new block
mov ax, MSG_VIS_TEXT_GET_ALL_BLOCK
call EBC_ObjMessageCall
mov dx, cx ;dx <- new text block
mov cx, ax ;cx <- string length
pop si, ax
;
; Send the text to the Spreadsheet
;
call SSCSendToSpreadsheet
.leave
ret
GetSendText endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCGetFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get flags about the state of the edit bar
CALLED BY: MSG_SSEBC_GET_FLAGS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN: cl - SSEditBarControlFlags
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 1/31/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCGetFlags method dynamic SSEditBarControlClass,
MSG_SSEBC_GET_FLAGS
call SSCGetToolBlockAndTools
clr cl ;cl <- no flags
test ax, mask SSEBCTF_EDIT_BAR ;edit bar existeth?
jz noEditBar ;branch if not
mov si, offset EditBar ;^lbx:si <- OD of edit bar
mov ax, MSG_EBC_TEXT_EDIT_GET_FLAGS
call EBC_ObjMessageCall
noEditBar:
ret
EBCGetFlags endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetSelection
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the current selection range
CALLED BY: EBCTextReplaceSelection(), AddOpIfNeeded(), etc.
PASS: ^lbx:si - OD of text
ss:bp - ptr to VisTextRange
RETURN: ss:bp - VisTextRange filled in
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetSelection proc far
uses ax, cx, dx
.enter
mov ax, MSG_VIS_TEXT_GET_SELECTION_RANGE
mov dx, ss ;dx:bp <- VisTextRange
call EBC_ObjMessageCall
EC < tst ss:[bp].VTR_start.high ;>
EC < ERROR_NZ VISIBLE_POSITION_TOO_LARGE >
EC < tst ss:[bp].VTR_end.high ;>
EC < ERROR_NZ VISIBLE_POSITION_TOO_LARGE >
.leave
ret
GetSelection endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCGrabFocus
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Grab the focus (and give it to the edit bar)
CALLED BY: MSG_SSEBC_GRAB_FOCUS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
NOTE: this is done via a separate message rather than subclassing
MSG_META_GRAB_FOCUS_EXCL because the "current cell" indicator can also
have/grab the focus...
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCGrabFocus method dynamic SSEditBarControlClass,
MSG_SSEBC_GRAB_FOCUS
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov si, offset EditBar ;^lbx:si <- OD of edit bar
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
noEditBar:
ret
SSEBCGrabFocus endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCPaste
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: handle a paste by passing off to our text object
CALLED BY: MSG_META_CLIPBOARD_PASTE
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 3/17/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCPaste method dynamic SSEditBarControlClass,
MSG_META_CLIPBOARD_PASTE
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov si, offset EditBar ;^lbx:si <- OD of edit bar
if _PROTECT_CELL
;
; If the EditBar is not-enabled, then don't paste.
;
call EBCCheckEnabledEditBar
jnc error
endif
mov ax, MSG_VIS_TEXT_SELECT_ALL
call EBC_ObjMessageCall
mov ax, MSG_META_CLIPBOARD_PASTE
call EBC_ObjMessageCall
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
noEditBar:
ret
if _PROTECT_CELL
error:
mov ax, SST_ERROR
call UserStandardSound
jmp noEditBar
endif
SSEBCPaste endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCNotifiedWithDataBlock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle a handwriting notification by passing it off to our
text object.
CALLED BY: MSG_META_NOTIFY_WITH_DATA_BLOCK
PASS: *ds:si = SSEditBarControlClass object
ds:di = SSEditBarControlClass instance data
ds:bx = SSEditBarControlClass object (same as *ds:si)
es = segment of SSEditBarControlClass
ax = message #
cx:dx = NotificationType
cx - NT_manuf
dx - NT_type
^hbp = SHARABLE data block having a "reference count"
initialized via MemInitRefCount.
RETURN: nothing
DESTROYED: bx, si, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
HL 6/ 7/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCNotifiedWithDataBlock method dynamic SSEditBarControlClass,
MSG_META_NOTIFY_WITH_DATA_BLOCK
;
; We only want to pass this message on to our text object if it is
; sent with the notification type, GWNT_TEXT_REPLACE_WITH_HWR.
; Any other notification types should be passed on to our superclass.
;
cmp cx, MANUFACTURER_ID_GEOWORKS
jne callSuper
cmp dx, GWNT_TEXT_REPLACE_WITH_HWR
jne callSuper
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov ax, MSG_META_NOTIFY_WITH_DATA_BLOCK
mov si, offset EditBar ;^lbx:si <- OD of edit bar
call EBC_ObjMessageCall
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
noEditBar:
ret
callSuper:
mov di, offset SSEditBarControlClass
GOTO ObjCallSuperNoLock
SSEBCNotifiedWithDataBlock endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCContextNotif
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle message by passing it off to our text object.
CALLED BY: MSG_META_GENERATE_CONTEXT_NOTIFICATION
PASS: *ds:si = SSEditBarControlClass object
ds:di = SSEditBarControlClass instance data
ds:bx = SSEditBarControlClass object (same as *ds:si)
es = segment of SSEditBarControlClass
ax = message #
ss:bp = GetContextParams (GCP_replyObj ignored)
RETURN: nothing
DESTROYED: bx, si, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
HL 6/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCContextNotif method dynamic SSEditBarControlClass,
MSG_META_GENERATE_CONTEXT_NOTIFICATION
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov ax, MSG_META_GENERATE_CONTEXT_NOTIFICATION
mov si, offset EditBar ;^lbx:si <- OD of edit bar
mov di, mask MF_STACK or mask MF_CALL
call ObjMessage
noEditBar:
ret
SSEBCContextNotif endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCDeleteRangeOfChars
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle message by passing it off to our text object.
CALLED BY: MSG_META_DELETE_RANGE_OF_CHARS
PASS: *ds:si = SSEditBarControlClass object
ds:di = SSEditBarControlClass instance data
ds:bx = SSEditBarControlClass object (same as *ds:si)
es = segment of SSEditBarControlClass
ax = message #
ss:bp = VisTextRange (range of chars to delete)
RETURN: nothing
DESTROYED: bx, si, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
HL 6/ 7/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCDeleteRangeOfChars method dynamic SSEditBarControlClass,
MSG_META_DELETE_RANGE_OF_CHARS
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov ax, MSG_META_DELETE_RANGE_OF_CHARS
mov si, offset EditBar ;^lbx:si <- OD of edit bar
mov di, mask MF_STACK or mask MF_CALL
call ObjMessage
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
noEditBar:
ret
SSEBCDeleteRangeOfChars endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCSetNotEnabled
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Set the edit bar not modified, so that text doesn't
remain across document closings, etc.
PASS: *ds:si - SSEditBarControlClassClass object
ds:di - SSEditBarControlClassClass instance data
es - segment of SSEditBarControlClassClass
RETURN: nothing
DESTROYED: ax,cx,dx,bp
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/15/93 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCSetNotEnabled method dynamic SSEditBarControlClass,
MSG_GEN_SET_NOT_ENABLED
mov di, offset SSEditBarControlClass
call ObjCallSuperNoLock
call SSCGetToolBlockAndTools
tst bx
jz done
test ax, mask SSEBCTF_EDIT_BAR
jz done
call EBC_NotModified
done:
ret
SSEBCSetNotEnabled endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ColumnValueGetValueText
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: get text representation of current value
CALLED BY: MSG_GEN_VALUE_GET_VALUE_TEXT
PASS: *ds:si = ColumnValueClass object
ds:di = ColumnValueClass instance data
ds:bx = ColumnValueClass object (same as *ds:si)
es = segment of ColumnValueClass
ax = message #
cx:dx = buffer for text
bp = GenValueType
RETURN: cx:dx = buffer filled
DESTROYED:
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 10/28/96 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EditBarControlCode ends
EditBarMouseCode segment resource
COMMENT @-----------------------------------------------------------------------
FUNCTION: EBCTextReplaceSelection
DESCRIPTION:
CALLED BY: INTERNAL (MSG_SPREADSHEET_REPLACE_TEXT_SELECTION)
Sent by the ChooseFunction and ChooseName controllers.
PASS: cx - length of text (0 for NULL-terminated)
^hdx - handle of text
dx - 0 to indicate that nothing should be appended at all
bp.low - offset to new cursor position
When the text is replaced, the cursor will be
positioned at the end of the new text, so the
offset will have to be 0 or less.
A value > 0 means to select the new text.
bp.high - UIFunctionsActive:
UIFA_EXTEND - extend modifier down
UIFA_ADJUST - adjust modifier down
RETURN: handle freed
DESTROYED: everything (method handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/92 Initial version
-------------------------------------------------------------------------------@
EBCTextReplaceSelection method dynamic SSEditBarControlClass,
MSG_SPREADSHEET_REPLACE_TEXT_SELECTION
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
LONG jz noEditBar ;branch if no edit bar
if _PROTECT_CELL
mov si, offset EditBar
call EBCCheckEnabledEditBar
LONG jnc freeBlock
endif
;
; Make sure the edit bar has the focus (it will enable the icons)
;
push cx, dx, bp
mov ax, MSG_META_GRAB_FOCUS_EXCL
mov si, offset EditBar
call EBMC_ObjMessageCall
pop cx, dx, bp
;
; Check for no block passed, meaning append nothing, no select change
;
tst dx
jz markModified
;
; An an operator if necessary
;
call AddOpIfNeeded
;
; For getting the current selection...
;
mov ax, bp ;ax <- offset, flags
sub sp, (size VisTextRange)
mov bp, sp
push ax ;save offset, flags
;
; If we want to select the new text, get the range of the
; old selection and adjust it accordingly.
;
tst al ;0 or less?
jle noNewSelect ;branch if 0 or less
;
; We adjust the new selection to start at the old start,
; and end at the old start plus the length of the new.
; This will select the new text (in theory...)
;
call GetSelection
tst cx ;length passed?
jnz gotLength ;branch if length passed
push bx
mov bx, dx ;bx <- text block
call MemLock
mov es, ax
clr di ;es:di <- ptr to text
call LocalStringLength ;cx <- # chars
call MemUnlock
pop bx
gotLength:
mov ax, cx
add ax, ss:[bp].VTR_start.low ;ax <- start + length
mov ss:[bp].VTR_end.low, ax
noNewSelect:
;
; Paste the text
;
push dx, bp
mov ax, MSG_VIS_TEXT_REPLACE_SELECTION_BLOCK
call EBMC_ObjMessageCall
pop dx, bp
;
; Free the text
;
push bx
mov bx, dx ;bx <- handle of text block
call MemFree
pop bx
;
; See if we need to adjust the selection
;
pop ax ;al <- offset to select
tst al ;already adjusted?
jg doneAdjust ;branch if adjusted
;
; Adjust the new selection by the appropriate amount
;
call GetSelection
cbw ;ax <- adjustment
neg ax
sub ss:[bp].VTR_start.low, ax ;sub offset
sub ss:[bp].VTR_end.low, ax ;sub offset
doneAdjust:
;
; Set the new selection
;
mov ax, MSG_VIS_TEXT_SELECT_RANGE
mov dx, size VisTextRange
call EBMC_ObjMessageCall
add sp, size VisTextRange
markModified:
;
; Mark the text as user modified
;
mov ax, MSG_VIS_TEXT_SET_USER_MODIFIED
call EBMC_ObjMessageCall
noEditBar:
ret
if _PROTECT_CELL
freeBlock:
mov bx, dx
tst bx ; On the off chance that there's no block
jz afterFree
call MemFree
afterFree:
mov ax, SST_ERROR
call UserStandardSound
ret
endif
EBCTextReplaceSelection endm
if _PROTECT_CELL
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCheckEnabledEditBar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: To check if the EditBar is enabled or disabled.
CALLED BY: EBCTextReplaceSelection()
PASS: ^lbx:si = EditBar object
ds = pointing to some object blocks
RETURN: carry = set -- EditBar is enabled
clear -- EditBar is not-enabled
ds = updated
DESTROYED: ax, di
REVISION HISTORY:
Name Date Description
---- ---- -----------
CL 7/ 3/95 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCheckEnabledEditBar proc far
uses cx, dx, bp
.enter
Assert objectOD bxsi, GenTextClass
mov ax, MSG_GEN_GET_ENABLED
mov di, mask MF_FIXUP_DS or mask MF_CALL
call ObjMessage
.leave
ret
EBCCheckEnabledEditBar endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AddOpIfNeeded
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add an "=" or other operator to the edit bar if needed
CALLED BY: EBCTextReplaceSelection()
PASS: ^lbx:si - OD of edit bar text object
bp.high - UIFunctionsActive
UIFA_EXTEND - extend modifier down
UIFA_ADJUST - adjust modifier down
RETURN: none
DESTROYED: ax, di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
Uses "mov dx, '+'" here to get char and C_NULL at same time.
In SBCS version, AddCharToEditbar depends on this.
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 9/28/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AddOpIfNeeded proc near
uses bx, cx, dx
.enter
;
; Get the length of the current text, if any
;
push bp
mov ax, MSG_VIS_TEXT_GET_ALL_BLOCK
clr dx ;dx <- new block, please
call EBMC_ObjMessageCall
pop bp
tst ax
jnz checkOtherText
;
; There was no text -- add an "="
;
addEqual:
mov dx, "=" ;dx <- character to insert
addChar:
call AddCharToEditBar
done:
.leave
ret
checkOtherText:
mov dx, bp ;dh <- UIFunctionsActive
;
; Figure out where the selection is
;
push bp
sub sp, (size VisTextRange)
mov bp, sp ;ss:bp <- ptr to VisTextRange
call GetSelection
mov di, ss:[bp].VTR_start.low ;di <- start of selection
add sp, (size VisTextRange)
pop bp
tst di ;at start of edit bar?
jz addEqual ;branch if at start
;
; Get the character before the selection
;
push bx, ds
mov bx, cx ;bx <- handle of text
call MemLock
mov ds, ax ;ds <- seg addr of text
dec di ;di <- before selection start
DBCS< shl di, 1 ;di <- byte offset last char >
LocalGetChar ax, dsdi, NO_ADVANCE ;ax <- char before selection
call MemUnlock
pop bx, ds
;
; Special case ")" -- it needs another operator after it
;
LocalCmpChar ax, ")"
je addOperator
;
; See if it is punctuation -- if so, we're done
;
SBCS< clr ah >
call LocalIsPunctuation
jnz done ;branch if punctuation
;
; Figure out what operator to stick in based on the modifiers
;
addOperator:
mov al, dh ;al <- UIFunctionsActive
mov dx, ","
test al, mask UIFA_ADJUST ;<Ctrl>?
jnz addChar
mov dx, ":"
test al, mask UIFA_EXTEND ;<Shift>?
jnz addChar
mov dx, "+" ;default operator "+"
jmp addChar
AddOpIfNeeded endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AddCharToEditBar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add a single character to the edit bar
CALLED BY: AddCharIfNeeded()
PASS: ^lbx:si - OD
dx - character to add
^hcx - handle of text
RETURN: cx - freed
DESTROYED: ax, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AddCharToEditBar proc near
uses bx, bp
.enter
;
; Resize the passed block to a reasonable size
;
push bx, cx, ds
mov bx, cx ;bx <- handle of text
mov ax, (size word)*2 ;ax <- size in bytes
mov ch, mask HAF_LOCK or \
mask HAF_ZERO_INIT ;ch <- HeapAllocFlags
call MemReAlloc
mov ds, ax ;ds <- seg addr of block
mov ds:[0], dx
DBCS < mov {wchar}ds:[2], C_NULL ;NULL-terminate >
pop bx, cx, ds
;
; Replace the selected text
;
push cx
mov ax, MSG_VIS_TEXT_REPLACE_SELECTION_BLOCK
mov dx, cx ;dx <- handle of block
clr cx ;cx <- NULL-terminated
call EBMC_ObjMessageCall
pop bx
;
; Free the text block
;
call MemFree
.leave
ret
AddCharToEditBar endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBMC_ObjMessageCall
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Do an ObjMessage with MF_CALL and MF_FIXUP_DS
CALLED BY: UTILITY
PASS: ^lbx:si - OD of object
ax - message
cx, dx, bp - data for message
RETURN: ax, cx, dx, bp - depends on message
DESTROYED: ax, cx, dx, bp - depends on message
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 1/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBMC_ObjMessageCall proc near
uses di
.enter
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
.leave
ret
EBMC_ObjMessageCall endp
EditBarMouseCode ends
|
{
"pile_set_name": "Github"
}
|
___cxa_allocate_exception
___cxa_end_catch
___cxa_demangle
___cxa_current_exception_type
___cxa_call_unexpected
___cxa_free_exception
___cxa_get_exception_ptr
___cxa_get_globals
___cxa_get_globals_fast
___cxa_guard_abort
___cxa_guard_acquire
___cxa_guard_release
___cxa_rethrow
___cxa_pure_virtual
___cxa_deleted_virtual
___cxa_begin_catch
___cxa_throw
___cxa_vec_cctor
___cxa_vec_cleanup
___cxa_vec_ctor
___cxa_vec_delete
___cxa_vec_delete2
___cxa_vec_delete3
___cxa_vec_dtor
___cxa_vec_new
___cxa_vec_new2
___cxa_vec_new3
___dynamic_cast
___gxx_personality_v0
__ZTIDi
__ZTIDn
__ZTIDs
__ZTIPDi
__ZTIPDn
__ZTIPDs
__ZTIPKDi
__ZTIPKDn
__ZTIPKDs
__ZTSPm
__ZTSPl
__ZTSPj
__ZTSPi
__ZTSPh
__ZTSPf
__ZTSPe
__ZTSPd
__ZTSPc
__ZTSPb
__ZTSPa
__ZTSPKc
__ZTSPKy
__ZTSPKx
__ZTSPKw
__ZTSPKv
__ZTSPKt
__ZTSPKs
__ZTSPKm
__ZTSPKl
__ZTSPKi
__ZTSPKh
__ZTSPs
__ZTSPt
__ZTSPv
__ZTSPw
__ZTSPKa
__ZTSPx
__ZTSPy
__ZTSPKd
__ZTSPKe
__ZTSPKj
__ZTSPKb
__ZTSPKf
__ZTSv
__ZTSt
__ZTSs
__ZTSm
__ZTSl
__ZTSj
__ZTSi
__ZTSh
__ZTSf
__ZTSe
__ZTSd
__ZTSc
__ZTSw
__ZTSx
__ZTSy
__ZTSb
__ZTSa
__ZTIPKh
__ZTIPKf
__ZTIPKe
__ZTIPKd
__ZTIPKc
__ZTIPKb
__ZTIPKa
__ZTIPy
__ZTIPx
__ZTIPw
__ZTIPv
__ZTIPt
__ZTIPs
__ZTIPm
__ZTIPl
__ZTIPj
__ZTIPi
__ZTIPKi
__ZTIPKj
__ZTIPKl
__ZTIPKm
__ZTIPKs
__ZTIPKt
__ZTIPKv
__ZTIPKw
__ZTIPKx
__ZTIPKy
__ZTIPa
__ZTIPb
__ZTIPc
__ZTIPd
__ZTIPe
__ZTIPf
__ZTIPh
__ZTVN10__cxxabiv129__pointer_to_member_type_infoE
__ZTVN10__cxxabiv116__enum_type_infoE
__ZTVN10__cxxabiv117__array_type_infoE
__ZTVN10__cxxabiv117__class_type_infoE
__ZTVN10__cxxabiv117__pbase_type_infoE
__ZTVN10__cxxabiv119__pointer_type_infoE
__ZTVN10__cxxabiv120__function_type_infoE
__ZTVN10__cxxabiv120__si_class_type_infoE
__ZTVN10__cxxabiv121__vmi_class_type_infoE
__ZTVN10__cxxabiv123__fundamental_type_infoE
__ZTIa
__ZTIb
__ZTIc
__ZTId
__ZTIe
__ZTIf
__ZTIh
__ZTIi
__ZTIj
__ZTIl
__ZTIm
__ZTIs
__ZTIt
__ZTSN10__cxxabiv129__pointer_to_member_type_infoE
__ZTSN10__cxxabiv123__fundamental_type_infoE
__ZTSN10__cxxabiv121__vmi_class_type_infoE
__ZTSN10__cxxabiv120__si_class_type_infoE
__ZTSN10__cxxabiv120__function_type_infoE
__ZTSN10__cxxabiv119__pointer_type_infoE
__ZTSN10__cxxabiv117__pbase_type_infoE
__ZTSN10__cxxabiv117__class_type_infoE
__ZTSN10__cxxabiv117__array_type_infoE
__ZTSN10__cxxabiv116__enum_type_infoE
__ZTIy
__ZTIx
__ZTIw
__ZTIv
|
{
"pile_set_name": "Github"
}
|
" :: :.:..... : ....: ..: ..: : : :..: ..:...:.... :..........:.... .:.: : :.::..:.:......:.:..: : :(...TRUNCATED)
|
{
"pile_set_name": "Github"
}
|
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 7